Questions tagged [django-custom-user]

Tag for questions related to custom User model functionality introduced in Django 1.6

268 questions
0
votes
2 answers

Django custom user authentication is not working properly

i am using custom user authentication model which uses an email address as the username and creates the user but even if password1 is different than password2 the registration completes successfully. i am unable to debug the problem. here is…
0
votes
1 answer

Custom user model not working in foreign key

I have created a custom user model which is working fine. The problem is when access the user from foreign key, it throws me : DETAIL: Key (author_id)=(51) is not present in table "auth_user". My custom user is userauth, clearly the model still…
dev-jim
  • 2,404
  • 6
  • 35
  • 61
0
votes
2 answers

Django 1.7 data migration for custom user model

I have created a custom user model for my project. I have written a data migration file to copy contents of auth.User to my new custom user table. It doesn't seem to work properly. It is throwing below error, from django.db import migrations,…
0
votes
1 answer

django-custom-user and custom_user_emailuser (does not exist)

TL;DR - Using django-custom-user and django-registration-redux, I am having trouble setting up a postgres database even on a virgin instance. It complains of a non-existent relationship, and I don't see why or where. The detail of the question…
jma
  • 3,580
  • 6
  • 40
  • 60
0
votes
2 answers

'AnonymousUser' object has no attribute 'backend' customuser

I am using django 1.7 python 3.4 I have created a custom MyUser class which is derived from AbstractBaseUser. Now, when I try to register a user, I am getting the error 'AnonymousUser' object has no attribute 'backend'. views.py def…
sprksh
  • 2,204
  • 2
  • 26
  • 43
0
votes
1 answer

python manage.py runserver Vs foreman start for custom User model

I have an app that uses django_mongodb_engine and mongolab(no python manage.py syncdb required). I also am using foreman as my local server. Procfile: web: gunicorn .wsgi I have the the following custom user model called Registration: class…
chaitanya90
  • 697
  • 2
  • 8
  • 24
-1
votes
1 answer

TypeError: UserAdmin() takes 1 positional argument but 2 were given

I am making an abstract user in which i get this error please solve it . i want make a custom user model django. Error (venv) python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 22, in main() …
-1
votes
1 answer

How to customize the rest auth in django

I want to erase username, password2 field from rest auth and add nickname and profile image. So we made the code as follows, but Nickname and profile image were added normally, but username and password2 were not erased. How can I erase them? Here…
-1
votes
1 answer

How to use post_save signal with custom user model extended with AbstractBaseUser

There are two apps in my ecommerce website and i have been following a particular tutorial on youtube. In the course, the guy used django-allauth package for login purposes. I followed the course along but I created custom user model exending…
-1
votes
1 answer

Why firstname and lastname fields are not entering in database but just the email and password in the customUser i created?

I created a customUser from AbstractBaseUser with fields email, firstname, lastname and password which comes inbuilt and userManager from BaseUserManager as you can see below. But only the email and password are getting commited onto the database,…
-1
votes
1 answer

proper way to set up many to many relation where intermediary field has foreign keys django

I have a custom user field and a permissions field in a django app. The documentation says the following: https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.ManyToManyField I am also currently studying this article:…
-1
votes
1 answer

how to redirect different types of pages for different users after login in django

I have created two different types of users - truck & company using Django. Here is my registration page of a user Registration Page After registering, the data about whether the user is a truck or company will go to the database. In my login page, …
-2
votes
1 answer

getting 403 Forbidden for every update of a post in django

i am trying to add an updateView using class based view to my blog_post whenever i hop in to any post-detail and to the update url like is http://127.0.0.1:8000/pages/blog/15/update/ i get a 403 Forbidden error in which i only want each user to…
Exactman
  • 43
  • 8
1 2 3
17
18