Что-то лыжи не едут. Поставил последний PYBBM + все зависимости к нему.
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
(r'^', include('pybb.urls', namespace='pybb')),
(r'^accounts/', include('registration.urls')),
(r'^forum/', include('pybb.urls', namespace='pybb')),
)
При создании базы получил ошибку в коде движка.
python manage.py syncdb --all
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
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 pybb_category
Creating table pybb_forum_moderators
Creating table pybb_forum
Creating table pybb_topic_subscribers
Creating table pybb_topic
Creating table pybb_post
Creating table pybb_profile
Creating table pybb_attachment
Creating table pybb_topicreadtracker
Creating table pybb_forumreadtracker
Creating table registration_registrationprofile
Creating table thumbnail_kvstore
Creating table south_migrationhistory
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): Please enter either "yes" or "no": yes
...
Traceback (most recent call last):
File "manage.py", line 18, in
execute_manager(settings)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\__init__.py", line 438, in execute_manager
utility.execute()
File "c:\python\27\Lib\site-packages\django\core\managemen
t\__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\base.py", line 220, in execute
output = self.handle(*args, **options)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\base.py", line 351, in handle
return self.handle_noargs(**options)
File "c:\python\27\lib\site-packages\south-0.7.3-py2.7.egg
\south\management\commands\syncdb.py", line 90, in handle_noargs
syncdb.Command().execute(**options)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\base.py", line 220, in execute
output = self.handle(*args, **options)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\base.py", line 351, in handle
return self.handle_noargs(**options)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\commands\syncdb.py", line 109, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\sql.py", line 190, in emit_post_sync_signal
interactive=interactive, db=db)
File "c:\python\27\Lib\site-packages\django\dispatch\dispa
tcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "c:\python\27\Lib\site-packages\django\contrib\auth\m
anagement\__init__.py", line 70, in create_superuser
call_command("createsuperuser", interactive=True)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "c:\python\27\Lib\site-packages\django\core\managemen
t\base.py", line 220, in execute
output = self.handle(*args, **options)
File "c:\python\27\Lib\site-packages\django\contrib\auth\m
anagement\commands\createsuperuser.py", line 72, in handle
User.objects.get(username=default_username)
File "c:\python\27\Lib\site-packages\django\db\models\mana
ger.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "c:\python\27\Lib\site-packages\django\db\models\quer
y.py", line 344, in get
num = len(clone)
File "c:\python\27\Lib\site-packages\django\db\models\quer
y.py", line 82, in __len__
self._result_cache = list(self.iterator())
File "c:\python\27\Lib\site-packages\django\db\models\quer
y.py", line 273, in iterator
for row in compiler.results_iter():
File "c:\python\27\Lib\site-packages\django\db\models\sql\
compiler.py", line 680, in results_iter
for rows in self.execute_sql(MULTI):
File "c:\python\27\Lib\site-packages\django\db\models\sql\
compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "c:\python\27\Lib\site-packages\django\db\backends\ut
il.py", line 34, in execute
return self.cursor.execute(sql, params)
File "c:\python\27\Lib\site-packages\django\db\backends\sq
lite3\base.py", line 234, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: You must not use 8-bit bytestrings unless you use
a text_factory that can interpret 8-bit bytestrings (like text_factory = str).
It is highly recommended that you instead just switch your application to Unicod
e strings.
Тем не менее база создалась.
Далее выполнил повторно syncdb --all ошибок больше не получил.
Затем migrate --fake без ошибок
Запуск сервера python manage.py runserver без ошибок, отобразилась страница сайта.
Однако, при попытке создать что-нибудь выдает ошибку
При этом, если изначально был адрес http://localhost:8000/forum
то после нажатия на "Add a category now" перекидывает на http://localhost:8000/admin/pybb/category/add/ и выдает ошибку
Request Method: GET
Request URL: http://localhost:8000/admin/pybb/category/add/
Django Version: 1.3.1
Exception Type: DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location: c:\python\27\Lib\site-packages\django\db\models\query.py in get, line 349
Python Executable: c:\python\27\python.exe
Попробовал внести изменения:
1) Добавил в urls строчку (r'^forum/', include('pybb.urls', namespace='pybb')),
2) Добавил в файлы директиву # -- coding: utf-8 --
3) перезаписал проект в utf-8
4) Проверил наличие последних версий, всё свежее
Куда дальше копать?