User model override and authentication

2022-10-24 Thread Rafael Noronha
Hello guys, I'm not advanced in Django and would like to know how and if it's possible to do it. I need to override Django's user model, and change the fields "username" to "sr_usuario" and "password" to "sr_password", but I would like to continue using all Django's default authentication

Re: User model override and authentication

2022-10-24 Thread Ayser shuhaib
Oi Rafael I’m sure this tutorial will help you: https://youtu.be/GdfLXHhNABE On Mon, 24 Oct 2022 at 23:14, Rafael Noronha wrote: > Hello guys, > I'm not advanced in Django and would like to know how and if it's possible > to do it. > > I need to override Django's user model, and change the

Re: User model override and authentication

2022-10-24 Thread Muhammad Juwaini Abdul Rahman
I never tried this, but maybe you can. Inherit the User model, then add two new lines: class DerivedUser(User): . sr_usuario = username sr_password = password On Tue, 25 Oct 2022 at 05:14, Rafael Noronha wrote: > Hello guys, > I'm not advanced in Django and would like to know

Re: User model override and authentication

2022-10-24 Thread Abhishek Kumar
If I may ask: why do you want to do this? If you just want to change what's displayed on Django Admin for example, you can do that without messing up with the code. On Tue, Oct 25, 2022 at 2:48 AM Ayser shuhaib wrote: > Oi Rafael > > I’m sure this tutorial will help you: > >

Re: Django call_command from Admin

2022-10-24 Thread Paul Kudla
you need to basically add a hook (save class) to your save model and process stuff along the way. you will need to modify this example but it's how i update info when saving an scom email user for dovecot. you can also override the admin class as well with something simaliar Note :

Re: request to post UnboundLocalError

2022-10-24 Thread Yusuf Olamilekan muktar
Hello, The variable 'contact' on line 27 is messing with python as the model name 'contact' is not being recognized but instead, the variable is being recognized. I'd advise you to change the variable name. i.e. contact = contact() to contact_var = contact(...) contact_var.save() [image:

Re: how to show liste filtre admin django ManyToOne Please

2022-10-24 Thread Alen Zuvic
Ok pon, 24. lis 2022. 12:03 AMINE AZIZ je napisao: > how to show liste filtre admin django ManyToOne in this case : > > > > [image: Sans titre 9.jpg] > > > How can i filtre in Project by tasks and specialy by Personne > > liste dropdown of personne and show me liste of projects ? > > best

Re: Django call_command from Admin

2022-10-24 Thread Paul Kudla
example for admin.py def save_model(self, request, obj, form, change): #This will save create #Check to see if this will be an invoice copy copy = False current_invoice = obj.invoice_number if obj.new_invoice : #clear the flag and save

Re: Update from 3.9 to 3.10.8 and uninstall 3.9

2022-10-24 Thread Mike Dewhirst
Sadly I can't advise on Windows 11. Nor am I across Anaconda and I don't know what Spyder is.The path is where Windows looks for a program if you don't specify where it is. You will need to google the location of the path environment variable on Windows 11.Good luck - I'm sure you will enjoy

how to show liste filtre admin django ManyToOne

2022-10-24 Thread AMINE AZIZ
how to show liste filtre admin django ManyToOne in this case : in models.py --- class Personne(models.Model): name= models.CharField(max_length=50,blank=False) def __str__(self): return self.name class Project(models.Model): title= models.CharField(max_length=50,blank=False) note=

how to show liste filtre admin django ManyToOne Please

2022-10-24 Thread AMINE AZIZ
how to show liste filtre admin django ManyToOne in this case : [image: Sans titre 9.jpg] How can i filtre in Project by tasks and specialy by Personne liste dropdown of personne and show me liste of projects ? best ragards -- You received this message because you are subscribed to the

Re: Image Fetching

2022-10-24 Thread Adeyemi Deji
Still not clear, send screenshots of ur code including the template and settings.py where u configured ur media root. Thanks On Mon, 24 Oct 2022, 05:32 Chukwudi Onwusa, wrote: > > I am only being able to fetch image registered only through the admin on > browser user interface. But the one I