django-auth

Django: Losing my mind and pulling my hair out with Django auth.

I'm creating a SAAS as a project, and can't seem to wrap my dinosaur brain around this auth system. I started to roll my own system before I realized you could add on to the normal auth system. Is this completely wrong? Should I somehow extend the User model but still include all of my own attributes (username, password, etc)? from djan...

Django: Two Users with the same username.

How can I extend Auth to allow for multiple users with the same username. In SAAS this is a need because two accounts might have a user called "owner" or something like that. ...

Implementing a login in django

In my base.html I placed this: {% if user.is_authenticated %} you are logged in! {% else %} <h3>Login</h3> <form action="/login/" method="post" accept-charset="utf-8"> <label for="username">Username</label><input type="text" name="username" value="" id="username" /> <label for="password">Password</label><input type="password" name="pass...

Django: How can I implement a low level login using a md5 password column since I'm porting over my users table from an old site?

Basically, I currently have login/ in urls.py redirect to the django.contrib.auth.views.login and that seems to work out fine. However I'm porting over passwords from a legacy mysql/php site and I believe I should just create a new model profile per http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-u...

django: failing tests from django.contrib.auth

When I run my django test I get following errors, that are outside of my test suite: ====================================================================== ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest) ---------------------------------------------------------------------- Traceback (most recent call...

Putting a django login form on every page

I'd like the login form (AuthenticationForm from django.contrib.auth) to appear on every page in my site if the user is not logged in. When the user logs in, they will be redirected to the same page. If there is an error, the error will be shown on the same page with the form. I suppose you'd need a context processor to provide the form...

Where does Django store auth's superuser / pw / e-mail data?

After running syncdb and creating a su, where does that get recorded? Settings.py doesn't seem to change. ...

How to avoid creating 'username' in django-auth

In my django project I need to add registration function. Problem is that in registration process I can't use a 'userprofile' anywhere. My user is defined by 'first name' , 'last name' and some other data. How to achieve this ? Apart of enabling contrib.auth and 'registration' I've created a 'user' application. In user.models I have an e...

PyAMF (0.6) doesn't seem to include Django (1.2) ForeignKey related-objects on auth.models.User

I am trying to return a django.contrib.auth.models.User object, and it fetches all the data properly, but the related fields are nowhere to be found, even utilizing "select_related()" as suggested in documentation. class UserProfile(models.Model): user = models.ForeignKey( User, unique=True ) In pyamf gateway: def login_user( http_...

Django: How can I apply the login_required decorator to my entire site ( excluding static media )?

The example provides a snippet for an application level view, but what if I have lots of different ( and some non-application ) entries in my urls.py file, including templates? How can I apply this login required decorator to each of them? (r'^foo/(?P<slug>[-\w]+)/$', 'bugs.views.bug_detail'), (r'^$', 'django.views.generic.simple.direct...

Should I place custom registration code in Views, Models or Managers?

I'm rolling my own custom registration module in Django based on django.contrib.auth. My registration module will have some extra functionality and help me reduce my dependency on other django modules that I'm currently using like django-registration and django-emailchange. I've run into a what-the-best-way-to-do-it problem here. Note: ...

in a brand-new django project, django auth tests fail

I make a brand-new django project and do literally nothing with it except give values to DATABASE_USER, DATABASE_ENGINE, DATABASE_NAME, and DATABASE_PASSWORD, and django auth test fail. How is this even possible? I also tried adding TEMPLATE_CONTEXT_PROCESSORS as suggested at http://stackoverflow.com/questions/2507210/django-failing-tes...

Django Piston issue - "oauth_user_auth() takes exactly 1 argument (2 given)"

I am having a few problems setting up Django Piston. I have managed to get as far as generating authentication via the oauth_client.py sample shown here (http://github.com/clemesha/django-piston-oauth-example). When I run "python oauth_client.py" i am taken to http://localhost:8000/api/oauth/authorize/?oauth_token=8wm33jeWR92BpsrHjs wher...

Sending emails when a user is activated in the Django admin

I'm about to create a site that has monitored registration in that only certain people are allowed to register. Undoubtedly some misfits will register despite any writing I put above the registration form so we're going with moderation. Upon registration a django.contrib.auth User and profile will be created and an email will be sent to...

Django: How to keep track of a linear (yet flexible) project management workflow?

I'm developing a project management application in Django that requires a somewhat linear response process involving different groups of users (as in Django auth Groups). Each step in the response process has several response options (most options unique to the step) and is assigned to a user within a particular group. The next step in...

Django 3rd Party Auth Systems

Hi all, I am considering a 3rd part Authentication system for logging in (new/old) users. Much like how StackOverflow authenticates it's users. This scheme is good as it frees me from doing authentication from my side. I need this - Login using Google, Facebook, Twitter, Yahoo, OpenID Authentication Systems. Provide the same user logge...

How to make Django admin site accessed by non-staff user?

Hello all, I would like to implement a 2nd admin site which provides a subset of feature of the primary admin site. That's possible and described in the Django docs However, I would like to limit access on the primary admin site. Some users can access the 2ndary site but not the primary site. In order to implement that feature, I woul...

Django - How to save and continue editing when adding a new user from related model?

Is it possible to get a save and continue to edit functionality on the creation of a user when clicking on the "+" in a related model? for example here's a model: class Example(models.Model): user = model.ForeignKey(User) ... ... When in the Add/Edit admin screen for Example objects when a user wants/needs to add a new user t...