16 ms·
Did you have to create all the usual routes and views for the typical auth flow like signup, login, logout, change-password etc yourself? I did a quick test li
by TekMol 5y ago
Did you have to create all the usual routes and views for the typical auth flow like signup, login, logout, change-password etc yourself?
I did a quick test like this:
apt install -y python3-django
django-admin startproject mysite
cd mysite
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:80
And it serves a Django site but there seem to be no routes for users to sign up, log in etc.
The urls.py file contains only this one route it seems:
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
- danpalmer 5y agoDjango provides views for all of these things that you can inherit from to customise if you want. We happen to deviate from Django's norms enough that we've written our own, but there are a lot of benefits to basing your own on Django's because they have already solved some more subtle security issues like rotating session keys at the right stages.
- TekMol 5y agoI digged a bit deeper now and see Django indeed offers default views. But it does not offer default templates, so you still have to write those from scratch, right?