Questions tagged [django-users]

User model is the default model in Django. It provides many APIs which are helpful for working with users. Django user model is overridable in a Project according to required field.

Django(a high-level Python Web framework) comes with a user authentication system. It handles user accounts, groups, permissions and cookie-based user sessions.

894 questions
0
votes
1 answer

How to create users with default password?

I'm creating a form with UserCreationForm to create users but I need that the form just ask for username and email, and assign a default password to each account. So they can change it later.
Marco
  • 315
  • 1
  • 3
  • 13
0
votes
2 answers

Django SiteProfileNotAvailable error

I'm getting the following error from userna: SiteProfileNotAvailable I know what the error means but the path in AUTH_PROFILE_MODULE is correct, so why I'm I getting this error? Thanks settings.py # My apps INSTALLED_APPS += ( …
GrantU
  • 6,325
  • 16
  • 59
  • 89
0
votes
2 answers

Auth filter full name

I need to filter Users (from auth.user) based on their full names. I know I can address a user's full name by user.get_full_name(), but is it possible to filter by this attribute? I need to do something like, user = User.objects.filter( ... ), but…
Daniel Rosenthal
  • 1,386
  • 4
  • 15
  • 32
0
votes
1 answer

providing a profile for anonymous user

I am creating a django app where users answer different questions in a survey, but if they have not logged in, their votes will be removed after three days. The way I do it at the moment is as follows: Once an anonymous user tries to answer a…
Amelse Etomer
  • 1,253
  • 10
  • 28
0
votes
1 answer

Multiple User Profile with Django Userena

I'm using userena 1.2 and Django 1.4. I'm trying to create multiple user profiles but I had no luck following many post found here on SO. I've create 2 custom Models and a form like so: class BaseProfile(UserenaBaseProfile): """ Default profile…
Leonardo
  • 4,046
  • 5
  • 44
  • 85
0
votes
1 answer

How can I order the native django users in the django admin page based on creation time?

I wanted to know if there was a way of ordering the Django users on the django admin page based on creation time rather than alphabetical order. To be honest, it can be ordered by creation time or the id. But the order needs to be from latest users…
deadlock
  • 7,048
  • 14
  • 67
  • 115
0
votes
1 answer

Extending user with user profile in django(1.3)

I am following the link https://stackoverflow.com/a/965883/1657010 for extending the django user to a user profile. #in models.py from django.contrib.auth.models import User from django.db.models.signals import post_save class…
Neo_32
  • 225
  • 4
  • 13
0
votes
1 answer

Django broken OneToOneField

I have an app running and I made a huge mistake, I've deleted a user from the admin site of my Django app before deleting it's UserProfile. Now, when I try to see the UserProfiles from the admin site, I keep getting an error, for what I've seen it's…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

Django subclass a third party app for User model

Say I have some third party application that I want to subclass, lets call it ThirdPartyClass. I want to subclass this to create a genereal user, and then have the flexibility to subclass the general user for more specific ones. It would look…
Joker
  • 2,119
  • 4
  • 27
  • 38
0
votes
4 answers

Django user inactivity

Is there any way to see if a user is inactive for a certain amount of time? For example Twitter sends out an email to it's users after a certain amount of time of inactivity. I would like to implement a similar feature where if a user has been…
deadlock
  • 7,048
  • 14
  • 67
  • 115
0
votes
0 answers

Comparing variables in Django templates

I want to compare a variable in django template. Problem is as follows. I am loading a set of photos in a page. When a template is loaded, it contains all the photos. But when a user clicks on edit button, i want that only properties of photos saved…
Neil
  • 1,715
  • 6
  • 30
  • 45
0
votes
2 answers

how do i get the string inside the charfield in django?

I'm trying to create a user in my model by calling the create_user function but I want it to have properties of what the user enters into my model. How do I do this? This is what I have: class Person(models.Model): #basic information …
Matt M
  • 149
  • 2
  • 4
  • 17
0
votes
3 answers

Django 1.5 custom user model - signals limitation

It's written in the doc that: Another limitation of custom User models is that you can’t use django.contrib.auth.get_user_model() as the sender or target of a signal handler. Instead, you must register the handler with the resulting User model. See…
lajarre
  • 4,910
  • 6
  • 42
  • 69
0
votes
1 answer

Django - accidently removed superuser

I am using Django 1.4.5 and accidentally deleted the superuser. How can I recreate the superuser account for an existing project? I found tutorials that show to do it when initially setting up a project but can't figure out how to create a superuser…
bbrooke
  • 2,267
  • 10
  • 33
  • 41
0
votes
1 answer

Django __unicode__ extended Auth_User model

I'm extending a the auth.models.User but I'm having troubles to implement the __unicode__ methode. from django.db import models from django.contrib.auth.models import User class Artist(models.Model): user = models.OneToOneField(User) city…
codingjoe
  • 1,210
  • 15
  • 32