Run python manage.py createcachetable
after pulling from upstream. (Required only once)
Package django-import-export
added to Pipfile.
Run pipenv install
command to install package from pipfile.
- Write code and commit on your own branch only. (No commits on master branch). Feel free to make as many branches as you like.
- Do not modify existing code blocks(classes, functions, models, api, views, etc.) to fit your task needs. If you want to reuse a code block, reuse as it is. Or else make your own. Then code optimization and refactoring will be done later at the end of an iteration.
- Always comment your code blocks such that other devs can understand its purpose. Example:- 1 or 2 line description about a function.
- Avoid using (Shift+Delete). Recycle Bin is a friend in need, indeed......
- After pulling, check for any python package updates. If any, run
pipenv install
to install the new packages. Also, run database migrations. - Thoroughly test before opening a Pull Request.
- Any other important guideline for the team should be highlighted here in Readme.md in bold.
- As a convention, prefix model fields and form fields with model name.
Eg:-
class Stud(models.Model): stud_name, stud_age.
-
Fork the repo to your account.
-
Clone the repo on your computer.
-
Add remote upstream for fetching / pulling from the original project repo.(Fetch/Pull Updates from upstream. And Push your commits to origin)
git remote add upstream https://github.com/dhruvparekh12/sih-sikkim.git
-
Checkout to Your own branch.
git checkout -b br_name
-
Setup Environment and dependencies. (Requires python 3.7 and pipenv installed). Enter these commands in the repo root directory.(where Pipfile exist.)
pipenv install
pipenv shell
-
Setup Database.
cd src
python manage.py makemigrations
python manage.py migrate
python manage.py import_bl_dr
python manage.py createsuperuser
-
Run Server.
python manage.py runserver
-
Django Admin Panel can be accessed at:
/admin-control-panel/
-
Default Accounts:-
District Admin (East Sikkim) username:-
east_admin
Block Admin (Gangtok) username:-
gangtok_admin
Password (for all above accounts):-
Pass@123
-
MDBootstrap Documentation