It seems like Satchmo is the more popular choice for django based stores but I went with Lightning Fast Shop. It requires django 1.1 and Python 2.6 and runs fine on my Ubuntu box after default installation. Not so on the production server - I'm getting an ImportError that I suspect is something to do with the python path. The error log shows the folder in question is on the python path and I've got _init_.py in the folders I'm importing so I'm running out of ideas. So my quick question is are there any differences in the way that the python path is handled by the Redhat/mod_python setup compared to Ubuntu on my developer machine? I realize this is more a question for the django-lfs group (posted there too) but I've been stuck on this for days and looking for help anywhere. Any help is appreciated. asked 28 Nov '11, 23:03 Ginger_Prophet |
I'm not sure where you read that LFS requires Django 1.1 and Python 2.6. According to the prerequisites in the LFS docs, it can run on Python 2.6 or 2.7, and if you look at the I think the "No module named contact_form.forms" error you're currently seeing on your site is some kind of namespace collision happening because you have a mix of LFS 0.5x and LFS 0.6x packages installed in your buildout. Instead of trying to unwind that error, I think it would be easier for you to start over with a clean install of the latest version (0.6.0b5 at the time of this writing). I just played around with LFS a bit and got it running on mod_wsgi with Django 1.3.1. Here are the steps I took:
Wait a couple of minutes for that last site change to take effect, and you're ready to use the site! Now you can go to the URL of the site and log in to your LFS shop with the superuser credentials that you created when you ran " Just a couple of caveats:
Hope that helps! answered 29 Nov '11, 15:24 seanf Huge thanks seanf! I don't know where I got it stuck in my head that django1.1 was required. Just got home from work so I'll try it out now. Thanks again - I spent a good long time struggling with this.
(29 Nov '11, 18:31)
Ginger_Prophet
How do you have LFS use /static and also have a /static for media files?
(21 Mar '14, 20:07)
deinfinity
You are mis-reading it, it says to put the symlink app created in the previous step in /static/
(21 Mar '14, 23:34)
johns
|
I tried the above but on a lter version of both lfs and django, but got some errors, it aperas that the last line of the script (the command list), forgets about that the file lfs_project.wsgi is located directly above the lfs-installer folder. ...so when you do: sed -i 's/myproject/lfs_project/g' ../apache2/conf/httpd.conf you will have one additonal directory, lfs_project, in excess. Also to be mentioned is that the httpd.conf in apache points to a wsgi.py file, but in our case its name shall be lfs_project.wsgi to make script work fully I therefore changed it to bellow, and its been tested on lfs-0.7.7 with Django 1.4.3 (mod_wsgi 3.4/Python 2.7) (port 29030): cd ~/webapps/app_name/ ./apache2/bin/stop rm -rf lib/python2.7/{D,d}jango myproject wget http://pypi.python.org/packages/source/d/django-lfs/django-lfs-installer-0.7.7.tar.gz tar zxf django-lfs-installer-0.7.7.tar.gz cd lfs-installer python bootstrap.py ./bin/buildout -v # this will take a while to run and produce a lot of output, so be patient sed -i "s/'ENGINE': 'django.db.backends.'/'ENGINE': 'django.db.backends.postgresql_psycopg2'/g" lfs_project/settings.py sed -i "s/'NAME': ''/'NAME': 'db_name'/g" lfs_project/settings.py sed -i "s/'USER': ''/'USER': 'db_name'/g" lfs_project/settings.py sed -i "s/'PASSWORD': ''/'PASSWORD': 'db_password'/g" lfs_project/settings.py ./bin/django syncdb ./bin/django lfs_init ./bin/django collectstatic # answer YES cat > ../lfs_project.wsgi <<EOF import os import sys $( grep -B 1 -A 1 lfs-installer bin/django ) from django.core.handlers.wsgi import WSGIHandler os.environ['DJANGO_SETTINGS_MODULE'] = 'lfs_project.settings' application = WSGIHandler() EOF sed -i 's/myproject//g' ../apache2/conf/httpd.conf sed -i 's/wsgi.py/lfs_project.wsgi/g' ../apache2/conf/httpd.conf ../apache2/bin/restart answered 30 Jan '13, 03:28 magnus Thanks this helped, though I had to use bootstrap.py from here http://downloads.buildout.org/2/bootstrap.py instead. Note that the above methods remove django 1.4.3 and install django 1.3.1. Django 1.3.x is installed by the lfs 0.7.7 installer.
(16 Feb '13, 10:49)
sambapati
|
We'd be happy to look into it, but will need to see the website in question; there's no generic answer to an issue such as this.
If you are not comfortable posting a URL to your website, simply open a support ticket with the relevant details. Thanks!
Here's the website in question http://gprophet.webfactional.com/