Latest Posts

Topic: Error with setting up the website

GunChleoc
Avatar
Topic Opener
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-02-14, 09:02

I tried to set up a local test environment for the website on Ubuntu with the instructions in the readme. The admin interface works fine, but for http://localhost:8000/, this is what I get:

Environment:


Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.3.1
Python Version: 2.7.6
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.markup',
 'django.contrib.humanize',
 'django.contrib.webdesign',
 'tracking',
 'widelands.mainpage',
 'widelands.wlhelp',
 'widelands.wlimages',
 'widelands.wlwebchat',
 'widelands.wlrecaptcha',
 'widelands.wlprofile',
 'widelands.wlsearch',
 'widelands.wlpoll',
 'widelands.wlevents',
 'widelands.wlmaps',
 'widelands.wlscreens',
 'widelands.wlggz',
 'widelands.wiki',
 'widelands.news',
 'pybb',
 'threadedcomments',
 'django_messages',
 'registration',
 'pagination',
 'tagging',
 'notification',
 'djangoratings',
 'sphinxdoc',
 'south']
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'pagination.middleware.PaginationMiddleware',
 'tracking.middleware.VisitorTrackingMiddleware',
 'tracking.middleware.VisitorCleanUpMiddleware')

Template Loader Error:
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/var/www/django_projects/widelands/templates/mainpage.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/django/contrib/admin/templates/mainpage.html (File does not exist)
/home/bratzbert/localhost/widelands/wlwebsite/src/tracking/tracking/templates/mainpage.html (File does not exist)
/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/threadedcomments/templates/mainpage.html (File does not exist)
/home/bratzbert/localhost/widelands/wlwebsite/src/django-messages/django_messages/templates/mainpage.html (File does not exist)
/home/bratzbert/localhost/widelands/wlwebsite/src/pagination/pagination/templates/mainpage.html (File does not exist)
/home/bratzbert/localhost/widelands/wlwebsite/src/notification/notification/templates/mainpage.html (File does not exist)
/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/sphinxdoc/templates/mainpage.html (File does not exist)



Traceback:
File "/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/bratzbert/localhost/widelands/wlwebsite/code/widelands/../widelands/mainpage/views.py" in mainpage
  11.                 context_instance=RequestContext(request))
File "/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/django/shortcuts/__init__.py" in render_to_response
  20.     return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/django/template/loader.py" in render_to_string
  181.         t = get_template(template_name)
File "/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/django/template/loader.py" in get_template
  157.     template, origin = find_template(template_name)
File "/home/bratzbert/localhost/widelands/wlwebsite/local/lib/python2.7/site-packages/django/template/loader.py" in find_template
  138.     raise TemplateDoesNotExist(name)

Exception Type: TemplateDoesNotExist at /
Exception Value: mainpage.html

Console output:

<snip>wlwebsite/code/widelands$ ./manage.py runserver
Validating models...

0 errors found
Django version 1.3.1, using settings 'widelands.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[14/Feb/2015 09:53:01] "GET / HTTP/1.1" 500 116917

In local_settings.py:

bd = "<snip>/wlwebsite/code/widelands"

Edited: 2015-02-14, 09:09

Busy indexing nil values

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2442
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-02-14, 12:27

GunChleoc wrote:

In local_settings.py:

bd = "<snip>/wlwebsite/code/widelands"

I never touched this variable and all works as expected.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
GunChleoc
Avatar
Topic Opener
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-02-14, 14:27

I touched it because it didn't face-sad.png


Busy indexing nil values

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2442
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-02-14, 14:58
./manage.py syncdb
./manage.py migrate

runs without problems?

Here it works both on arch-linux and debian wheezy.

The virtualenv is set up with the right python version and is running?


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
GunChleoc
Avatar
Topic Opener
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-02-15, 11:32

I might have overlooked those while setting things up. I ran them again, and this is what I get:

~/localhost/widelands/wlwebsite/code/widelands$ ./manage.py syncdb
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
No fixtures found.

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.admin
 > django.contrib.markup
 > django.contrib.webdesign
 > tracking
 > widelands.mainpage
 > widelands.wlhelp
 > widelands.wlimages
 > widelands.wlwebchat
 > widelands.wlsearch
 > widelands.wlpoll
 > widelands.wlevents
 > widelands.wlmaps
 > widelands.wlscreens
 > widelands.wiki
 > widelands.news
 > threadedcomments
 > django_messages
 > registration
 > pagination
 > tagging
 > notification
 > sphinxdoc
 > south
 > widelands.wlprofile
 > widelands.wlggz

Not synced (use migrations):
 - pybb
 - djangoratings
(use ./manage.py migrate to migrate these)
~/localhost/widelands/wlwebsite/code/widelands$ ./manage.py migrate
Running migrations for pybb:
- Nothing to migrate.
 - Loading initial data for pybb.
No fixtures found.
Running migrations for djangoratings:
- Nothing to migrate.
 - Loading initial data for djangoratings.
No fixtures found.
(wlwebsite)bratzbert@museum:~/localhost/widelands/wlwebsite/code/widelands$ ./manage.py runserver
Validating models...

kaputtnik wrote: The virtualenv is set up with the right python version and is running?

I can access the admin panel, so I guess so.

Edited: 2015-02-15, 11:33

Busy indexing nil values

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2442
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-02-15, 16:55

Don't know, but something went wrong with your installation. The code should search for

mainpage.html

in folder:

/your/path/wlwebsite/code/templates/mainpage.html

but it doesn't search in this path.

The admin sites are generated from django while running, so they are working.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2442
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-07-28, 20:40

May you want to set up the website code again?

As i know you couldn't make branches like with the widelands code. Your working directory is always path/to/wlwebsite/code/widelands or path/to/virtualenv/code/widelands. This is because some of the configuration of django and/or the sidepackages needs the path /code/widelands. Maybe here is the failure?


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote