created the database models, added damnit_django file, added json file to add category data in fixtures.
1. TITLE:
Created the database models, added damnit_django file, added json file to add category data in fixtures.
2. STATUS:
Ready.
3. DESCRIPTION:
Created all models to add the tables from the ERD to the database. Created a fixture file to add data to the category table. Added a damnit_django file to destroy and recreate the database.
After pulling the master run the following:
./damnit_django.sh in the djangazon directory.
If that fails to create the db do the following individually from the djangazon directory:
find . -path "/website/migrations/*.py" -not -name "__init__.py" -deletefind . -path "/website/migrations/*.pyc" -deleterm db.sqlite3python manage.py makemigrations websitepython manage.py migratepython manage.py loaddata category.json
8. TESTING THE CODE:
Check to make sure that the database is populated using DB Browser. Check to make sure there are 10 categories in the category table in the Browse Data tab in DB Browser.
created the database models, added damnit_django file, added json file to add category data in fixtures.
1. TITLE:
Created the database models, added damnit_django file, added json file to add category data in fixtures.
2. STATUS:
Ready.
3. DESCRIPTION:
Created all models to add the tables from the ERD to the database. Created a fixture file to add data to the category table. Added a damnit_django file to destroy and recreate the database.
4. RELATED TICKETS:
ALL
5. FILES CHANGED:
models.py damnit_django.sh category.json Djangazon_ERD.jpg
6. STEPS TO RUN PROJECT:
After pulling the master run the following:
./damnit_django.sh
in the djangazon directory. If that fails to create the db do the following individually from the djangazon directory:find . -path "/website/migrations/*.py" -not -name "__init__.py" -delete
find . -path "/website/migrations/*.pyc" -delete
rm db.sqlite3
python manage.py makemigrations website
python manage.py migrate
python manage.py loaddata category.json
8. TESTING THE CODE:
Check to make sure that the database is populated using DB Browser. Check to make sure there are 10 categories in the category table in the
Browse Data
tab in DB Browser.For reference: Bangazon Employee Handbook: Pull Requests