Reputation: 8380
I'm making a workout calendar app where a person can register a user and start logging his workouts in a calendar.
This is how the project is structured right now. Inside of workoutcal/urls.py, I've defined, among others, the following urls:
url(r'^login/$', views.login, name='login'),
url(r'^register/$', views.UserFormView.as_view(), name='register')
The views that handle the requests reside in workoutcal/views.py. My question is if this is the right way to do it. I'm a little bit confused about what an "app" in django (such as the workoutcal app) encapsulates. I think I want user to log in to the whole functionality of my website, and if that is the case, shouldn't the login urls reside in workout/urls.py?
Upvotes: 0
Views: 21
Reputation: 621
The specifics of where exactly authentication should be are not carved in stone (as every project is differently structured), but as a general rule it should look like this
If your method matches this pattern, and communication with the server is encrypted, the chances are it's good enough.
Upvotes: 1