Branch: https://bitbucket.org/svallapu/appstore/branch/IGBF-1521
Fixture:
JSON file Name : /appsDB.json (root folder). It is also attached to this issue.
To Load Data (command): python manage.py loaddata appsDB.json
Updates/ Changes :
1. Added new symbolicname field to the apps model (models.py)
2. Migrated the new changes (symbolicname) to the apps table in the database.
3. Created superuser to access the Admin
--> python manage.py createsuperuser
--> Enter username and password to access Admin page
--> Admin Page Link localhost:8000/Admin
4. Copied the records from repository.xml to local database.
5. Created fixtures using existing data
--> Dump Data: python manage.py dumpdata appname > fileneme.json
--> Load Data: python manage.py loaddata <filename.json>
6. Deleted django.wsgi (Recommended by Pranav)
7. Replaced path with re_path for the links to accept regular expressions. (wherever needed)
8. Changed the link from underscore to hyphen (Important). (It avoids crashing when using hyphens in the URL)
->re_path(r'^(?P<app_name>[-\w\d]+)' use this regex to accept hyphen ("") in the URL.
9. Decoded base64 for the details field. (Only allows base64 input, for now, didn't convert markdown to HTML)
Looks like fixtures can help.
Reference: Providing initial data for models. Version 2.1 documentation: https://docs.djangoproject.com/en/2.1/howto/initial-data/