Re: Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-13 Thread Bill Freeman
Many e-mail systems allow you to add a suffix to the username portion of the address, separated by something like a "-", or, last time I checked for gmail, by a "+", and it will still be delivered to the same mailbox. For example, I expect mail sent to ks.kennysoh+ad...@gmail.com will still r

Re: Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-13 Thread Carsten Fuchs
Hello, Am 13.04.20 um 02:59 schrieb Kenny Soh: > * An admin account must not share the same password as the customer account. Your entire problem would become much easier if you just dropped that requirement. Whatever you want to achieve with forcing a single user to keep two passwords, I'm s

Re: Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-12 Thread Ernest Thuku
Option 2 seems good...I could think of it before proceeding to any other option On Apr 13, 2020 04:02, "Kenny Soh" wrote: > Im trying to handle a use case where i have 2 roles. (admin , customer) > > There will be an admin portal and a customer portal (2 different login > pages ). > >- An adm

Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-12 Thread Kenny Soh
Im trying to handle a use case where i have 2 roles. (admin , customer) There will be an admin portal and a customer portal (2 different login pages ). - An admin can invite a customer - An admin can be a customer as well , can invite himself into the customer portal - An admin ac

Re: Django User model

2019-06-25 Thread AMOUSSOU Kenneth
Thank you very much! -- 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 post to this group, send email to django-users

Re: Django User model

2019-06-24 Thread Andrew C.
Like a profile? Try this: https://simpleisbetterthancomplex.com/tutorial/2016/11/23/how-to-add-user-profile-to-django-admin.html On Mon, Jun 24, 2019 at 9:13 AM AMOUSSOU Kenneth wrote: > Hi everyone, > > Is it possible to create different class that will extend the `User` base > class with diffe

Django User model

2019-06-24 Thread AMOUSSOU Kenneth
Hi everyone, Is it possible to create different class that will extend the `User` base class with different attributes? And use those class for authentication Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

django user model error: Hello friends, I keep getting this error; "accounts.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'User.groups'. Please help

2019-06-14 Thread Kenaz Odhiambo
from django.contrib.auth.models import AbstractUser from django.core.validators import ( MinValueValidator, MaxValueValidator, RegexValidator ) from django.db import models from django.utils.translation import ugettext_lazy as _ from .managers import UserManager class User(Abstract

Re: Customising django user model

2019-05-22 Thread אורי
Hi Sipum, We did it on Speedy Net and you can see our models and settings there: https://github.com/speedy-net/speedy-net https://github.com/speedy-net/speedy-net/blob/master/speedy/core/accounts/models.py#L160 https://github.com/speedy-net/speedy-net/blob/master/speedy/core/settings/base_with_lo

Re: Customising django user model

2019-05-20 Thread Sipum Mishra
Thanks a lot.. @Joe @Mahes It will help me a lot. On Tue, 21 May, 2019, 8:14 AM mahesh boini, wrote: > Extend AbstractUser class and give that name in settings file like > AUTH_USER_MODEL=‘appname.modelname’ > > On Tue, 21 May 2019 at 05:51, Joe Reitman wrote: > >> You can customize the user ta

Re: Customising django user model

2019-05-20 Thread mahesh boini
Extend AbstractUser class and give that name in settings file like AUTH_USER_MODEL=‘appname.modelname’ On Tue, 21 May 2019 at 05:51, Joe Reitman wrote: > You can customize the user table by extending AbstractUser and add the > fields you want to add (gender, phone) > > I have a custom user examp

Re: Customising django user model

2019-05-20 Thread Joe Reitman
You can customize the user table by extending AbstractUser and add the fields you want to add (gender, phone) I have a custom user example adding age field: from django.db import models from django.contrib.auth.models import AbstractUser class CustomUser(AbstractUser): age = models.PositiveI

Re: Customising django user model

2019-05-20 Thread Sipum Mishra
Ok thanks for reply. On Mon, 20 May, 2019, 5:36 PM Rafael E. Ferrero, wrote: > Hello, you must to extend User model... search on google with this > aproach!! > > Cheers! > > Rafael E. Ferrero > > > El dom., 19 may. 2019 a las 14:13, Sipum () escribió: > >> Hello Friends, >> >> I want to customis

Re: Customising django user model

2019-05-20 Thread Rafael E. Ferrero
Hello, you must to extend User model... search on google with this aproach!! Cheers! Rafael E. Ferrero El dom., 19 may. 2019 a las 14:13, Sipum () escribió: > Hello Friends, > > I want to customise django default user table and which should consist of > name,phone, email and gender. > And afte

Customising django user model

2019-05-19 Thread Sipum
Hello Friends, I want to customise django default user table and which should consist of name,phone, email and gender. And after that when every time a user logs in, he/she should able to log in through an OTP to phone or email. can anyone guide me What to do here.?? Thanks. Sipum -- You re

Extending Django User model with django-allauth

2019-01-28 Thread Achyut Pandey
I'm using django-allauth and I want to be able to add new field to my User model. What's the best way to do this as of you ? -- 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 a

Re: New to Django: Please Help!! Django User Model not saving first_name, last_name and email - Authentication App

2018-10-30 Thread Adrian Chipukuma
I have sorted it out using a different approach 'AbstractUser'. Thanks On Tue, Oct 30, 2018, 12:19 PM Adrian Chipukuma wrote: > Thanks for the help. Though if I remove the declarations of the > first_name, last_name and email. Then I will not be able to see these in > the Register form

Re: New to Django: Please Help!! Django User Model not saving first_name, last_name and email - Authentication App

2018-10-30 Thread Adrian Chipukuma
Thanks for the help. Though if I remove the declarations of the first_name, last_name and email. Then I will not be able to see these in the Register form.. The fields password1 and password2 are just working well and can be saved... The issue is on the first_name, last_name and email fie

Re: New to Django: Please Help!! Django User Model not saving first_name, last_name and email - Authentication App

2018-10-29 Thread Manjunath
Remove declaration of first_name, last_name & email in Form calss. class SignUpForm(UserCreationForm): class meta(): model = User fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2', ) And while Saving the form, follow below steps. if form.is_v

New to Django: Please Help!! Django User Model not saving first_name, last_name and email - Authentication App

2018-10-29 Thread Adrian Chipukuma
Hello, I am new to Django and enjoying the learning process, unfortunately I am stuck, and I need expert guidance. I am learning through developing a User Authentication System. The system is supposed to have a user registration functionality, login, user profile editing and logout. I have managed

Re: Need help in Django User Model customization and authentication

2017-05-18 Thread Ajat Prabha
Thanks for the reply, Scot, I've some questions here: 1. Is setting up groups necessary if I'm creating shared UserProfile? If not, will groups be anyhow beneficial to this new setup? 2. Shall I create shared UserProfile from User? If yes, how can I handle the need for two passwords,

Re: Need help in Django User Model customization and authentication

2017-05-18 Thread Ajat Prabha
Thanks for your reply, actually I need two passwords, one being normal alphanumeric and other being PIN-based with proper validation and features provided by Django auth core. Is it possible to do that with just extending User model? On Saturday, 13 May 2017 23:59:14 UTC+5:30, Constantine Covtu

Re: Need help in Django User Model customization and authentication

2017-05-14 Thread Scot Hacker
This is a fairly common need in academia, where your users need a different set of profile fields depending on affiliation. And you always end up with edge cases where some people are simultaneously faculty and staff, or even student and faculty, etc. And those "special" people will need to have

Re: Need help in Django User Model customization and authentication

2017-05-13 Thread Constantine Covtushenko
Hi Ajat, It was not clear to me why you do not use 'Extending the existing User model' approach, described here . For me it works very well in almost all cases. And if you go that way then authenti

Need help in Django User Model customization and authentication

2017-05-13 Thread Ajat Prabha
Hello everyone, I'm creating a payment gateway to make transactions on my college campus go cashless. It can be used to pay library dues, stationary charges, etc. The user will add money to a central account and then he/she can use that money virtually. I chose Django because of its security.

Re: Migrating from django user model to a custom user model

2017-03-15 Thread Tim Graham
ns for 'accounts': > accounts/migrations/0001_initial.py: > - Create model User > > $ python manage.py migrate accounts > > Which gives me an error: > > django.db.migrations.exceptions.InconsistentMigrationHistory: Migration > admin.0001_initial is applied before its dependency accoun

Migrating from django user model to a custom user model

2017-03-14 Thread Kakar Nyori
python manage.py migrate accounts Which gives me an error: django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency accounts.0001_initial on database 'default'. How can I migrate from the existing django user mode

Django User Model one-to-one with other model and Forms

2015-12-07 Thread Emad Mokhtar
I want to create a model for teachers and he will has a user to login to the system. I implemented this by one-to-one relation between Teacher model and User model, but I can't get my head around making a form for Teacher model and in the same time I want to create user for him/her, please not

Extend django user model

2013-04-16 Thread Laurent David Deschambault
Hi, I want to extend the existing user model and I have followed the instructions found in the Django documentation ( https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model ). My issue is that my additional fields (which are ForeignKey) cannot be blank o

Re: django user model json

2013-02-08 Thread Anderson
Hi Jacob thanks for the tip but don't worry that is just a test script there are not real users and is running my local server that doesn't have any outside connection. Thanks anyway is always good to be careful. I am using django 1.4 so you telling me that parents classes cannot be serialized?

Re: django user model json

2013-02-08 Thread Jacob Kaplan-Moss
Hi Anderson -- First, I need to point out something: On Fri, Feb 8, 2013 at 2:07 PM, Anderson wrote: > 'password': > u'pbkdf2_sha256$1$ObXZ2yN3HATp$3ADUPZrzdvQCkPdJPCakfzILAIF8lPbKgAZLiXm54UI=', You just posted a password -- yours or one of your users -- on a public mailing list. PLEASE R

django user model json

2013-02-08 Thread Anderson
Hi guys I have this class that extends from Class User class UserProfile(User): #timezone = models.CharField(max_length=50, default='America/Edmonton') activation_key = models.CharField(max_length=40) key_expires = models.DateTimeField() objects = UserMan

Re: Extending and Entity with the Django User model

2010-05-12 Thread x13
> something like that maybe works: > > class MyUser(models.Model): >     user = models.ForeignKey(User, unique=True) >     entity = models.ForeignKey(Entity, unique=True) >     > Sorry, this is my current proposal (but I really don't know if there is some difference with the previous one): c

Extending and Entity with the Django User model

2010-05-12 Thread x13
Hello, I need to extend the Django User model in this way: I have an Entity model an I want to define a relationship one-2-one from User to Entity (so a Django User can be an Entity, but an Entity can be something else). So what's the best way to extend the User model for this particular

Re: Extending Django User model using add_to_class()

2009-06-22 Thread James Bennett
On Mon, Jun 22, 2009 at 5:30 PM, pr wrote: > Yes, I know what you mean, but It's small project with one programmer. > I want to know about speed and stability in production mode above > rules of 'programming-tao' :-) Well, there's also the fact that: 1. Using a profile means relying on documente

Re: Extending Django User model using add_to_class()

2009-06-22 Thread pr
On 22 Cze, 23:14, James Bennett wrote: > No, it's a very bad method. Consider what happens if two people want > to add fields of the same name; trying to stick them in the User model > will obviously fail and break at least one person's code. Yes, I know what you mean, but It's small project with

Re: Extending Django User model using add_to_class()

2009-06-22 Thread James Bennett
On Mon, Jun 22, 2009 at 4:01 PM, pr wrote: > Is it a good way to extend Django User model using add_to_class()? > I have to add only two extra fields to the User model and I think that > using Profile Model to do this is unnecessary. No, it's a very bad method. Consider what

Extending Django User model using add_to_class()

2009-06-22 Thread pr
Hi, Is it a good way to extend Django User model using add_to_class()? I have to add only two extra fields to the User model and I think that using Profile Model to do this is unnecessary. My way: # Accounts models.py User.add_to_class('field1', models.CharField(max_

Extending django User model to multiple profiles

2007-04-18 Thread checco
Hi, from here, as you certainly know, you can see how to extend the User model to fit the particular needs of a given application: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model In my application I have two different kind of users, so I have to extend it twice: which va