Re: Custom User models

2023-11-28 Thread Okkert Joubert
x27;__all__' > > class SchoolSerializer(serializers.ModelSerializer): > class Meta: > model = School > fields = '__all__' > > * > at the end > python manage.py makemigrations > python manage.py migrate > > and enjoy > > On Mon, Nov 27

Re: Custom User models

2023-11-27 Thread Ahmed Iftikhar
at the end python manage.py makemigrations python manage.py migrate and enjoy On Mon, Nov 27, 2023 at 8:10 PM Okkert Joubert wrote: > Good morning all, > > I made a custom user model for a school, it is currently working with > djoser authentication, now wh

Re: Custom User models

2023-11-27 Thread Clive Bruton
I am taking it that there is more than one "school"? If so, surely it's is just a many-to-many relationship. On 27 Nov 2023, at 09:33, Okkert Joubert wrote: Good morning all, I made a custom user model for a school, it is currently working with djoser authentication, now

Custom User models

2023-11-27 Thread Okkert Joubert
Good morning all, I made a custom user model for a school, it is currently working with djoser authentication, now what I want to add is for the school to add users, so my School model is a foreignkey in SchoolUser is this possible firstly and secondly can I add the djoser authentication to

Re: Custom user model password is not hashed

2023-01-26 Thread Namanya Daniel
. >>> I'm also getting the same error in one of my project, can't figure out how >>> to solve it. >>> >>> On Friday, November 13, 2015 at 6:11:09 PM UTC+5:30 >>> benjamin...@gmail.com wrote: >>> >>>> The problem was, when

Re: Custom user model password is not hashed

2023-01-26 Thread James
Yup, 100% correct. Glad to hear you fixed it. Custom user models that inherit from the abstractbaseuser class can be a little tricky at first. On Friday, November 13, 2015 at 5:41:09 AM UTC-7 benjamin...@gmail.com wrote: > The problem was, when creating a custom user, one has to defin

Re: Custom user model password is not hashed

2023-01-25 Thread Roger Mukai
6:11:09 PM UTC+5:30 benjamin...@gmail.com >> wrote: >> >>> The problem was, when creating a custom user, one has to define a custom >>> model form and model admin that handles the password properly. After that >>> it was solved. >>> >>>

Re: Custom user model password is not hashed

2022-12-06 Thread Sage
can't figure out how to > solve it. > > On Friday, November 13, 2015 at 6:11:09 PM UTC+5:30 benjamin...@gmail.com > wrote: > >> The problem was, when creating a custom user, one has to define a custom >> model form and model admin that handles the password properl

Re: Custom user model password is not hashed

2022-05-07 Thread Tejas Agrawal
Hey Benjamin, can you please share your github repo for the same code. I'm also getting the same error in one of my project, can't figure out how to solve it. On Friday, November 13, 2015 at 6:11:09 PM UTC+5:30 benjamin...@gmail.com wrote: > The problem was, when creating a cus

Custom User App

2021-11-10 Thread bnmng
Hi Django people. I request your thoughts on a custom user app. It's called 'TougshireAuth', but my intent is that it be renamed and hacked each time it is added to a new project. Otherwise it's not really a custom user I would appreciate feedback. I'm an amateur who

Custom User error

2021-10-18 Thread Jose Cabrera
Greetings, I am starting in the world of django and I have some problems with a custom user, for the registration of users to the database, the example that I have works 100% with the user that comes by default allows me to render the registration form user without any inconvenience, but when

Custom User error

2021-10-18 Thread Jose Cabrera
Greetings, I am starting in the world of django and I have some problems with a custom user, for the registration of users to the database, the example that I have works 100% with the user that comes by default allows me to render the registration form user without any inconvenience, but when

Custom User error

2021-10-18 Thread Jose Cabrera
Saludos, me estoy iniciando en el mundo de django y tengo algunos problemas con un usuario personalizado, para el registro de usuarios a la base de datos, el ejemplo que tengo funciona al 100% con el usuario que viene por defecto me permite renderizar el formulario de registro de usuario sin ni

Re: When you app depends on a custom user model

