Note that there are some explanatory texts on larger screens.

plurals
  1. POVirtualenv and Django apps not playing well together
    primarykey
    data
    text
    <p>I have decided that it was time to move to virtualenv for my django projects. All is working well except one thing. Even though the apps installed with pip into my virtualenv can be imported into my project without issue, any .urls, templates, template tags, etc. in those apps are not found when running the dev server.</p> <p>I checked my python path in the environment and the site-packages directory with my installs are in the path. </p> <p>Anyone know what I might be doing wrong?</p> <p>--- added information ---</p> <p>Since I am still having issues, I am adding more information to this ticket. I am sure it is something I am doing, just can't figure out what it is. Starting with a fresh environment, tested on both ubuntu and osx.</p> <pre><code>virtualenv --no-site-packages testpjt </code></pre> <p>Then I use pip to add just django and django smuggler. Here is the requirements text</p> <pre><code>-e svn+http://code.djangoproject.com/svn/django/trunk#egg=Django django-smuggler==0.1.1-final </code></pre> <p>Then I install requirements with pip</p> <pre><code>pip install -E testpjt -r requirements.txt </code></pre> <p>Every thing seems to install fine. So I start the virtual environment and make the following changes to files:</p> <pre><code>source ../bin/activate </code></pre> <p>Add smuggler to installed apps:</p> <pre><code> INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'smuggler', ) </code></pre> <p>Add admin and smuggler to the urls.py</p> <pre><code>from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include('smuggler.urls')), (r'^admin/', include(admin.site.urls)), ) </code></pre> <p>I then sync the db and start the server:</p> <pre><code>../bin/python manage.py runserver 0.0.0.0:8000 </code></pre> <p>I can go to ip/admin and I get the admin interface.. I go to ip/admin/load (dump, any of the smuggler urls) and I get a 404.</p> <p>For testing I can enter the django shell and:</p> <pre><code>from smuggler import urls </code></pre> <p>and get no errors, so I know they are there.</p> <p>If I put a copy of smuggler in the base of my project directory it works just fine.</p>
    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.
 

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