Giter Site home page Giter Site logo

django_issuetracker's Introduction

Issue Tracker Web Application

This web application is developed using Django, a high-level Python Web framework. It uses Python 3.6.3, Django 3.0.4 and SQLite database for development.

This project comprises three main apps:

  1. Accounts: Using the built-in Django authentication app, the User model extended to include other properties and functionalities.
  2. Projects: This app manages projects and reported issues for each project. Only superusers can create a project category using the admin panel. Logged in users can create new projects and issues. A project can only be updated/ deleted by its creator.

       After creating an issue for a project, the assignee can update the issue status to 'Done', 'In Progress' or 'Cancelled'. Only the reporter has the right to delete a given issue. Each user can see the issue list that are assigned to herself in another view. 3. APIs: For the sake of clarity, the RESTful APIs are put under different app/ url. Logged in users are authorized to get and put methods. A customized permission is also developed to ensure that only the issue's reporter can update and delete it.

       Using Django Rest Framework (DRF), the following interfaces are created:

Endpoint HTTP Method Result
issues GET Get all the issues
issues POST Add a single issue
issue/:pk GET Get a single issue
issue/:pk PUT Updates a single issue
issue/:pk DELETE Deletes a single issue

Both class-based views and function-based views are used in this application. We also used django-tables2 and django-filter for the project list page to employ their DRY features in table rendering and filtering.

The issue tracker web application is also deployed on Heroku: https://theissuetracker.herokuapp.com/


Installation

Install dependencies via requirements.txt

pip install -r requirements.txt

Setting the Environment Variables

Before starting the web application, the value for environment variables should be set. For generating value for SECRET_KEY variable, run the following code:

import secrets
generated_value = secrets.token_hex(24)

Set the value of the following variables in your OS. In mac, you can add them to ~/.bash_profile as follows:

export SECRET_KEY='generated_value'
export EMAIL_USER='your_username'
export EMAIL_PASS='your_password'

In order to use your Gmail account to send confirmation emails, follow this link to give access to other apps: https://myaccount.google.com/lesssecureapps

Running the Web Application

Run the following commands in terminal to have the app running at http://127.0.0.1:8000:

python manage.py migrate
python manage.py runserver

To access the admin panel at http://127.0.0.1:8000/admin, create a superuser with the following command:

python manage.py createsuperuser

Installation via Docker

Instead of installing the application and its dependencies on your local machine, you can set up an isolated environment and run the application in a container. The Dockerfile includes the instruction for building the image file for the application. docker-compose.yml is the services for multi-container docker application. Though being a single-container, we used compose to be able to change the database easily in the future (to PostgreSQL) and also manage environment variables.

Before building the image:

  1. Change directory to the root project (mysite).
  2. Set up environment variables: Create a .env file in the root directory of the project (where Dockerfile and docker-compose.yml are located). The contents of .env the file should be set as KEY=VALUE.
  3. Run the following commands to build the image and run the container respectively:
docker-compose build
docker-compose up
  1. The application will be running at http://127.0.0.1:8000/

django_issuetracker's People

Contributors

dependabot[bot] avatar stafazzoli avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.