Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
350 votes
23 answers
129k views

How to manage local vs production settings in Django?

What is the recommended way of handling settings for local development and the production server? Some of them (like constants, etc) can be changed/accessed in both, but some of them (like paths to ...
akv's user avatar
  • 3,703
312 votes
14 answers
229k views

Create a directly-executable cross-platform GUI app using Python

Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux. The problem ...
Teifion's user avatar
  • 110k
197 votes
4 answers
93k views

How to customize a requirements.txt for multiple environments?

I have two branches, Development and Production. Each has dependencies, some of which are different. Development points to dependencies that are themselves in development. Likewise for Production. I ...
Charles R's user avatar
  • 18.8k
187 votes
8 answers
97k views

Deploying a minimal flask app in docker - server connection issues

I have an app whose only dependency is flask, which runs fine outside docker and binds to the default port 5000. Here is the full source: from flask import Flask app = Flask(__name__) app.debug = ...
Dreen's user avatar
  • 7,106
168 votes
5 answers
133k views

Maven equivalent for python [closed]

I'm a java developer/python beginner, and I'm missing my maven features, particularly dependency management and build automation (I mean you don't build, but how to create a package for deployment?) ...
Enno Shioji's user avatar
  • 26.7k
157 votes
25 answers
215k views

H14 error in heroku - "no web processes running"

error H14 happen while deploying to heroku this is my procfile: web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app log on heroku: 2017-01-23T10:42:58.904480+00:00 heroku[router]: at=error code=...
Ron Miles's user avatar
  • 1,593
88 votes
21 answers
113k views

Collectstatic error while deploying Django app to Heroku

I'm trying to deploy a Django app to Heroku, it starts to build, download and installs everything, but that's what I get when it comes to collecting static files $ python manage.py collectstatic --...
Stefano De Rosso's user avatar
81 votes
6 answers
23k views

Is virtualenv recommended for django production server? [closed]

I have always been using virtualenv for testing my app in localhost since I have isolated environment and can safely test new release of packages. Now It comes the time when I have to deploy my app ...
w00d's user avatar
  • 5,546
66 votes
2 answers
13k views

How do you use pip, virtualenv and Fabric to handle deployment?

What are your settings, your tricks, and above all, your workflow? These tools are great but there are still no best practices attached to their usage, so I don't know what is the most efficient way ...
64 votes
7 answers
22k views

How do I manage third-party Python libraries with Google App Engine? (virtualenv? pip?)

What's the best strategy for managing third-party Python libraries with Google App Engine? Say I want to use Flask, a webapp framework. A blog entry says to do this, which doesn't seem right: $ cd /...
a paid nerd's user avatar
  • 31.2k
63 votes
7 answers
19k views

How to set up a staging environment on Google App Engine

Having properly configured a Development server and a Production server, I would like to set up a Staging environment on Google App Engine useful to test new developed versions live before deploying ...
systempuntoout's user avatar
52 votes
4 answers
40k views

What is the Python equivalent of Tomcat?

This question likely betrays a misconception, but I'm curious what the "Tomcat" of the Python world is. All of my web programming experience is in Java (or Groovy) so I think in Java terms. And when ...
Eric Wilson's user avatar
  • 58.9k
43 votes
8 answers
15k views

How can I detect Heroku's environment?

I have a Django webapp, and I'd like to check if it's running on the Heroku stack (for conditional enabling of debugging, etc.) Is there any simple way to do this? An environment variable, perhaps? I ...
aviraldg's user avatar
  • 9,124
42 votes
9 answers
15k views

How do you deploy your WSGI application? (and why it is the best way)

I am deploying a WSGI application. There are many ways to skin this cat. I am currently using apache2 with mod-wsgi, but I can see some potential problems with this. So how can it be done? Apache Mod-...
Ali Afshar's user avatar
  • 41.4k
41 votes
5 answers
58k views

How to deploy packed python script on Windows?

This might sound like a very open ended question, but I am a python enthusiast, and pretty new to this world of development. I have developed a python script which takes in an input and gives an ...
Kshitij Yadav's user avatar
39 votes
10 answers
22k views

Deploying Google Analytics With Django

We're about to deploy a new Django website, and we want to use Google Analytics to keep track of traffic on the site. However, we don't want all of the hits on development instances to contribute to ...
Daniel Watkins's user avatar
37 votes
4 answers
19k views

Atlassian Bamboo with Django & Python - Possible?

At my company, we currently use Atlassian Bamboo for our continuous integration tool. We currently use Java for all of our projects, so it works great. However, we are considering using a Django + ...
TM.'s user avatar
  • 110k
37 votes
5 answers
32k views

How do I deploy a Python desktop application?

I have started on a personal python application that runs on the desktop. I am using wxPython as a GUI toolkit. Should there be a demand for this type of application, I would possibly like to ...
mmattax's user avatar
  • 27.5k
36 votes
7 answers
50k views

Django: Not Found static/admin/css

I just deployed my first Django app on Heroku but I notice that it doesn't have any CSS like when I runserver on the local machine. I know there's something wrong with static files but I don't ...
user avatar
35 votes
3 answers
16k views

How to ignore directories when running Django collectstatic?

I am running a small test project with Django 1.3, Ubuntu 11.10, gunicorn and Nginx, everything in a virtualenv, and now I'm running collectstatic to get my static files into the directory that Nginx ...
Mentakatz's user avatar
  • 735
32 votes
7 answers
67k views

How do I create a superuser account in Django 1.9.6

I am reading a book ("Learning Django Web Development" by Sanjeev Jaiswal and Ratan Kumar) on Django, but the book is based on an earlier version of Django (prior to version 1.9). In order to ...
Zach W's user avatar
  • 331
32 votes
5 answers
29k views

How to update code from Git to a Docker container

I have a Docker file trying to deploy Django code to a container FROM ubuntu:latest MAINTAINER { myname } #RUN echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main universe" >> /...
Cheruiyot Felix's user avatar
32 votes
1 answer
16k views

How can I use setuptools to generate a console_scripts entry point which calls `python -m mypackage`?

I am trying to be a good Pythonista and following PEP 338 for my package I plan on deploying. I am also trying to generate my executable scripts upon python setuptools install using setuptools ...
StrugglingProgrammer's user avatar
31 votes
2 answers
9k views

How to ForwardAgent yes using fabric?

I am successfully run()ning commands on remote server with my private key pair. However, I'd like to do git clone ssh://private/repo on remote server using my local key (or using local ssh agent I'm ...
Almad's user avatar
  • 5,833
31 votes
3 answers
17k views

How do you set up a Python WSGI server under IIS?

I work in a Windows environment and would prefer to deploy code to IIS. At the same time I would like to code in Python. Having read that IIS can run fastCGI application, I went to the IIS site where ...
minty's user avatar
  • 22.4k
31 votes
4 answers
8k views

Can a Python Fabric task invoke other tasks and respect their hosts lists?

I have a fabfile like the following: @hosts('host1') def host1_deploy(): """Some logic that is specific to deploying to host1""" @hosts('host2') def host2_deploy(): """Some logic that is ...
fabricquestion's user avatar
27 votes
4 answers
17k views

Custom distutils commands

I have a library called "example" that I'm installing into my global site-packages directory. However, I'd like to be able to install two versions, one for production and one for testing (I have a ...
dave paola's user avatar
  • 1,825
26 votes
3 answers
38k views

How to use virtualenvwrapper in Supervisor?

When I was developing and testing my project, I used to use virtualenvwrapper to manage the environment and run it: workon myproject python myproject.py Of course, once I was in the right virtualenv,...
MLister's user avatar
  • 10.3k
26 votes
4 answers
14k views

Deploying CherryPy (daemon)

I've followed the basic CherryPy tutorial (http://www.cherrypy.org/wiki/CherryPyTutorial). One thing not discussed is deployment. How can I launch a CherryPy app as a daemon and "forget about it"? ...
erikcw's user avatar
  • 11k
25 votes
4 answers
26k views

How to deploy Python to Windows users?

I'm soon to launch a beta app and this have the option to create custom integration scripts on Python. The app will target Mac OS X and Windows, and my problem is with Windows where Python normally ...
mamcx's user avatar
  • 16.1k
25 votes
4 answers
14k views

How can I have Google App Engine clear memcache every time a site is deployed?

The title asks it all. The content on the site I'm building wont change very quickly at all and so Memcache could potentially store data for months except for when I put up an update. Is there a way ...
donut's user avatar
  • 9,477
23 votes
4 answers
24k views

cx_Freeze - Preventing including unneeded packages

I have coded a tiny python program using PyQt4. Now, I want to use cx_Freeze to create a standalone application. Everything works fine - cx_Freeze includes automatically all necessary modules; the ...
Samufi's user avatar
  • 2,585
23 votes
1 answer
21k views

Which webserver to use with Django? (updated for use in 2011)

I am asking this question because I am a beginner and I've read almost 90% of articles speaking about Django, but the problem is: Django was made and had problems for deploying, it is python, and ...
Abdelouahab's user avatar
  • 7,509
22 votes
4 answers
51k views

supervisor.conf default location

Im trying to make automatic deployment including supervisord and confused by default settings path. Every deployment scheme I found use /etc/supervisor/supervisor.conf and /etc/supervisor/conf.d/ ...
mrjj's user avatar
  • 335
21 votes
3 answers
9k views

How do I turn a python program into an .egg file?

How do I turn a python program into an .egg file?
minty's user avatar
  • 22.4k
20 votes
5 answers
19k views

Error: No module named staticfiles

I'm newbie with django, I'm trying to deploy my project on a production server but I'm getting this error: Error: No module named staticfiles When trying to start the server: python manage.py ...
Mc-'s user avatar
  • 4,028
20 votes
8 answers
6k views

A simple Python deployment problem - a whole world of pain

We have several Python 2.6 applications running on Linux. Some of them are Pylons web applications, others are simply long-running processes that we run from the command line using nohup. We're also ...
EMP's user avatar
  • 61.1k
20 votes
4 answers
5k views

Deploying application with Python or another embedded scripting language

I'm thinking about using Python as an embedded scripting language in a hobby project written in C++. I would not like to depend on separately installed Python distribution. Python documentation seems ...
John Smith's user avatar
  • 4,462
19 votes
4 answers
11k views

Managing multiple settings.py files [duplicate]

Possible Duplicate: How to manage local vs production settings in Django? I have managed to deploy successfully a Django project on Apache's Web Server with mod_wsgi. I would like some ...
Pablo Santa Cruz's user avatar
19 votes
3 answers
8k views

How to get Fabric to automatically (instead of user-interactively) interact with shell commands? Combine with pexpect?

Seeking means to get Fabric to automatically (instead of user-interactively) interact with shell commands (and not just requests for passwords, but also requested user input when no "stdin/interactive ...
Johnny Utahh's user avatar
  • 2,468
19 votes
5 answers
739 views

How (in what form) to share (deliver) a Python function?

The final outcome of my work should be a Python function that takes a JSON object as the only input and return another JSON object as output. To keep it more specific, I am a data scientist, and the ...
Roman's user avatar
  • 129k
18 votes
12 answers
5k views

Why won't you switch to Python 3.x? [closed]

I ask this for deployable reasons. As in, if I write a solution in python, I feel bound to write to 2.x due to the lack of adoption of python 3. This is a major daily concern of mine, and I want to ...
Stefan Kendall's user avatar
18 votes
1 answer
9k views

Deploying Django (fastcgi, apache mod_wsgi, uwsgi, gunicorn)

Can someone explain the difference between apache mod_wsgi in daemon mode and django fastcgi in threaded mode. They both use threads for concurrency I think. Supposing that I'm using nginx as front ...
Roman Dolgiy's user avatar
  • 1,521
17 votes
13 answers
61k views

No web processes running Django in heroku

I was trying to deploy my application in heroku, but when i finally try to run my application in heroku I het in the browser this: Application Error An error occurred in the application and your page ...
Cris Towi's user avatar
  • 1,191
17 votes
2 answers
5k views

How is Deploying Flask on AWS Elastic Beanstalk different from running script?

What is the difference between deploying a Flask application on an ec2 instance (in other words running your script on any computer) and deploying a Flask application via AWS Elastic Beanstalk? The ...
Michael's user avatar
  • 13.7k
17 votes
5 answers
5k views

How to build and deploy Python web applications

I have a Python web application consisting of several Python packages. What is the best way of building and deploying this to the servers? Currently I'm deploying the packages with Capistrano, ...
sverrejoh's user avatar
  • 16.7k
16 votes
3 answers
3k views

Store static files on S3 but staticfiles.json manifest locally

I have a Django application running on Heroku. To store and serve my static files, I'm using django-storages with my S3 bucket, as well as the standard Django ManifestFilesMixin. I'm also using django-...
Danra's user avatar
  • 9,786
15 votes
6 answers
4k views

Is it a good practice to upgrade all python packages in production to their latest versions?

I am running a fairly complex Django application, for about a year now. It has about 50 packages in requirements.txt Whenever I need a new package, I install it with pip, and then manually add it in ...
Martin Taleski's user avatar
15 votes
2 answers
5k views

setup.py exclude some python files from bdist

I have a django project with this kind of architecture : setup.py project/ __init__.py manage.py settings/ __init__.py base.py dev.py urls/ __init__.py base.py dev.py I wanted to deploy it in a ...
Simon Urli's user avatar
15 votes
1 answer
4k views

PyCharm SSH tunneling via local ssh config (~/.ssh/config)

I use ssh deployment on servers via ssh tunnels, and each of its has specific options and port forwarding placed in ~/.ssh/config. PyCharm uses by default its own ssh client when using SFTP deploy. ...
skybobbi's user avatar
  • 1,586

1
2 3 4 5
33