27๐
I used Windows for quite some time for Django development, but finally figured out that Linux is simply the better way to go. Here are some reasons why:
- some Python packages can not be installed at all or correctly in Windows OR it will create a lot of hassle for you to do so
- if you need to deploy your Django app it makes more sense to use a Unix-flavored system, simply because its 99% likely that you deployment environment is the same. Doing a dry run on your local machine with the same configuration will save you a lot of time later on + here you are โallowedโ to make mistakes.
- If your apps gets complex its way easier in Linux to get the required dependencies, be it extensions, libraries, etc.. In Windows you end up looking for the right site to download everything and go through some hassle of installation and configuration. It took me lots of time to just search for some specific things sometimes. In Linux its often just an โapt-getโ (or similiar) and you are done.
- Did I mention that everything is faster to get and install in Linux?
Of course if your app is simple and you donโt need to care about the deployment then Windows is fine.
8๐
Although there are some benefits in using Linux for Python development (for example, some libraries only work on Linux); there is nothing stopping you from using Windows for django work; I use it everyday and nothing has yet to crop up.
The right IDE that you are comfortable with will go a long way towards making your development experience more enjoyable. Many people use Pydev with Eclipse; but I prefer PyCharm
A lot of the tutorials will show you a Linux or Mac desktop (and shell) and you can get the equivalent commands (like touch
, ls
and others) by installing unixtools
โ which are native versions of common unix tools.
You should bookmark this website which has Windows installers for common Python libraries.
- Django __call__() missing 1 required keyword-only argument: 'manager'
- Django โ Import views from separate apps
- How to emit SocketIO event on the serverside
2๐
It depends what operating system do you like most.
You could use Aptana 3 with pydev(included) for development.
When developing remember about use of โosโ python lib for paths to dirs, so your application will work correctly under windows and linux.
For example:
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'site_media')
- You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware
- Changing password in Django Admin
- TimeField format in Django template
- Django reverse error: NoReverseMatch
1๐
django is written in pure python, so using Windows + Eclipse + PyDev for development is enough.
if you really want to follow the cool guys using some Linux commands, then have cygwin or mingWin installed and set the system PATH to BIN directive. Then, you could use them (include your touch).
Linux is best choice for deployment of a django project, where you can easily compile / install / configure some cool things like nginx, uWSGI, mod_wsgi, Apache2, and many many useful Python C extensions.
Another reason for using Linux, is that virtual private servers, which are used to host projects, are more likely to support it.
1๐
I normally use OSX on my desktop, but I use Linux for Python because thatโs how it will get deployed. Specifically, I use Ubuntu Desktop in a virtual machine to develop Python applications and I use Ubuntu on the server to deploy them. This means that my understanding of library and module requirements/dependencies are 100% transferrable to the server when Iโm ready to deploy the application.
If I used OSX (or Windows) to develop Python apps I would have to deal with two different methods of handling requirements and dependencies โ itโs just too much work.
My suggestion: use VMWare Player (itโs free) and find a Ubuntu VM to start learning. Itโs not too complicated and is actually quite fun.
- Django ALLOWED_HOSTS with ELB HealthCheck
- Django AttributeError 'tuple' object has no attribute 'regex'
- Executing a Django Shell Command from the Command Line
- How can I automatically let syncdb add a column (no full migration needed)