Skip to content
This repository has been archived by the owner on Dec 17, 2019. It is now read-only.

Feature/django1.5 #160

Closed
wants to merge 26 commits into from
Closed

Conversation

ToxicWar
Copy link
Contributor

  • Rewritten badges_list and awards_list on CBV.
  • Removed unused import direct_to_template
  • Fix django-badger/issues url (lmorchard -> mozilla)
  • Little changes according PEP8

@rlr
Copy link
Contributor

rlr commented Mar 20, 2013

Changes in here look good to me! I'll defer to @lmorchard for doing a final r? and merging. Thanks!

@askvictor
Copy link
Contributor

I've been using this branch with a django 1.5 project with a custom user model. Problems encountered:

  • Using User = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') in models.py is correct for defining models, but breaks when the accessing user objects (this occurs once in models.py) as in this case User is a string not a class.
  • Every other file imports the standard User model; if User is needed, it probably needs to be imported something like this:
try:
    from django.contrib.auth import get_user_model
    User = get_user_model()
except ImportError:
    from django.contrib.auth.models import User

askvictor and others added 3 commits July 4, 2013 13:23
…ng User from django.contrib.auth.models, first try to get the user model using get_user_model().

But this doesn't work in models.py, so using the string from settings for that file - this breaks one place.
Also, username doesn't necessarily exist anymore - some spots noted where this occurs
Conflicts:
	README.rst
	badger/models.py
@ToxicWar ToxicWar closed this Jul 4, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants