webfaction

serving django media (user uploaded) files in production

江枫思渺然 提交于 2020-01-03 17:50:28
问题 I have deployed my django website onto webfaction hosting service and i am struggling to find how i can serve user uploaded media files in production. There are lot of question regarding how to serve media files in development, but there seems to be nothing about serving media (user uploaded ) files in production. At present, my django app looks like below in production. django_project | ---> media ---> static (these are served through collectstatic and no problem with this) ---> appname1 ---

serving django media (user uploaded) files in production

烂漫一生 提交于 2020-01-03 17:50:01
问题 I have deployed my django website onto webfaction hosting service and i am struggling to find how i can serve user uploaded media files in production. There are lot of question regarding how to serve media files in development, but there seems to be nothing about serving media (user uploaded ) files in production. At present, my django app looks like below in production. django_project | ---> media ---> static (these are served through collectstatic and no problem with this) ---> appname1 ---

How to set up osqa at webfaction

隐身守侯 提交于 2020-01-03 03:11:27
问题 requirements.txt file: django>=1.1 mysql-python python-openid psycopg2 html5lib markdown git+git://github.com/dcramer/django-sphinx.git South first, virtualenv ~/webapps/ --distribute source ~/webapps//bin/activate export PATH=/usr/pgsql-9.1/bin/:$PATH (this is to avoid the pg_config not found error http://community.webfaction.com/questions/736/installing-psycopg2) then pip-2.7 install -r requirements.txt And remember don't do pip install which install into 2.4; need to invoke pip-2.7 install

Scrapy project can't find django.core.management

半世苍凉 提交于 2019-12-29 08:09:05
问题 I'm trying to follow the method here to 'Scrapy' data from the web and simultaneously save that data directly to my Django database using Scrapy's item pipeline. However, when I try to run scrapy crawl spidername , I'm getting the error: ImportError: No module named django.core.management At first I thought it was because my Scrapy project was outside of my Django project folder, but even after I moved the whole project into my Django project folder I kept getting the same error. If I open a

Webfaction Django 1.4.1: easy_thumbnails 3.0b – “Couldn't get the thumbnail” error

跟風遠走 提交于 2019-12-25 13:54:17
问题 I use easy_thumbnails and it works fine on a development machine but in production I get errors like shown below, when I use {% thumbnail photo.image 300x170 %} templatetag. Though can directly browse http://sitename.com/media/uploads/2012/09/13/microsoft1.jpeg`. Also media set correctly and uploads are being placed at the right place, what is missing then what might be wrong? File "/home/imanhodjaev/lib/python2.7/django/template/base.py" in render 823. bit = self.render_node(node, context)

Ruby on Rails Mongoid and Webfaction: Not Authorized For Query (Error 16550)

两盒软妹~` 提交于 2019-12-24 02:56:16
问题 I am using version 2.4.4, followed the procedures at http://docs.webfaction.com/software/mongodb.html and am using Mongoid with Ruby on Rails. I also have created a user at the db I am using with the "userAdminAnyDatabase" permission and am using it with this rails mongoid config: production: sessions: default: database: <table> hosts: - localhost:<port> username: <user> password: <password> I have the server runing with --auth flags and I also tried the user with the mongodb cpmmand line and

Hiding secure django settings info on webfaction

ε祈祈猫儿з 提交于 2019-12-19 04:45:30
问题 I am trying to hide secure info like database password of a django application on webfaction. But I could not find how and where to set these infos using environmental variables? 回答1: Add them to your bash_profile . Once you SSH in run: nano ~/.bash_profile Then add your desired variables and save it. Example: export DATABASE_URL=postgres://username:password@host:port/databasename This will create an environment variable named DATABASE_URL with the contents of your string. To test, run echo

STATIC_ROOT in Django on Server

百般思念 提交于 2019-12-18 12:34:17
问题 I'm 2hours stuck in a issue about STATIC_URL and STATIC_ROOT when I try to make run the webapp on my server at webfactional. when I load the webpage all the requests works well, except by the fact that any link with {{ STATIC_URL}} is working or loading. So a common error that appears on firebug is: GET http://mydomain/static/extras/h5bp/js/libs/modernizr-2.5.3.min.js 500 (Internal Server Error) My setup is: urls.py I did nothing, and there's nothing about static files. settings.py DEBUG =

Setting up django for css file

ぃ、小莉子 提交于 2019-12-12 22:18:26
问题 I am a newbie to django and trying to create a personal tech blog. I am hosting on webfaction. I have setup the blog using this video. But the stylesheets are not working. I followed the step-by-step procedure to create the static files mentioned by webfaction but still the stlyesheet is not working. I have created a static application: staticapp and added it to the website with /static as mentioned in the webfaction doc. In settings.py : STATIC_ROOT = 'home/myaccount/webapps/staticapp'

Running Flask-SocketIO on WebFaction through mod_wsgi

元气小坏坏 提交于 2019-12-12 03:36:19
问题 I have deployed a Flask application on Webfaction using mod_wsgi. My application is pretty simple but does implement Flask-SocketIO which is giving me troubles. My code works fine on my localhost but now that it is running on my Webfaction server the client is unable to connect to my socket. I'm not quite sure where my problems are coming from – I'm assuming I haven't set up my apache config file properly but this may not be true. On the client side I receive a 400 (Bad Request) error on both