Re: Problem with user.username

2020-04-24 Thread Bishop Akolgo
Hi Thks. Was able to resolve problem after completing migrations and creating the supperuser regards bishop On Thu, Apr 23, 2020 at 6:08 PM Allison Tretina wrote: > I have two typos on line 6 and 9. My bad. > > >>> list(get_user_model().*objects.filter*(is_superuser=True).values_list('username'

Re: Problem with user.username

2020-04-23 Thread Allison Tretina
I have two typos on line 6 and 9. My bad. >>> list(get_user_model().*objects.filter*(is_superuser=True).values_list('username', flat=True)) >>> list(get_user_model().*objects.filter*(is_superuser=True).values_list('password', flat=True)) On Thu, Apr 23, 2020 at 1:03 PM Allison Tretina wrote:

Re: Problem with user.username

2020-04-23 Thread Allison Tretina
Open the python shell in your terminal. $ python3 manage.py shell Import the modules to access your admin values. >>> from django.contrib.auth import get_user_model Get the username first. >>> list(get_user_model().objects.fileter(is_superuser=True).values_list('username', flat=True)) ['someus

Re: Problem with user.username

2020-04-23 Thread Jorge Gimeno
On Thu, Apr 23, 2020, 8:59 AM Bishop Akolgo wrote: > i have a similar problem. when i installed the env and django it did not > require me to create password but after successfully installing django and > trying to open admin, i need password and i cannot enter so i am stuck. > Can someone help

Re: Problem with user.username

2020-04-23 Thread Bishop Akolgo
i have a similar problem. when i installed the env and django it did not require me to create password but after successfully installing django and trying to open admin, i need password and i cannot enter so i am stuck. Can someone help me? On Tuesday, July 12, 2011 at 7:31:27 AM UTC+1, Supr

Re: Problem with user.username

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 2:25 PM, bruno desthuilliers wrote: > On Jul 12, 3:07 pm, Tom Evans wrote: > (snip) >> Programming by permutation is never a good strategy. > > Indeed. Yet: > >> A typical view using RequestContext and render_to_response should look >> like this: >> >> def someview(request

Re: Problem with user.username

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 2:07 PM, Tom Evans wrote: > On Tue, Jul 12, 2011 at 1:41 PM, nicolas HERSOG wrote: >> Hi ! >> >> It's very strange, i just found a way to solve my probleme but i don't have >> 'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS. >> >> For solve my pr

Re: Problem with user.username

2011-07-12 Thread bruno desthuilliers
On Jul 12, 3:07 pm, Tom Evans wrote: (snip) > Programming by permutation is never a good strategy. Indeed. Yet: > A typical view using RequestContext and render_to_response should look > like this: > > def someview(request): >   ctxt = RequestContext({ >     'hello': 'world', >   }) >   return r

Re: Problem with user.username

2011-07-12 Thread nicolas HERSOG
Thx ! I'll read this and try to implement the "right way" :) thx Tom On Tue, Jul 12, 2011 at 3:07 PM, Tom Evans wrote: > On Tue, Jul 12, 2011 at 1:41 PM, nicolas HERSOG > wrote: > > Hi ! > > > > It's very strange, i just found a way to solve my probleme but i don't > have > > 'django.core.con

Re: Problem with user.username

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 1:41 PM, nicolas HERSOG wrote: > Hi ! > > It's very strange, i just found a way to solve my probleme but i don't have > 'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS. > > For solve my problem i added in my views.py : > from django.shortcuts impo

Re: Problem with user.username

2011-07-12 Thread nicolas HERSOG
Hi ! It's very strange, i just found a way to solve my probleme but i don't have 'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS. For solve my problem i added in my views.py : from django.shortcuts import render_to_response this is my previous index views who didn t wo

Re: Problem with user.username

2011-07-12 Thread Kenneth Gonsalves
On Mon, 2011-07-11 at 23:31 -0700, Suprnaturall wrote: > The problem is : when i m in login.html i see my user.username, but > when i submit the login form and being redirect to index i don t > retrieve the user.username. do you have this in your settings.py: TEMPLATE_CONTEXT_PROCESSORS = (

Problem with user.username

2011-07-12 Thread Suprnaturall
Hi, First of all, apologize me for my poor, poor english. I m new with django and i m stuck with a odd thing. I created a login form and use the default django login handlet like this : base.html : (...) {% if user.is_authenticated %} {{user.use