What version of Django for latest?

Asked by James Russo on 2012-03-24

Trying to install a new copy of Graphite for some environmental monitoring. What version of Django is required with the current release. I'm assuming 1.4 is not supported because I can't seem to get it to work.

thanks!

-jr

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
James Russo
Solved:
2012-03-24
Last query:
2012-03-24
Last reply:
2012-03-24
Nicholas Leskiw (nleskiw) said : #1

What happens when you try to start it?

James Russo <email address hidden> wrote:

>New question #191549 on Graphite:
>https://answers.launchpad.net/graphite/+question/191549
>
>Trying to install a new copy of Graphite for some environmental monitoring. What version of Django is required with the current release. I'm assuming 1.4 is not supported because I can't seem to get it to work.
>
>thanks!
>
>-jr
>
>
>--
>You received this question notification because you are a member of
>graphite-dev, which is an answer contact for Graphite.
>
>_______________________________________________
>Mailing list: https://launchpad.net/~graphite-dev
>Post to : <email address hidden>
>Unsubscribe : https://launchpad.net/~graphite-dev
>More help : https://help.launchpad.net/ListHelp

James Russo (i-jr-0) said : #2

It starts fine using runserver, but when trying to connect to localhost:8000 it errors out.

Django version 1.4, using settings 'graphite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/Library/Python/2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
    return self.application(environ, start_response)
  File "/Library/Python/2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 179, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/opt/graphite/webapp/graphite/views.py", line 8, in server_error
    template = loader.get_template(template_name)
  File "/Library/Python/2.7/site-packages/django/template/loader.py", line 145, in get_template
    template, origin = find_template(template_name)
  File "/Library/Python/2.7/site-packages/django/template/loader.py", line 128, in find_template
    loader = find_template_loader(loader_name)
  File "/Library/Python/2.7/site-packages/django/template/loader.py", line 101, in find_template_loader
    raise ImproperlyConfigured('Error importing template source loader %s: "%s"' % (loader, e))
ImproperlyConfigured: Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"

I also had to modify the database configuration in settings.py to a hash:

DATABASES = {
  'default': {
    'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
    'NAME': STORAGE_DIR + 'graphite.db', # Or path to database file if using sqlite3.
    'USER': '', # Not used with sqlite3.
    'PASSWORD': '', # Not used with sqlite3.
    'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
    'PORT': '', # Set to empty string for default. Not used with sqlite3.
  }
}

Michael Leinartas (mleinartas) said : #3

I'd start with Django 1.3 until we have a chance to test 1.4 and make any required adjustments. Note that 1.4 was released only a few hours ago

James Russo (i-jr-0) said : #4

heh. Wow. Just my luck. I just did pip install django and got what I got. I will give it a try with 1.3 and hopefully that works out better!

Michael Leinartas (mleinartas) said : #5

Yeah it should be a lot less effort. The error you have above is because 1.4 removed the old-style function-based template loader and Graphite hasn't moved to the new class-based one. I've filed this to get 1.4 working: https://bugs.launchpad.net/graphite/+bug/963684