2021-10-11 Thread bnmng
e no problem in doing that. >> >> Regards, David >> >> On Sun, Oct 10, 2021 at 3:02 AM bnmng wrote: >> >>> Django "strongly recommends" you create custom user, and in your apps >>> you can refer to the custom user with "settings.AUT

Re: When you app depends on a custom user model

2021-10-11 Thread bnmng
Regards, David > > On Sun, Oct 10, 2021 at 3:02 AM bnmng wrote: > >> Django "strongly recommends" you create custom user, and in your apps you >> can refer to the custom user with "settings.AUTH_USER_MODEL" or with >> get_user_model(). >>

Re: When you app depends on a custom user model

2021-10-10 Thread David Nugent
Why not just edit the migration file directly and substitute 'my_custom..' for settings.AUTH_USER_MODEL? There should be no problem in doing that. Regards, David On Sun, Oct 10, 2021 at 3:02 AM bnmng wrote: > Django "strongly recommends" you create custom user, and

Re: When you app depends on a custom user model

2021-10-09 Thread Harouna Diallo
I agree Le sam. 9 oct. 2021 à 16:02, bnmng a écrit : > Django "strongly recommends" you create custom user, and in your apps you > can refer to the custom user with "settings.AUTH_USER_MODEL" or with > get_user_model(). > > Here's the problem. If you d

When you app depends on a custom user model

2021-10-09 Thread bnmng
Django "strongly recommends" you create custom user, and in your apps you can refer to the custom user with "settings.AUTH_USER_MODEL" or with get_user_model(). Here's the problem. If you develop an app which refers to the custom user, the migrations won't b

Re: bulk_create() and custom user model

2021-08-17 Thread Isanur Sardar
Hey, you can upload the file through a form, and in the backend, you can store the file in temporary memory with the BytesIO method and then read it with CSV library and then loop through row and then use bulk_create On Monday, August 9, 2021 at 7:07:16 AM UTC+5:30 bi...@deltaops.tech wrote: >

Re: Custom User

2021-05-06 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.2/topics/auth/passwords/#django.contrib.auth.hashers.make_password On Thu, May 6, 2021, 6:46 PM Owen Murithi wrote: > How do I make password for AbstractUser Hashed? > > -- > You received this message because you are subscribed to the Google Groups > "Django u

Custom User

2021-05-06 Thread Owen Murithi
How do I make password for AbstractUser Hashed? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussio

Re: Custom User Model

2021-04-09 Thread Ángeles
For creating Custom Users I have found util the tutorial: Creating a Custom User Model in Django of Michael Herman https://testdriven.io/blog/django-custom-user-model/ Best wishes. Ángeles. El domingo, 4 de abril de 2021 a la(s) 05:03:37 UTC-5, manue...@gmail.com escribió: > Hi Amit

Re: Custom User Model

2021-04-04 Thread Manuel Buri
: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail> On Sun, 4 Apr 2021 at 07:00, 'Amitesh Sahay' via Django users < django-users@googlegroups.com> wrote: > Hello Manuel, > > Try the below. Recently I have worked on custom user model: > > class Accou

Re: Custom User Model

2021-04-03 Thread 'Amitesh Sahay' via Django users
Hello Manuel,  Try the below. Recently I have worked on custom user model: class AccountManager(BaseUserManager): def create_superuser(self, email, password, **extra_fields): extra_fields.setdefault('is_staff', True) extra_fields.setdefault('is_s

Custom User Model

2021-04-03 Thread Manuel Buri
Hi, I have a custom user model (see below) with inheritance from AbstractBaseUser and PermissionMixin. Therefore I have not only the auth_group, auth_group_permissions and auth_permissions tables but also those for my custom user model called 'Account'. Currently I have the followi

Re: Django Custom User model and making auth api

2021-04-03 Thread 'Ajay Rathore' via Django users
wrote: >>>> >>>> Hello every i m currently working on a project where had to overwrite >>>> the AbstractBaseUser and i did follow some tutorial : >>>> https://testdriven.io/blog/django-custom-user-model/ >>>> >>>> But now I need t

Re: Django Custom User model and making auth api

2021-04-03 Thread Ayser shuhaib
:10 AM CDT, Saad Mrabet wrote: >>> >>> Hello every i m currently working on a project where had to overwrite >>> the AbstractBaseUser and i did follow some tutorial : >>> https://testdriven.io/blog/django-custom-user-model/ >>> >>> But now I n

Re: Django Custom User model and making auth api

2021-04-03 Thread Saad Mrabet
e Django Rest > Framework". > > > On April 2, 2021 1:59:10 AM CDT, Saad Mrabet wrote: >> >> Hello every i m currently working on a project where had to overwrite >> the AbstractBaseUser and i did follow some tutorial : >> https://testdriven.io/blog/django-c

Re: Django Custom User model and making auth api

2021-04-03 Thread Saad Mrabet
n Saturday, April 3, 2021 at 12:26:17 AM UTC+1 embedded...@gmail.com wrote: > Please see this tutorial as it explained how to create a custom user model > and uses django-rest-auth for the (login, logout, signup ...etc) > > https://youtu.be/GdfLXHhNABE > > > On Sat, 03 Apr

Re: Django Custom User model and making auth api

2021-04-02 Thread Ayser shuhaib
Please see this tutorial as it explained how to create a custom user model and uses django-rest-auth for the (login, logout, signup ...etc) https://youtu.be/GdfLXHhNABE On Sat, 03 Apr 2021 at 00:50, Ryan Nowakowski wrote: > I don't have a ton of experience with it but when a question

Re: Django Custom User model and making auth api

2021-04-02 Thread Ryan Nowakowski
where had to overwrite >the AbstractBaseUser and i did follow some tutorial : >https://testdriven.io/blog/django-custom-user-model/ > >But now I need to make a good login API, so later I can log in with my >React app, and i m kinda lost any recommendation about any tutorial ? > >

Django Custom User model and making auth api

2021-04-02 Thread Saad Mrabet
Hello every i m currently working on a project where had to overwrite the AbstractBaseUser and i did follow some tutorial : https://testdriven.io/blog/django-custom-user-model/ But now I need to make a good login API, so later I can log in with my React app, and i m kinda lost any

Re: Add user email verification to custom user model

2021-03-12 Thread Manuel Buri
Thank you very much for your help. I made it work! Please let me know if I need to explain it to someone else. Best wishes, Manuel Manuel Buri T: +41 79 933 01 11 M: manuel.b...@gmail.com W: www.manuelburi.com On Tue, 9 Mar 2021 at 17:54, Kasper Lau

Re: Add user email verification to custom user model

2021-03-09 Thread Kasper Laudrup
On 09/03/2021 17.22, Gabriel Araya Garcia wrote: Your ask is not clear,..What is wrong ? What is the error message? If you need validate the email format, here is one javascript example : Actually, it is far from trivial or close to impossible to correctly validate an email address using, eg

Re: Add user email verification to custom user model

2021-03-09 Thread Kasper Laudrup
On 09/03/2021 17.37, Manuel Buri wrote: And know I would like to implement an email verification step that sets the user to active when verified using allauth django package. But I do not know how to do it... https://studygyaan.com/django/how-to-signup-user-and-send-confirmation-email-in-dj

Re: Add user email verification to custom user model

2021-03-09 Thread Manuel Buri
alert("Error: La dirección de correo " + x + " es > incorrecta."); > document.getElementById("correo").value = ""; > } > } > } > > Regards, > > Gabriel Araya Garcia > GMI - Desarrollo de Sistemas In

Re: Add user email verification to custom user model

2021-03-09 Thread Gabriel Araya Garcia
"); document.getElementById("correo").value = ""; } } } Regards, Gabriel Araya Garcia GMI - Desarrollo de Sistemas Informáticos Santiago of Chile El mar, 9 mar 2021 a las 11:47, Manuel Buri () escribió: > Hi, I am a bit lost while trying to add user email verificati

Add user email verification to custom user model

2021-03-09 Thread Manuel Buri
Hi, I am a bit lost while trying to add user email verification step to my custom user model that is based on AbstractBaseUser. Did someone do that already or if not how should I do it differently? Thank you so much! -- You received this message because you are subscribed to the Google Groups

Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Gabriel Araya Garcia
Davansh: The tables are made already in Admin Django, you only have to build template (html), and the view. For example, in views.py: def login_ini(request): variable1 = 'Pantalla de Acceso al Sistema' error_log = 'ok' username = request.POST.get('username') password = request.POST

Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Chelsea Fan
ieve this? > > > > https://docs.djangoproject.com/en/3.1/topics/auth/customizing/ > https://testdriven.io/blog/django-custom-user-model/ > > https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html > https://learndjango.com/tutorials/django-c

Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Kasper Laudrup
can I achieve this? Or what are the ways to achieve this? https://docs.djangoproject.com/en/3.1/topics/auth/customizing/ https://testdriven.io/blog/django-custom-user-model/ https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html https://learndjango.com/tuto

Create a custom User model and Authenticate with it

2021-03-03 Thread Devansh Soni
Hi, I'm currently working on a Django project in which I have to create a User model with fields such as username, email, college, branch, semester, password, etc. And use this model to authenticate a user with an email and password. How can I achieve this? Or what are the ways to achieve thi

reg: Custom User model

2021-01-06 Thread 'Amitesh Sahay' via Django users
Hi,  I have created a custom User model as show below models.py Regards, Amitesh Sahay91-750 797 8619 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: Can't create custom user model

2020-11-30 Thread Vasiliy Chernykh
gt; On 11/23/20 9:05 AM, Charles Freeman wrote: >> > Hey everyone I can't create a custom user model. Every time I try to >> > create super user I end up with an error message saying username is not >> > present pls help me thanks >> > >> >> h

Re: Can't create custom user model

2020-11-24 Thread Derek
And this: https://stackoverflow.com/help/minimal-reproducible-example On Monday, 23 November 2020 at 15:59:50 UTC+2 Kasper Laudrup wrote: > On 11/23/20 9:05 AM, Charles Freeman wrote: > > Hey everyone I can't create a custom user model. Every time I try to > > create supe

Re: Can't create custom user model

2020-11-23 Thread Kasper Laudrup
On 11/23/20 9:05 AM, Charles Freeman wrote: Hey everyone I can't create a custom user model. Every time I try to create super user I end up with an error message saying username is not present pls help me thanks https://stackoverflow.com/help/how-to-ask -- You received this me

Can't create custom user model

2020-11-23 Thread Charles Freeman
Hey everyone I can't create a custom user model. Every time I try to create super user I end up with an error message saying username is not present pls help me thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: reusable App XOR custom user model?

2020-11-05 Thread Andréas Kühne
Like Ani said, There are different use cases. If you want to make a reusable app - that can be put up on pypi for example - then you shouldn't add a custom user model, but you can connect to the user model instead (this was previously recommended in django with the "UserProfile

Re: reusable App XOR custom user model?

2020-11-04 Thread ANi
Hi Thomas, The first one focuses on "project" and the second one focuses on "apps". They don't contradict with each, a project may use many apps, they are different. If you want a reusable app then don't include a custom user model in it. Ani. guettli 在 2020年11

reusable App XOR custom user model?

2020-11-03 Thread guettli
Quoting the Docs <https://docs.djangoproject.com/en/3.1/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project> : *> If you’re starting a new project, it’s highly recommended to set up a custom user model, even if the default User <https://docs.djangoproject.co

Re: FieldError regarding custom User model which overrides the default auth User model

2020-09-16 Thread coolguy
*django.contrib.auth.models*. I did it following this > <https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#auth-custom-user> > > guide. > > Here you can find the models.py <https://dpaste.org/pZV9> file for the > app where my new User class is define

FieldError regarding custom User model which overrides the default auth User model

2020-09-16 Thread John Reese
lt;https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#auth-custom-user> guide. Here you can find the models.py <https://dpaste.org/pZV9> file for the app where my new User class is defined, as well as the settings.py <https://dpaste.org/tS8R> code for my overall project (i

Re: Tried to migrate custom user model and got this error shown below

2020-08-09 Thread Yemin Sajid
. Make a backup of your data 2. Delete the tables of admin, auth and django_migration apps. 3. Apply the migrations 4. Insert the old users into your new custom user table. On Mon, Aug 10, 2020 at 12:01 AM Ayser shuhaib wrote: > Truro delete the files inside the migrations folder then run

Re: Tried to migrate custom user model and got this error shown below

2020-08-09 Thread Ayser shuhaib
Truro delete the files inside the migrations folder then run The makemigrations command then migrate On Sun, 09 Aug 2020 at 19:58, FIRDOUS BHAT wrote: > django.db.migrations.exceptions.InconsistentMigrationHistory: Migration > admin.0001_initial is applied before its dependency users.0001_initia

Tried to migrate custom user model and got this error shown below

2020-08-09 Thread FIRDOUS BHAT
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.0001_initial on database 'default'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: Need Help : Custom User Model

2020-07-22 Thread Exactly musty
Reach me I would give you my github repo to copy it from -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this

Re: Need Help : Custom User Model

2020-07-22 Thread Exactly musty
Months ago I was looking for those same thing, I read the doc but wasnt clear enough I had to follow tutorials not until I learnt it, now I use it on all my project, which i added django allauth but i recommend reading this and following this tutorial, if you a newbie custom user model can be

Need Help : Custom User Model

2020-07-22 Thread Joel T
I'm a newbie to web development and more so with the use of django. How do I create a custom user model that has additional fields for other users of my web app while keeping the default django user model for myself - mid-project. I appreciate the help. Thanks. -- You received this me

Re: How to make Custom User Registration and Login

2020-05-31 Thread sunday honesty
gave your login url. On Sun, May 31, 2020, 3:37 PM Abhi Mathew wrote: > Here: Django Custom User Model > <https://learnitfree.org/django-custom-user-model/> > I don't how familiar you are with Django but this post will help you > anyhow! > > On Wednesday, May 6, 2020

Re: How to make Custom User Registration and Login

2020-05-31 Thread Abhi Mathew
Here: Django Custom User Model <https://learnitfree.org/django-custom-user-model/> I don't how familiar you are with Django but this post will help you anyhow! On Wednesday, May 6, 2020 at 3:39:29 PM UTC+5:30, Anubhav Madhav wrote: > > I am new to Django. I need to make a custo

Re: How to make Custom User Registration and Login

2020-05-07 Thread Anubhav Madhav
atch?v=oZUb372g6Do > https://docs.djangoproject.com/en/3.0/topics/auth/customizing/ > https://testdriven.io/blog/django-custom-user-model/ > > https://www.codingforentrepreneurs.com/blog/how-to-create-a-custom-django-user-model > > > On Wed, May 6, 2020 at 8:57 PM Camilo G

Re: How to make Custom User Registration and Login

2020-05-07 Thread Anubhav Madhav
Thankyou Camilo!! On Wednesday, 6 May 2020 20:42:10 UTC+5:30, Camilo Garcia wrote: > > This might come in handy > https://learndjango.com/tutorials/django-custom-user-model > > On Wednesday, May 6, 2020 at 5:09:29 AM UTC-5, Anubhav Madhav wrote: >> >> I am new to Djan

Re: How to make Custom User Registration and Login

2020-05-06 Thread Kushal Neupane
-user-model/ https://www.codingforentrepreneurs.com/blog/how-to-create-a-custom-django-user-model On Wed, May 6, 2020 at 8:57 PM Camilo Garcia wrote: > This might come in handy > https://learndjango.com/tutorials/django-custom-user-model > > On Wednesday, May 6, 2020 at 5:09:29 AM UT

Re: How to make Custom User Registration and Login

2020-05-06 Thread Camilo Garcia
This might come in handy https://learndjango.com/tutorials/django-custom-user-model On Wednesday, May 6, 2020 at 5:09:29 AM UTC-5, Anubhav Madhav wrote: > > I am new to Django. I need to make a custom sign up and log in page. > Because, during Sign Up, I also want to get User'

How to make Custom User Registration and Login

2020-05-06 Thread Anubhav Madhav
I am new to Django. I need to make a custom sign up and log in page. Because, during Sign Up, I also want to get User's Address and Contact Number. In Django's 'User' module, it isn't supported. So, how can I make a custom sign up and sign in page. Please Help!! -- You received this message b

Re: Custom User

2020-03-06 Thread Antje Kazimiers
... class UserProfile(models.Model):     class Meta:     verbose_name_plural = "User Profiles"     user = models.ForeignKey(User, related_name='user_profile', unique=True)     user_type = models.CharField(max_length=1, choices=USER_TYPE, default='h') You could a

Custom User

2020-03-05 Thread Kushal Neupane
I am trying to build a resturant management system. I made a super user. Now, i am trying to make cashier and finance users which must be assign by the super admin. Can i do it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

djoser and custom user model

2020-02-19 Thread Emmanuel klutse
Hello team, I need help with understanding how djoser and custom user model works better. Problem breakdown First, I’m trying to manage my system users. I want to implement customers, employees, and admin as users in the system. I want to know if I should create a separate table in my DB for

Re: Is a Custom User Model worth the headache?

2020-02-15 Thread Mike Dewhirst
Thank you kind sir 😀Makes perfect sense ...Mike Original message From: Carsten Fuchs Date: 15/2/20 23:33 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: Is a Custom User Model worth the headache? Hi Mike,Am 2020-02-14 um 23:30 schrieb Mike Dewhirst:> In y

Re: Is a Custom User Model worth the headache?

2020-02-15 Thread Carsten Fuchs
Hi Mike, Am 2020-02-14 um 23:30 schrieb Mike Dewhirst: > In your documentation you mention "from accounts.models import User" > > I have been maybe taking things too literally. After migrating to my custom > user I have used "from django.contrib.auth import get_user_

Re: Is a Custom User Model worth the headache?

2020-02-14 Thread Mike Dewhirst
On 14/02/2020 7:32 pm, Carsten Fuchs wrote: Am 14.02.20 um 09:03 schrieb Mike Dewhirst: Definitely start a new project with a custom user and I would consider aborting an existing project to restart with a custom user if it was started with the standard user. Which may not be possible for

Re: Is a Custom User Model worth the headache?

2020-02-14 Thread maninder singh Kumar
It really depends on what you want to do with your user authentication Sent from my iPad > On 14-Feb-2020, at 2:02 PM, Carsten Fuchs wrote: > >> Am 14.02.20 um 09:03 schrieb Mike Dewhirst: >> Definitely start a new project with a custom user and I would consider >&

Re: Is a Custom User Model worth the headache?

2020-02-14 Thread Carsten Fuchs
Am 14.02.20 um 09:03 schrieb Mike Dewhirst: > Definitely start a new project with a custom user and I would consider > aborting an existing project to restart with a custom user if it was started > with the standard user. Which may not be possible for large, existing projects. Switc

Re: Is a Custom User Model worth the headache?

2020-02-14 Thread Mike Dewhirst
I agree. The custom user will be essential for you one day and the pain of retrofitting it is hard. I have done a retrofit and don't recommend it unless you have no other choice. Definitely start a new project with a custom user and I would consider aborting an existing project to re

Re: Is a Custom User Model worth the headache?

2020-02-13 Thread maninder singh Kumar
om my iPad > On 13-Feb-2020, at 9:00 PM, bnmng wrote: > > Thanks for the reply. That is a good post and I'll go along with the > recommendation, though I still don't completely understand why adding a > profile isn't as good as creating a custom user, and I wish I

Re: Is a Custom User Model worth the headache?

2020-02-13 Thread bnmng
Thanks for the reply. That is a good post and I'll go along with the recommendation, though I still don't completely understand why adding a profile isn't as good as creating a custom user, and I wish I could figure out how to group custom users and auth groups together in

Re: Is a Custom User Model worth the headache?

