I suggest that you use the AbstractUser model that django officially
recommends.
from django.contrib.auth.models AbstractUser
class User(AbstractUser):
age : models.IntegerField(default=0)
is_student : models.BooleanField(default=False)
# extra profile information
Then also make sure
If you're new the best way to create a profile is by using django signals
you'll get more information about that
at
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
.
On Sunday, 27 June 2021 at 21:46:28 UTC suabiut wrote:
> You can use the user m
You can use the user model, do something like that
class user_register(models.Model):
user = models.OneToOneField(User,on_delete=models.CASCADE)
join_date = models.DateTimeField(default=timezone.now)
To view the user profile, you can do something like this.
def user_profile(request,
Hello
I'm new to django. i want to create a user profile. I want to know the best
way to do this. thanks
--
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
On 06/22/2011 11:41 AM, Satyajit Sarangi wrote:
Now I get a database error
relation "registration_userprofile" does not exist
LINE 1: ..."."id", "registration_userprofile"."user_id" FROM "registrat...
That looks like a migration/syncdb issue. Either you added a field to an
already-synced mod
Now I get a database error
relation "registration_userprofile" does not exist
LINE 1: ..."."id", "registration_userprofile"."user_id" FROM "registrat...
On Wed, Jun 22, 2011 at 8:58 PM, Shawn Milochik wrote:
> On 06/22/2011 11:25 AM, Satyajit Sarangi wrote:
>
>> Traceback:
>>
>> 60.
On 06/22/2011 11:25 AM, Satyajit Sarangi wrote:
Traceback:
60.
url(r'^profile/$',UserProfile,name='UserProfile'),
Exception Type: NameError at /accounts/profile/
Exception Value: name 'UserProfile' is not defined
It appears that you have a view named UserProfile in
Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py"
in get_response
101. request.path_info)
File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in
resolve
252. sub_match = pattern.resolve(new
On 06/22/2011 11:21 AM, Satyajit Sarangi wrote:
These are my steps .
1. Not using django-profile
2. Create my own view to show the profile by using user.get_profile()
3. Created my own view and also a model in django-registration to view
the profile .
4 . Did changes to
urls.py url(r'^profile/
These are my steps .
1. Not using django-profile
2. Create my own view to show the profile by using user.get_profile()
3. Created my own view and also a model in django-registration to view the
profile .
4 . Did changes to
urls.py url(r'^profile/$',register.UserProfile,name='user.get_profile()'),
On 06/22/11 16:09, Satyajit Sarangi wrote:
I am using django registration , which is not displaying any profile
when I log in . Thus I am not able to login . What should I do to
overcome this ?
I assume you've been reading docs already. (django-registration and
django user management ones, po
I am using django registration , which is not displaying any profile
when I log in . Thus I am not able to login . What should I do to
overcome this ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
12 matches
Mail list logo