documentation on registering the User model
See original GitHub issueThis is more of a suggestion: I am using Userena with actstream, and I am not at all sure if I did this right to register the User model.
class StubsConfig(AppConfig):
name = 'stubs'
def ready(self):
registry.register(self.get_model('Band'))
registry.register(self.get_model('Concert'))
registry.register(self.get_model('Location'))
from django.contrib.auth.models import User
registry.register(User)
Either way it would be nice to mention in the docs the right way to register the user model.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:7
- Comments:18 (1 by maintainers)
Top Results From Across the Web
Custom user models — django-registration 3.3 documentation
In general, django-registration will work with a custom user model, though at least some additional configuration is always required in order to do...
Read more >Registering users | LoopBack Documentation
The built-in User model provides methods to register new users and confirm their email addresses. Page Contents. Registering users with the LoopBack User...
Read more >Building a User Registration Form with Django's ...
Django's UserCreationForm The doc on authentication in Django mentions that it is "a ModelForm for creating a new user." It comes with three ......
Read more >A Guide to User Registration, Login, and Logout in Django
This article will cover how to allow user registration, login, and logout functionality on a site built using the Django Web Framework.
Read more >Enabling user registration - Xperience 13 Documentation
Create a view for the Register action and display an appropriate registration form. We recommend using a strongly typed view based on your ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually I migrated my models registration into a separate app like
end0
. Now my code looks like:Not sure for <1.7, but for 1.7, if you want to register models outside of the current app, you can do the following. For my use case, I created a wholely separate “activity” app which points to both the User model and the models on which I want actions. According to the Applications docs you can call up any registered app by using the app_label.model syntax. This is a minor difference from the current docs, which use self.get_model() to register apps. That works, but is limited only to the models in the current application.