WebFaction
Community site: login faq

Hi,

I'm planning to use some reusable apps such as django-contact-form, django-uni-form.etc for django which I would like to share with multiple django sites. However I'm unsure where should I place them as I'm pretty new to django and web development in general. Do I place it in my project folder or in python2.6 folder together with django?

asked 21 Nov '10, 22:58

neb
2126
accept rate: 0%


Hi Neb,

If you would like to run the same version for all of the sites you can put it in

  $HOME/lib/python2.x

Where x is your Python version. The PYTHONPATH Hierarchy works like this:

modified PYTHONPATH
/usr/lib/python2.x
/home/user/lib/python2.x
/home/user/webapps/appname/lib/python2.x
your configured WSGI paths

So if you put it at the /home/user/lib/python2.x level it will be accessible by all of your apps.

permanent link

answered 21 Nov '10, 23:04

klynton
1.6k1210
accept rate: 41%

edited 21 Nov '10, 23:08

Hi, got to that stage, I saw python2.3, python2.4, python2.5 inside /home/user/lib/python2.x. I'm running my django site on python 2.6 with the 1 click install, so do i need to create a new folder called python2.6 there?

(21 Nov '10, 23:26) neb

If the directory isn't there you will need to create the python2.6 folder.

(21 Nov '10, 23:32) klynton

thx for the help, will create a folder then :). However I saw something like a .ph file in other folders, any use for them?

(22 Nov '10, 00:11) neb

Those ".pth" files are usually created by easy_install when you first run it.

(22 Nov '10, 00:13) klynton
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909

question asked: 21 Nov '10, 22:58

question was seen: 2,838 times

last updated: 22 Nov '10, 00:13

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM