Login as admin

61 views
Skip to first unread message

sebastian mei

unread,
Jun 26, 2015, 3:26:25 AM6/26/15
to djang...@googlegroups.com
Good Morning,

how can I login as admin?
I installed lfs-shop refering to this on my machine (Ubuntu 14.04, sqlite3): http://docs.getlfs.com/en/latest/introduction/installation.html
Everything works fine but I am not able to login as admin.
The documentations says: "Login, if you aren’t yet." 
look here: http://docs.getlfs.com/en/latest/introduction/getting_started.html

I am able to create a normal user-account and to login as normal user. That is no problem. But I'm to stupid to get in as admin?!

What I have to do to login as admin? Must I change some defaults in settings.py?

Thanks a lot for any help,
Sebastian Mei

Kai Diefenbach

unread,
Jun 26, 2015, 3:27:42 AM6/26/15
to djang...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "django-lfs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-lfs+...@googlegroups.com.
To post to this group, send email to djang...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-lfs.
For more options, visit https://groups.google.com/d/optout.

--
IQ++
Mobil +49 (0) 170 / 8220820
Tel: +49 (0) 6182 / 774377-0
Fax: +49 (0) 6182 / 774377-1
Mail: kai.die...@iqpp.de
Web: http://www.iqpp.de
Skype: kai.diefenbach

sebastian mei

unread,
Jul 3, 2015, 12:50:23 PM7/3/15
to djang...@googlegroups.com
Good evening,
thanks a lot for your quick response!

Unfortunately django-admin createsuperuser is not working.

The documentation says about django-admin createsuperuser:
"This command is only available if Django’s authentication system (django.contrib.auth) is installed."

How can I check if django.contrib.auth is installed? Where can i see it?

Sebastian

Noe Nieto

unread,
Jul 3, 2015, 1:10:08 PM7/3/15
to djang...@googlegroups.com
Open settings.py and check if the string 'django.contrib.auth' is included in the list for MIDDLEWARE_CLASSES.

Lfs 0.7.x has it by default.

* cd into your buildout directory
* type: bin/django createsuperuser
* and fill in the blanks

--
Noe
---
Noe Nieto
NNieto Consulting Services
M: nni...@noenieto.com
W: http://noenieto.com
T:  @tzicatl
Li: Perfil en LinkedIn

sebastian mei

unread,
Jul 3, 2015, 1:28:13 PM7/3/15
to djang...@googlegroups.com
There is a string called 'django.contrib.auth.middleware.AuthenticationMiddleware' in the MIDDELWARE_CLASSES.
Is it right?
With "buildout directory" you mean my "lfs-installer" directory?
I have no directory called "buildout".

Sebastian

Noe Nieto

unread,
Jul 3, 2015, 1:35:55 PM7/3/15
to djang...@googlegroups.com
Oh, yes... that string, sorry. I wore in a rush.

The buildout directory is the same as the lfs installer. There is a buildout.cfg file and a bin/ directory inside the buildout directory.

--
Noe

sebastian mei

unread,
Jul 4, 2015, 4:48:37 AM7/4/15
to djang...@googlegroups.com
Good Morning Noe,

thanks for your answers.
It works... I'm admin!

My mistake:
My command in terminal was: "bin/django-admin createsuperuser" IT IS FALSE!
The right command is: "bin/django createsuperuser" without "-admin"

My way to admin:
* cd into your buildout directory     # "buildout" directory means the lfs-installer directory.
* type: bin/django createsuperuser  # and not bin/django-admin createsuperuser
* and fill in the blanks (username, E-Mail, password)

after fill out the blanks start your server:
* bin/django runserver
navigate to: http://localhost:8000/login
Here you can see two empty fields on the left side: "E-Mail:" and "Passwort:"

Attention, there is a little trap:
*Write your username (from above) into the field "E-Mail". And not your E-Mail.
*write your password (from above)

Now you are admin! :-)

Thanks a lot Noe an Kai!
Sebastian
Reply all
Reply to author
Forward
0 new messages