Skip to content

This project was developed for the Web Technologies exam and is an Instagram-style social network created using Django. The purpose of the project was to showcase knowledge of web development concepts using the Django framework. More in 'Djagram_Tesina...'

Notifications You must be signed in to change notification settings

FilippoCiarlo/Djagram

Repository files navigation

Djagram Logo
Instagram inspired website, share your moment with a picture, describe them with a short descriptiona and a serie of tags. Follow the people that you are interested in and leave a comment or a like under their pictures.


Site Preview

Homepage

Djagram Logo

User Profile

Djagram Logo


Setup

1st Way

Run the BASH script present in the project folder:
bash ./project_setup_launcher.sh

2nd Way

  1. Create a virtual environment
    python3 -m venv venv

  2. Activate the virtual environment
    source venv/bin/activate

  3. Upgrade the Python package-management system
    python3 -m pip install --upgrade pip

  4. Install the dependencies
    pip install -r requirements.txt

Turn ON/OFF the Virtual Environment:

  • To activate the virtual environment run the following command: source venv_test/bin/activate
  • To deactivate the virtual environment run the following command: deactivate

Run the Website

1st Way

Run the BASH script present in the project folder:
bash ./project_launcher.sh

2nd Way

  1. Apply the unapplied migrations
    python3 manage.py migrate

  2. Run the local development server
    python3 manage.py runserver


Run the Tests

1st Way

Run the BASH script present in the project folder:
bash ./project_tests_launcher.sh

The script will execute the following commands:

Test all Project
coverage run --omit='/venv/' --omit='/tests/' manage.py test

Print in the shell a report about the tested-code coverage
coverage report

Make an HTML report about the tested-code coverage in the ./htmlcov folder
coverage html

Clean all media files produced during the tests execution
python3 ./cleaning_procedure.py

2nd Way

Test all Project:
python3 manage.py test

  • Test accounts application
    python3 manage.py test accounts

  • Test posts application
    python3 manage.py test posts

After running the tests run the source file of the cleaning procedure, present in the project folder, to clean up all media files produced during the tests execution.
python3 ./cleaning_procedure.py


Dependencies

The code use the following dependencies:

  • django-environ: Manages Environment Variables
  • pillow: Manages Image
  • django-taggit: Handles tagging functionalities
  • django-crispy-forms: Makes forms look better
  • crispy-bootstrap5: Provides Bootstrap template pack for django-crispy-forms
  • coverage: Helps tracking the executed code during tests

Test Database

Below are the credentials of registered users, which have been used to simulate interactions between registered users on the website. The website administrator credentials are in bold.

Username Password
filippociarlo testpass123
JohnDoe testpass456
JaneDoe testpass789
admin testpass101

Note:
The project it's been tested using Firefox.

About

This project was developed for the Web Technologies exam and is an Instagram-style social network created using Django. The purpose of the project was to showcase knowledge of web development concepts using the Django framework. More in 'Djagram_Tesina...'

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published