Forums

Problems testing django 1.7b1

Hi, i am trying to test this new django beta but i am having problems doing it, in first place i followed this instructions for make my virtualenv with python 3.3 and install in it django 1.7b1: https://www.pythonanywhere.com/wiki/VirtualEnvForNewerDjango

For the django instalation i used pip like is writted in the django web: https://www.djangoproject.com/download/

pip install https://www.djangoproject.com/download/1.7b1/tarball/

Then i made my new project (totally empty) and did a syncdb for create my admin user, all fine.

Of course like is written in the first instructions, i changed the wsgi file (/var/www/mcoffee_pythonanywhere_com_wsgi.py): http://pastebin.com/FhGm49Qs

This is the error log from the server: http://pastebin.com/9Q3R65CR

I can identify in line 73: Put 'django.contrib.admin' in your INSTALLED_APPS setting in order to use the admin application.

But i already have it there, then i made another virtualenv with django 1.6.2 and change the wsgi for choose this new virtualev, once done reload the site and the django welcome page load perfectly; then the problem is with the django 1.7b1 configuration or something.

Has anyone tried install django 1.7b1?, i would like know this because maybe is a problem with the beta and not how i am configuring the enviroment.

Would you mind if I took a look at your files? That might help debug a bit.

Of course you can do it.

Hmm, I think that the error that's really causing the problem is the one a bit earlier -- the first one after a hit:

Traceback (most recent call last):
  File "/home/mcoffee/.virtualenvs/django17/lib/python3.3/site-packages/django/core/urlresolvers.py", line 340, in urlconf_module
    return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

Looks like this might possibly be related to an error in a views.py somewhere?

Thank you very much, this looks like a problem which happens in python 3.3, for now i will use python 2.7 which is working fine with django 1.7b1

Thank you very much.

No problem, glad to help!

I'm having a similar problem while trying to run a project, which works fine on my PC. I've set a virtualenv and installed the extra packages. Django console commands like syncdb or collectstatic are working fine, and the USERNAME_pythonanywhere_com_wsgi.py is configured according to the tutorial, but when the server starts and accesses urls.py, it raises:

AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

which is accompanied by:

ImportError: No module named 'adminplus'

for from adminplus.sites import AdminSitePlus, which is installed and appears in pip freeze.

What am I doing wrong? I would really appreciate your help!

Could I take a look at your files? We don't look at them without your permission, but if you let me know that I can look here on the forums then I'll be able to, and it might help debug.

Sure! I would be really grateful if you do.

Hi there -- OK, got it -- it looks like your web app uses Python 3.4, but in your virtualenv you've installed stuff for Python 3.3. The different Python versions have different sets of installed packages.

Virtualenv support for Python 3.4 is a bit flakey right now, so I recommend you delete your web app and create a new one using Python 3.3. Your old WSGI file will be backed up when you delete the existing web app, so you'll be able to recover your code from it for the new one.

It worked. Thank you a lot!

No problem!