Search code examples
djangosessiondjango-sessionsdjango-users

User registers after contributing to the site? In Django


Let's say I have a site where users can contribute content.

If the user is anonymous, and contributes, and comes back after their session is expired, then their contributions are credited to Anonymous.

If the user is anonymous, and contributes content, and then creates an account, how can I credite all the user's contributions during this session to the user account?


Solution

  • This pattern is often called "Lazy Registration" or "Lazy Signup". There is a Django app to support this type of feature http://pypi.python.org/pypi/django-lazysignup/ though I've never used it personally.