EducatedCamels / djangazon

Django powered web application for Bangazon site
0 stars 0 forks source link

created the database models, added damnit_django file, added json fil… #26

Closed jamestonkin closed 7 years ago

jamestonkin commented 7 years ago

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

kayrahbear commented 7 years ago

Works great! HOORAY FOR TABLES!