Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OperationalError at /admin/questions/question/add/ no such table: questions_topic #34

Open
arushikhokhar opened this issue Aug 2, 2020 · 3 comments

Comments

@arushikhokhar
Copy link

No description provided.

@aswinshenoy
Copy link
Contributor

aswinshenoy commented Aug 3, 2020

I see that the installation instructions miss the step python manage.py makemigrations, which creates db migration files.
These files are used by python manage.py migrate to do the db migration and setup the db for us, so since the db migration files are missing, perhaps not created, your migrate won't show any errors but still no table shall be created (except auth & other models django has out of the box, that's why you can create user and login).

Try doing 'python manage.py makemigrations' and see if the problem is fixed :)

@arushikhokhar
Copy link
Author

Only site administration's path is given in URL patterns, not the user side

@aswinshenoy
Copy link
Contributor

aswinshenoy commented Aug 3, 2020

Only site administration's path is given in URL patterns,

Yes. Adding path('admin/', admin.site.urls), in urls.py is actually adding all path & sub-paths (including /admin/questions/question/add/) that are required by `django.contrib.admin' module that is responsible for the admin site.

What is actually happening is admin module itself has a urls.py with all the paths defined for the admin views, and we are adding those to our project when we add path('admin/', admin.site.urls), prefixing with admin/. If you use anything else like path('dash/', admin.site.urls), your admin urls will be with /dash/questions etc.

not the user side

I didnt understand what you meant completely with this, but if you meant these urls only work for admins (with IDs), yes you are right. A user without ID's cannot access/view anything. Currently, the project is hardly implemented except for some ORM definitions, and there is no public user facing views at all. Only through admin will you be able to add the questions, see them etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants