Levi Campbell
Levi Campbell

Reputation: 6095

SyntaxError when trying to create a new app using django nonrel

I'm playing around with django-nonrel and google app engine when I get the following error trying to create a new app.

Traceback (most recent call last):
  File "./manage.py", line 2, in <module>
    from django.core.management import execute_manager
  File "/home/levi/Projects/DoneBox/django/__init__.py", line 14
    if svn_rev != u'SVN-unknown':
                               ^
SyntaxError: invalid syntax

The file that caused the exception is included below.

VERSION = (1, 3, 0, 'final', 0)

def get_version():
    version = '%s.%s' % (VERSION[0], VERSION[1])
    if VERSION[2]:
        version = '%s.%s' % (version, VERSION[2])
    if VERSION[3:] == ('alpha', 0):
        version = '%s pre-alpha' % version
    else:
        if VERSION[3] != 'final':
            version = '%s %s %s' % (version, VERSION[3], VERSION[4])
    from django.utils.version import get_svn_revision
    svn_rev = get_svn_revision()
    if svn_rev != u'SVN-unknown':
        version = "%s %s" % (version, svn_rev)
    return version

I've looked at this file in emacs and I can't see the problem, and I've tried searching google with no luck. Can someone please point me in the right direction?

(For those interested in what I'm doing, please see http://www.allbuttonspressed.com/projects/djangoappengine.)

Upvotes: 0

Views: 155

Answers (2)

dragonx
dragonx

Reputation: 15143

Just an FYI, the latest version of django-appengine is found here:

https://github.com/django-nonrel

However, the allbuttonspressed version should be working. You may not have your python environment set properly.

Upvotes: 1

Andreas R&#246;hler
Andreas R&#246;hler

Reputation: 4804

running this code in buffer with ipython shebang

! /usr/bin/env ipython

-- coding: utf-8 --

extending the end like this:

print version
return version

get_version()

get "1.3" at the ipython prompt

similar thing with python shell fails like this

from django.utils.version import get_svn_revision Traceback (most recent call last): File "", line 1, in ImportError: No module named utils.version

assume some install/path issue

Upvotes: 1

Related Questions