sgon00's profile - activity

11 years ago received badge Notable Question (source)
11 years ago received badge Popular Question (source)
11 years ago received badge Famous Question (source)
11 years ago received badge Student (source)
11 years ago commented question NameError: global name 'User' is not defined (Fresh install) (askbot only)

Can anyone help please? I stop here and do not know what to do. I followed the exact steps from official installation documentation. THANKS.

11 years ago received badge Editor (source)
11 years ago asked a question NameError: global name 'User' is not defined (Fresh install) (askbot only)

Please check the following exact steps that I run for creating askbot environment:

$ virtualenv askbot
$ cd askbot/
$ . bin/activate
$ pip install yolk
$ pip install askbot
$ pip install psycopg2
$ sudo -u postgres createuser -D -R -S -P user1
$ sudo -u postgres createdb -O user1 userdb
$ mkdir testproject
$ cd testproject
$ askbot-setup
$ python manage.py collectstatic
$ python manage.py syncdb
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table south_migrationhistory
Creating table livesettings_setting
Creating table livesettings_longsetting
Creating table djkombu_queue
Creating table djkombu_message
Creating table followit_followuser

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
NameError: global name 'User' is not defined

The output of yolk -l:

$ yolk -l 
Coffin          - 0.3.8        - active 
Django          - 1.5          - active 
Jinja2          - 2.7.1        - active 
MarkupSafe      - 0.18         - active 
Python          - 2.7.3        - active development (/usr/lib/python2.7/lib-dynload)
South           - 0.8.2        - active 
Unidecode       - 0.04.14      - active 
akismet         - 0.2.0        - active 
amqp            - 1.0.13       - active 
anyjson         - 0.3.3        - active 
argparse        - 1.2.1        - active development (/usr/lib/python2.7)
askbot          - 0.7.49       - active 
beautifulsoup4  - 4.3.2        - active 
billiard        - 2.7.3.34     - active 
celery          - 3.0.24       - active 
chardet         - 2.1.1        - active 
django-appconf  - 0.6          - active 
django-celery   - 3.0.11       - active 
django-compressor - 1.2          - active 
django-countries - 1.0.5        - active 
django-followit - 0.0.3        - active 
django-keyedcache - 1.4-6        - active 
django-kombu    - 0.9.4        - active 
django-picklefield - 0.3.0        - active 
django-recaptcha-works - 0.3.4        - active 
django-robots   - 0.9.2        - active 
django-threaded-multihost - 1.4-1        - active 
django-tinymce  - 1.5.1b2      - active 
html5lib        - 0.90         - active 
httplib2        - 0.8          - active 
kombu           - 2.5.16       - active 
lamson          - 1.3.4        - active 
lockfile        - 0.9.1        - active 
longerusername  - 0.4          - active 
markdown2       - 2.1.0        - active 
mock            - 1.0.1        - active 
nose            - 1.3.0        - active 
oauth2          - 1.5.211      - active 
pip             - 1.3.1        - active 
psycopg2        - 2.5.1        - active 
pystache        - 0.3.1        - active 
python-daemon   - 1.6          - active 
python-dateutil - 2.2          - active 
python-modargs  - 1.7          - active 
python-openid   - 2.2.5        - active 
pytz            - 2013.7       - active 
sanction        - 0.3.1        - active 
setuptools      - 0.6c11       - active 
six             - 1.4.1        - active 
wsgiref         - 0.1.2        - active development (/usr/lib/python2.7)
yolk            - 0.4.3        - active 

PS: I should mention that you can see from the above steps, I followed the steps from official installation documentation: nolink://askbot.org/doc/install.html And the final step here python manage.py syncdb is mentioned in this link: nolink://askbot.org/doc/initialize-database-tables.html

Changed in version 0.7.21: When the script asks you if you want to create a superuser, answer yes if you want to create one. By default Askbot sets admin status(superuser) for the first user created automatically but also supports this form.

Updated ...

(more)
11 years ago commented question syncdb can't create admin in Django >= 1.5

I am having the same problem. Fresh install askbot in a vritualenv (askbot only). Followed all the official documetnation installation steps. `pip install askbot`. when I follow this step: http://askbot.org/doc/initialize-database-tables.html, and run `python manage.py syncdb`, the following is the output:

Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table auth_message
...
Creating table djkombu_queue
Creating table djkombu_message
Creating table followit_followuser

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
NameError: global name 'User' is not defined