2020-02-13 Thread SikoraD
Hi Ben, I'll highly recommended to read fantastic post on Will Vincent <https://wsvincent.com/> blog -> https://wsvincent.com/django-tips-custom-user-model/ His approach is much easier than one on django website and it is worth to have look. Also his djangox repo on github

Custom User and Profile Model

2020-01-28 Thread 'dtdave' via Django users
I have created a Custom User Model and a Profile model that is created when a user registers with the site. I just want some confirmation that my logic is right. To avoid the error when creating a superuser "Custom users have no profile" I have put the following in my s

Re: Does a custom user model require first_name and last_name fields

2020-01-20 Thread Suraj Thapa FC
gt; > I think the right solution is to remove the first_name and last_name user > models from the custom user model. Will this cause problems? > > I can sensibly override methods like get_full_name() > > Thanks for any help. > <https://docs.

Does a custom user model require first_name and last_name fields

2020-01-20 Thread graeme
I have people's first names and last names in another model (because not all people in the DB are users). Therefore if I store names in the user model I will duplicate data. I think the right solution is to remove the first_name and last_name user models from the custom user model. Will

Solved [Was: How can I use a custom widget in the Admin for a custom user]

2020-01-07 Thread Mike Dewhirst
ences. Or at least I couldn't get either to work so your mileage may vary. What did work (for me) was the following ... #common.admin.py (common is my custom-user app) from django.contrib.auth.admin import UserAdmin from common.widgets import CommonFilteredSelectMultiple class Commo

How to inherit a model for Custom User with Different Module

2020-01-06 Thread Pravin Yadav
Hello Friends, We have created the three groups. 1:- Super User 2:- Company 3:- User And also We have created a custom user in django admin. We want to create a separate module but same database table. Kindly help us. Thanks, Pravin Kumar Yadav 8743064255 -- You received this message because

How can I use a custom widget in the Admin for a custom user

2020-01-06 Thread Mike Dewhirst
Sorry for being boring  ... I cannot persuade the UserAdmin to use a custom widget instead of the one it usually uses. If you can point out where I'm going wrong I will be indebted to you.  I have tried two ways of using a custom widget ... 1. https://docs.djangoproject.com/en/2.2/ref/contr

Withdrawn [Was: Is this a bug OR How can I use a custom widget in the Admin for a custom user]

2020-01-05 Thread Mike Dewhirst
On 6/01/2020 4:31 pm, Mike Dewhirst wrote: It appears that formfield_for_manytomany() triggers an error if it is used in UserAdmin. Thanks for any support in deciding if this is a bug - or perhaps all my own work. I needed to finish formfield_for_manytomany() with a return super().formfield

Is this a bug OR How can I use a custom widget in the Admin for a custom user

2020-01-05 Thread Mike Dewhirst
It appears that formfield_for_manytomany() triggers an error if it is used in UserAdmin. Thanks for any support in deciding if this is a bug - or perhaps all my own work. Cheers Mike TL;DR Here is all the admin code which works without error if formfield_for_manytomany()is commented out .

Draft documentation of case study - Custom user model mid-project #2

2019-12-30 Thread Mike Dewhirst
Custom user documentation (Draft subject to improvements from others) Based on Tobias McNulty's "How to Switch to a Custom Django User Model Mid-Project" [1] and also on Aymeric Augustin's approach documented in Django ticket #25313 [2] Assumptions - Existing project w

Draft documentation of case study - Custom user model mid-project

2019-12-26 Thread Mike Dewhirst
Custom user documentation (Draft subject to improvements from others) Based on Tobias McNulty's "How to Switch to a Custom Django User Model Mid-Project" [1] and also on Aymeric Augustin's approach documented in ticket Django ticket #25313 [2] Assumptions - Existing proj

Re: Changing to a custom user model mid-project

2019-12-26 Thread Mike Dewhirst
ymmv) I am confirming :)CheersMike  Original message From: Carsten Fuchs Date: 26/12/19 20:01 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: Changing to a custom user model mid-project Hello Mike,unfortunately I cannot answer your questions, but have you

Re: Changing to a custom user model mid-project

2019-12-26 Thread Carsten Fuchs
Hello Mike, unfortunately I cannot answer your questions, but have you considered contacting Tobias directly? I too am currently at the point of switching two of my projects to a custom user model. But honestly, Tobias' procedure looks complicated and error prone to me. Aymeric's d

Changing to a custom user model mid-project

2019-12-19 Thread Mike Dewhirst
p.com/blog/2019/04/26/how-switch-custom-django-user-model-mid-project/ by Tobias McNulty as a variation of Django docs https://docs.djangoproject.com/en/2.2/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project TL;DR Custom user documentation (UNFINISHED DRAFT) Based on Tobias McNu

Re: Should a custom user have meta.swappable

2019-12-17 Thread Mike Dewhirst
Thank you James M On 18/12/2019 5:57 pm, James Bennett wrote: On Tue, Dec 17, 2019 at 10:47 PM Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: ... and I wonder if my custom user model should have an identical Meta attibute? No, The 'swappable' Meta a

Re: Should a custom user have meta.swappable

2019-12-17 Thread James Bennett
On Tue, Dec 17, 2019 at 10:47 PM Mike Dewhirst wrote: > ... and I wonder if my custom user model should have an identical Meta > attibute? > No, The 'swappable' Meta attribute is private/undocumented API; if it were meant to be a thing you needed to set, the documentation wo

Should a custom user have meta.swappable

2019-12-17 Thread Mike Dewhirst
  class Meta(AbstractUser.Meta):     swappable = 'AUTH_USER_MODEL' ... and I wonder if my custom user model should have an identical Meta attibute? Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from thi

Re: extending a custom user (AbstractBaseUser) and displaying in admin

2019-11-24 Thread Elico
gt;> moorestephen...@gmail.com) >> >> On Sat., 23 Nov. 2019, 11:26 am Elic, wrote: >> >>> Hi, >>> >>> Hope you are all doing well. >>> >>> I had to change the User object to support several use-cases in my >>> syst

Re: extending a custom user (AbstractBaseUser) and displaying in admin

2019-11-24 Thread Motaz Hejaze
new Year. ( > moorestephen...@gmail.com) > > On Sat., 23 Nov. 2019, 11:26 am Elic, wrote: > >> Hi, >> >> Hope you are all doing well. >> >> I had to change the User object to support several use-cases in my system. >> >> I have created a custom Us

Re: extending a custom user (AbstractBaseUser) and displaying in admin

2019-11-23 Thread Underground Creatorz
Hello all. Have a merry christmas and happy new Year. ( moorestephen...@gmail.com) On Sat., 23 Nov. 2019, 11:26 am Elic, wrote: > Hi, > > Hope you are all doing well. > > I had to change the User object to support several use-cases in my system. > > I have created a cu

extending a custom user (AbstractBaseUser) and displaying in admin

2019-11-22 Thread Elic
Hi, Hope you are all doing well. I had to change the User object to support several use-cases in my system. I have created a custom User object that extends AbstractBaseUser.This object only has email, password, last_login and the permissions (is_stuff, is_superuser). I also created

Re: Make an Heroku connect model my app's custom user model

2019-07-17 Thread Yoo
sure. On Wednesday, July 17, 2019 at 11:26:04 AM UTC-4, Elia Gandolfi wrote: > > # I want this Heroku-Connect model to be my app's custom user model. > # That means, vendors registered in my Salesforce database should be able > to login with their vendor_code__c as username > c

Make HerokuConnect model my Django custom user model

2019-07-17 Thread 'Elia Gandolfi' via Django users
# I want this Heroku-Connect model to be my app's custom user model. # That means, vendors registered in Salesforce should be able to login with their vendor_code__c as username class Vendor(hc_models.HerokuConnectModel): sf_object_name = 'Vendor__c' vendor_code = hc_mo

Make an Heroku connect model my app's custom user model

2019-07-17 Thread 'Elia Gandolfi' via Django users
# I want this Heroku-Connect model to be my app's custom user model. # That means, vendors registered in my Salesforce database should be able to login with their vendor_code__c as username class Vendor(hc_models.HerokuConnectModel): sf_object_name = 'Vendor__c

  1   2   3   4   >