on the demo_project what is the Admin user name and password?
Fierozen opened this issue · 3 comments
I have looked in all files I can think of. Studying to log trace of the entire installation. But I don't see it anywhere.
do the following:
vagrant up
vagrant ssh
source env/bin/activate
cd /vagrant/demo_project/
python manage.py shell
from django.contrib.auth.models import User
User.objects.all()
I suspect that the query will result in zero User objects meaning you still need to create a superuser. To create a super use type::
python manage.py createsuperuser
The super user you create will be you admin
user.
You could also create a fabric command like so
@task
def createsuperuser():
manage_py("createsuperuser")
Then to create a superuser you would type: fab vagrant createsuperuser
and the following will happen::
[vagrant@127.0.0.1:2222] Executing task 'createsuperuser'
[vagrant@127.0.0.1:2222] run: /home/vagrant/env/bin/python /vagrant/demo_project/manage.py createsuperuser
[vagrant@127.0.0.1:2222] out: Username: bob
[vagrant@127.0.0.1:2222] out: Email address: bob@bob.com
[vagrant@127.0.0.1:2222] out: Password:
[vagrant@127.0.0.1:2222] out: Password (again):
[vagrant@127.0.0.1:2222] out: Superuser created successfully.
[vagrant@127.0.0.1:2222] out:
Done.
Disconnecting from 127.0.0.1:2222... done.
Yes, that is exactly what I did and it worked. I am now up and running. But I
do have one lingering question. Is there a way to use "fab manage_py" to do
that?
On Mon, 16 Dec 2013 06:42:32 -0800, Tom wrote
do the following:
vagrant up vagrant ssh source env/bin/activate cd /vagrant/demo_project/ python manage.py shell from django.contribu.auth.models import User User.objects.all()
I suspect that the query will result in zero User objects meaning
you still need to create a superuser. To create a super use type::
python manage.py createsuperuser
The super user you create will be you
admin
user.
Reply to this email directly or view it on GitHub:
#13 (comment)
John Black
Yes you can!
(ENV)tom@tom-ThinkPad-T510 ~/hacking/django-salted $ fab vagrant manage_py:'shell'
[vagrant@127.0.0.1:2222] Executing task 'manage_py'
[vagrant@127.0.0.1:2222] run: /home/vagrant/env/bin/python /vagrant/demo_project/manage.py shell
[vagrant@127.0.0.1:2222] out: /home/vagrant/env/local/lib/python2.7/site-packages/IPython/terminal/embed.py:254: DeprecationWarning: With-statements now directly support multiple context managers
[vagrant@127.0.0.1:2222] out: with nested(self.builtin_trap, self.display_trap):
[vagrant@127.0.0.1:2222] out:
[vagrant@127.0.0.1:2222] out: Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[vagrant@127.0.0.1:2222] out: Type "copyright", "credits" or "license" for more information.
[vagrant@127.0.0.1:2222] out:
[vagrant@127.0.0.1:2222] out: IPython 1.1.0 -- An enhanced Interactive Python.
[vagrant@127.0.0.1:2222] out: ? -> Introduction and overview of IPython's features.
[vagrant@127.0.0.1:2222] out: %quickref -> Quick reference.
[vagrant@127.0.0.1:2222] out: help -> Python's own help system.
[vagrant@127.0.0.1:2222] out: object? -> Details about 'object', use 'object??' for extra details.
[vagrant@127.0.0.1:2222] out:
[vagrant@127.0.0.1:2222] out: In [1]: print "Hello from vagrants shell!"
[vagrant@127.0.0.1:2222] out: Hello from vagrants shell!
[vagrant@127.0.0.1:2222] out:
[vagrant@127.0.0.1:2222] out: In [2]: