Skip to content

Latest commit

 

History

History
113 lines (78 loc) · 3.58 KB

README.md

File metadata and controls

113 lines (78 loc) · 3.58 KB

Airport Terminal Services (ats) system

ATS is a system to digitise the services offered by an airport terminal, for both both passengers and employees.
Check out ATS hosted project
Developed for: Airports Authority of India by AAI Interns 2017

Dependencies

To run this project you need to install these packages/dependencies in your virtual environment(preferrably):

  • Python 3

  • Django v1.11

  • Pillow
    pip install Pillow

  • Django Crispy forms
    pip install django-crispy-forms

  • Django datetime widget
    pip install django-datetime-widget

  • MySQL client
    pip install mysqlclient

Also, to run locally you need to have a file "local.py" in the following directory: src/ats/settings/ having the following code:

# This file is gitignored to keep production and local settings seprate

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

DEBUG = True

SECURE_SSL_REDIRECT = False

How to run:

  • Install/satify the above mentioned dependencies, including creating "local.py" file
  • Make migrations, and migrate

Instructions for collabprators:

  • Name your branches in the pattern
    your_module_name - branch_name

  • Base HTML files are put in
    src/templates/common/base.html

    And they can be used like:
    common/base.html

  • Place your template files in src/templates/your-module-name/your-file.html

    And then in your views refer to them as: your-module-name/your-file.html
    Extend your HTML template from base.html: {% extends 'common/base.html' %} as first statement in your template and write your {% block content %}

  • Base static files (css,javascript,images) are placed in eg.
    src/static/js/common/base.js
    src/static/css/common/base.css
    src/static/images/common/base.jpg

    And then in your template refer to them as:
    {% static 'js/common/base.js' %}
    {% static 'css/common/base.css' %}
    {% static 'images/common/base.jpg' %}

  • Place your static files (css,javascript,images) in src/static/js/your-module-name/your-file.js
    src/static/css/your-module-name/your-file.css src/static/images/your-module-name/your-image.jpg

    And then in your template refer to them as:
    {% static 'js/your-module-name/your-file.js' %} within {% block script %}
    {% static 'css/your-module-name/your-file.css' %} within {% block style %}
    {% static 'images/your-module-name/your-image.jpg' %}

    also load static files at the top of your template, like so:
    {% load staticfiles %} below the {% extends 'common/base.html' %}

Trobleshooting

  • If you're facing problems in making migrations after make changes to models or after pulling from GitHub, delete all files in migrations folder in your app, except __init__.py, and then tru to make migrations again. You can also try doing this and also deleting the database and then try making migrations, and migrate.

Development

Want to contribute? Great! Fork me!

License

MIT

Say Hi

LinkedIn Links

If collaborator: Please edit this readme for adding any more important instructions

last uplated: 29 July 2017