Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot import patterns django while deploying(pythonanywhere)
    primarykey
    data
    text
    <p>AoA I am trying to deploy my project(which i made on localhost) to <a href="http://www.pythonanywhere.com" rel="nofollow">pythonanywhere.com</a> I have followed all instruction( installed django 1.5, set up the wsgi.py file and changed all every file( views, urls, models, settings ) according to pythonanywhere... Now the problem is of setting the python 2.7( path on virtualenv ) when I reload app and navigate to my site, I get error something like this -> <a href="http://saadfast.pythonanywhere.com/" rel="nofollow">http://saadfast.pythonanywhere.com/</a></p> <p>whereas the config file wsgi file is -></p> <pre><code>activate_this = '/home/saadfast/.virtualenvs/django15/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) import os import sys sys.path.insert(0, '/home/saadfast/Wikipedia') path = '/home/saadfast/Wikipedia' if path not in sys.path: sys.path.append(path) os.environ['DJANGO_SETTINGS_MODULE'] = 'Wikipedia.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() </code></pre> <p>urls.py</p> <pre><code>from django.conf.urls import patterns, url import Wikipedia.views urlpatterns = patterns('', url(r'^$', 'Wikipedia.views.home_Page'), url(r'^home/$', 'Wikipedia.views.home_Page',name='home_view'), url(r'^search/$', 'Wikipedia.views.search_PageItems', name='search_view'), url(r'^article/(?P&lt;item&gt;[-\w]+)/$', 'Wikipedia.views.articleItem', name='article_view'), url(r'^get/(?P&lt;article_id&gt;\d+)/$', 'Wikipedia.views.article'), ) </code></pre> <p>the python environment path it is showing on debug page is something /usr/local.... but there is no /usr folder in the pythonanywhere directory, the directory structure is something like this</p> <pre><code>/ /home /temp /var </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload