Revision history [back]
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:
I drop the db and recreate the database and answer no to create admin user question. The syncdb step can be run successfully. and then I run migrate askbot, there will be many SQL FATAL ERRORS. BUT in the end, running the dev server is working fine. I can create superuser account (the first user) without any problems. I can post questions without any problems. Please check the following what I did and outputs:
$ sudo -u postgres dropdb userdb $ sudo -u postgres createdb -O user1 userdb $ python manage.py syncdb
The output of syncdb is at paste.ubuntu.com/6363326/
$ python manage.py migrate askbot
The output of migrate is at paste.ubuntu.com/6363334/
$ python manage.py migrate django_authopenid
No error message for this migrate.
Then finally run the server
$ python manage.py runserver `hostname -i`:8000
As I said, the website is working fine. I can create superuser account, login and post questions even if there are many SQL FATAL ERRORS.
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:
I drop the db and recreate the database and answer no to create admin user question. The syncdb step can be run successfully. and then I run migrate askbot, there will be many SQL FATAL ERRORS. BUT in the end, running the dev server is working fine. I can create superuser account (the first user) without any problems. I can post questions without any problems. Please check the following what I did and outputs:
$ sudo -u postgres dropdb userdb $ sudo -u postgres createdb -O user1 userdb $ python manage.py syncdb
The output of syncdb is at paste.ubuntu.com/6363326/
$ python manage.py migrate askbot
The output of migrate is at paste.ubuntu.com/6363334/
$ python manage.py migrate django_authopenid
No error message for this migrate.
Then finally run the server
$ python manage.py runserver `hostname -i`:8000
As I said, the website is working fine. I can create superuser account, login and post questions even if there are many SQL FATAL ERRORS.
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:
I drop the db and recreate the database and answer no to create admin user question. The syncdb step can be run successfully. and then I run migrate askbot, there will be many SQL FATAL ERRORS. BUT in the end, running the dev server is working fine. I can create superuser account (the first user) without any problems. I can post questions without any problems. Please check the following what I did and outputs:
$ sudo -u postgres dropdb userdb $ sudo -u postgres createdb -O user1 userdb $ python manage.py syncdb
The output of syncdb is at paste.ubuntu.com/6363326/
$ python manage.py migrate askbot
The output of migrate is at paste.ubuntu.com/6363334/
Then finally run the server
$ python manage.py runserver `hostname -i`:8000
As I said, the website is working fine. I can create superuser account, login and post questions even if there are many SQL FATAL ERRORS.
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.