Reputation: 32767
When working with databases with Django, it automatically creates 12 default tables in the database.
I understand that I need dango_session
for storing the session and probably django_site
. But why do I need the others?
In PHP I used to store users in my own custom tables. Shouldn't I do that anymore?
Upvotes: 9
Views: 8035
Reputation: 308829
The tables are created because you have django.contrib.auth
, django.contrib.sessions
, and so on in your INSTALLED_APPS
setting. You shouldn't delete the tables if the apps are installed, as Django will expect them to exist.
None of the contrib apps are required to run Django. However, I highly recommend that you use the Django auth
and sessions
app instead of writing your own. For example, if you use the auth app, you don't need to worry about how to hash passwords, and there are lots of helpful views included to log users in, reset passwords and so on.
Upvotes: 13