wget http://github.com/zen4ever/pinax/raw/bpost-detail/pinax/templates/default/blog/post.html blog post fehler
$ cd ~/webapps/pinax07server
$ wget http://downloads.pinaxproject.com/pinax-0.7beta2.tar.gz">http://downloads.pinaxproject.com/pinax-0.7beta2.tar.gz
$ tar zxf pinax-0.7beta2.tar.gz
$ python2.5 pinax-0.7beta2/scripts/pinax-boot.py pinax-env
$ rm -Rf pinax-0.7beta2*
$ source pinax-env/bin/activate
(pinax-env) $ pinax-admin clone_project social_project myproject
NameVirtualHost 127.0.0.1:NNNN <VirtualHost 127.0.0.1:NNNN>
ServerName social.example.com WSGIScriptAlias / /home/my_account/webapps/pinax07server/myproject/deploy/myproject.wsgi ErrorLog "logs/myproject_2009_05_06.log" <Location "/site_media">
SetHandler none
</Location> Alias /site_media /home/my_account/webapps/static
~/webapps/pinax07server/myproject/settings.py:
- delete or comment out the DATABASE_xxxx lines SERVE_MEDIA = False MEDIA_ROOT = '/home/my_account/webapps/static/' MEDIA_URL = '/site_media/' ADMIN_MEDIA_PREFIX = '/site_media/admin/'
~/webapps/pinax07server/myproject/local_settings.py:
- This file does not exist upon project creation. Create it and add similar lines: DATABASE_ENGINE = 'postgresql_psycopg2' DATABASE_NAME = 'my_account_myproject' DATABASE_USER = 'my_account_myproject'
DATABASE_PASSWORD = '<db password>'
DATABASE_HOST =
DATABASE_PORT =
EMAIL_HOST='my_mailserver.webfaction.com' EMAIL_HOST_USER='my_account' EMAIL_HOST_PASSWORD='super-secret' EMAIL_PORT='25'DEFAULT_FROM_EMAIL = 'admin@example.com'
SERVER_EMAIL = 'site@example.com' SECRET_KEY = 'zu@=%fzjxrvtempi-@n-y#zcu(m(zzas-_5gam2aaf+*!9apibuq'
#YAHOO_MAPS_API_KEY = 'you will need this if you use locations feature' # sign up at https://developer.yahoo.com/wsregapp/">https://developer.yahoo.com/wsregapp/
Media Server
- Earlier in the control panel you created a static media server application. It's time copy the media files over and create symbolic links to the admin and Pinax media:
- $ cd ~/webapps/static $ cp -R ~/webapps/pinax07server/myproject/media/* ./ $ ln -sd ~/webapps/pinax07server/pinax-env/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/contrib/admin/media admin $ ln -sd ~/webapps/pinax07server/pinax-env/lib/python2.5/site-packages/Pinax-0.7beta2-py2.5.egg/pinax/media/default/pinax pinax
* Create a "mod_wsgi 2.0/Python 2.5" app rather than a Django one as Pinax will provide Django.
* Download Pinax 0.7 and untar
* run python2.5 scripts/pinax-boot.py <webfaction-app-directory>/pinax-env (e.g. pinax-env should be in same dir as apache2, etc
* (you can now remove the tarball and expanded dir)
* put your django/pinax project in the same directory as apache2 and pinax-env
In other words, your webfaction app directory (under webapps) should look something like this:
webapps/
my_webfaction_app/
apache2/
bin/
htdocs/
lib/
my_pinax_project/
pinax-env/
* activate your environment with source pinax-env/bin/activate
* at this point syncdb should work as should runserver
* edit apache2/conf/httpd.conf, remove the directory directive and add the lines:
WSGIPythonPath /home/<user>/webapps/<my_webfaction_app>/pinax-env/lib/python2.5/site-packages/
WSGIScriptAlias / /home/<user>/webapps/<my_webfaction_app>/<my_pinax_project>/deploy/pinax.wsgi
Media Server
$ cd ~/webapps/static
$ cp -R ~/webapps/pinax07server/myproject/media/* ./
$ ln -sd ~/webapps/pinax07server/pinax-env/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/contrib/admin/media admin
$ ln -sd ~/webapps/pinax07server/pinax-env/lib/python2.5/site-packages/Pinax-0.7beta2-py2.5.egg/pinax/media/default/pinax pinax
-- DetlevLengsfeld 2009-09-27 15:26:48
Python/Django/pinax - social plattform (last edited 2009-12-02 19:12:51 by DetlevLengsfeld)