I wrote a python script to easily reset a django project. I hope it helps
you.
Just put it in the folder where manage.py file is and run it.
import os
import shutil
from pprint import pprint
folders = []
base_dir = os.path.dirname(os.path.realpath(__file__))
def get_directory_list():
global
Better will be, delete all migrations, and again migrate
On Fri, May 17, 2019, 12:51 PM RAJENDRA MYTHILI 17BIS0120 <
rajendra.mythili2...@vitstudent.ac.in> wrote:
> I'm facing the same issue ... Did you figure out what's wrong?
>
> On Saturday, October 6, 2018 at 6:28:09 AM UTC-7, Jaydeep Borkar
The problem with Jaydeep's code is the 'username' field is not getting
populated in the auth_user table. Django auth_user table by default must
have unique usernames. Username is what Django authenticates to by default.
Jaydeep was able to enter the initial user with email, firstname and
Consider we want another attribute in user model other than what is already
available, for example height or weight. Still this code is giving error
and focus should be to solve the issue that OP is facing. I am also facing
same issue and trying to figure it out.
@Jaydeep Did you get to solve
I'm not sure what your objective is but you don't need to create another
model to store user data. User data is stored in the auth.models. It has
fields already available for what your trying to accomplish.
On Saturday, October 6, 2018 at 8:28:09 AM UTC-5, Jaydeep Borkar wrote:
>
> When I try
Hi,
Your _str function name is only one name is give in that model
Regards
Gurumurthy P
On Fri, 17 May, 2019, 10:21 PM RAJENDRA MYTHILI 17BIS0120, <
rajendra.mythili2...@vitstudent.ac.in> wrote:
> I'm facing the same issue ... Did you figure out what's wrong?
>
> On Saturday, October 6, 2018
I'm facing the same issue ... Did you figure out what's wrong?
On Saturday, October 6, 2018 at 6:28:09 AM UTC-7, Jaydeep Borkar wrote:
>
> When I try to register a user using Django form, it gives me "UNIQUE
> constraint failed: auth_user.username". When I tried registering the first
> user, it
You do not have to save the user 2 times in your form:
user = user_form.save()
user.save()
Maybe this is also the problem...
--
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,
When I try to register a user using Django form, it gives me "UNIQUE
constraint failed: auth_user.username". When I tried registering the first
user, it worked, but I couldn't see that entry in my database. When I tried
registering the second user, it's giving me this error. Please, help me
9 matches
Mail list logo