Hello,
you get this because in django by default implements __str__ method of User
model, which returns only username of each user. If you want to have
different behaviour, you should implement your one __str__ method in User
model.
пт, 3 лип. 2020 о 09:35 Mohsen Pahlevanzadeh
пише:
> When I us
When we do, User.objects.all(), it returns a queryset which will show you
all the objects that are present in the database for the model. So, when
you print that queryset, it just displays the username of the user.
This is also because the def __str__ method of the User model must be
returning
By managed.py inspectdb auth_user :
$ ./manage.py inspectdb auth_user;
from django.db import models
class AuthUser(models.Model):
password = models.CharField(max_length=128)
last_login = models.DateTimeField(blank=True, null=True)
is_superuser = models.IntegerField()
username = mo
send me your models.py and views.py
RANGA BHARATH JINKA 于2020年7月3日 周五15:13写道:
> Send me views.py
>
> On Fri, 3 Jul 2020, 12:36 pm Mohsen Pahlevanzadeh, <
> m.pahlevanza...@gmail.com> wrote:
>
>> I don't have model.py for auth_user.
>>
>> On Friday, July 3, 2020 at 11:10:17 AM UTC+4:30, RANGA BHA
Send me views.py
On Fri, 3 Jul 2020, 12:36 pm Mohsen Pahlevanzadeh, <
m.pahlevanza...@gmail.com> wrote:
> I don't have model.py for auth_user.
>
> On Friday, July 3, 2020 at 11:10:17 AM UTC+4:30, RANGA BHARATH JINKA wrote:
>>
>> send me your models.py
>>
>> On Fri, Jul 3, 2020 at 12:06 PM Mohsen
I don't have model.py for auth_user.
On Friday, July 3, 2020 at 11:10:17 AM UTC+4:30, RANGA BHARATH JINKA wrote:
>
> send me your models.py
>
> On Fri, Jul 3, 2020 at 12:06 PM Mohsen Pahlevanzadeh > wrote:
>
>> When I use select * from auth_user; I get the following result:
>> #
send me your models.py
On Fri, Jul 3, 2020 at 12:06 PM Mohsen Pahlevanzadeh <
m.pahlevanza...@gmail.com> wrote:
> When I use select * from auth_user; I get the following result:
>
>
> ++-
When I use select * from auth_user; I get the following result:
++++--+--++---+--
8 matches
Mail list logo