This repository presents a web application using Django framework for monitoring webpage accesses in external websites.
The following softwares have to be configured / installed for running this application.
- Django framework for providing web services.
- Python 2.7 as the main programming language.
- pip, the PyPA recommended tool for installing Python packages.
- VirtualEnv for creating a Python environment with all (library) dependencies.
- SQLite as the relational database management system.
- Bootstrap as the template of web pages.
To configure a local environment, it is necessary to install Python and VirtualEnv softwares, as aforementioned. Then, virtual environment can be configured according to a environment configuration file, named as 'requirements.txt', as follows:
virtualenv env
source env/bin/activate
pip install -r requirements.txt
We basically have two projects, one for monitoring webpage accesses, named as web_monitor
, and another for notifying webpage accesses to the web_monitor project, named as app
. To start these projects in a local environment, it is necessary to run a Django server for each project (using different ports), as follows:
cd $ROOT_DIRECTORY
cd web_monitor
python manage.py runserver 5000 &
cd ../app
python manage.py runserver &
The folllowing URLs are available in this project, that access:
- Contact list as our home page
http://$HOSTNAME:$PORT/
- List of webpages accessed by a specific contact. It can be accessed by links in the contact items from the home page.
http://$HOSTNAME:$PORT/pages/<contact_id>
P.S.: $HOSTNAME should be replaced by the hostname or IP address, e.g., localhost; and $PORT should be replaced by the configured port in Django project, e.g., 5000.
The folllowing URLs are available in this project, that access:
- Home page to the external application
http://$HOSTNAME:$PORT/<update>
- Contact form to register a contact in the app web_monitor.
http://$HOSTNAME:$PORT/contact/<update>
- About page
http://$HOSTNAME:$PORT/about/<update>
- Price page
http://$HOSTNAME:$PORT/price/<update>
P.S.: We added an update parameter in our URL to trigger our JavaScript, i.e., to send HTTP requests to the app web_monitor.