background preloader

Django

Facebook Twitter

How to Tango with Django: A Python Django Tutorial. Effective Django — Effective Django. Welcome to DjangoRocks.com. 11 Things I Wish I Knew About Django Development Before I Started My Company: — Computer Science, Math, and Statistics. UPDATE: I’m currently available for Django/Machine-Learning/Design consulting.

11 Things I Wish I Knew About Django Development Before I Started My Company: — Computer Science, Math, and Statistics

If you are interested, please contact me: info@mathandpencil.com. For more info, please check out my firm Math & Pencil UPDATE: Part II of this article can be found here: I started Math & Pencil just about two years ago. Before I started the companies, I had almost zero web development experience (I’m a data guy) - I started a company learning HTTP, Javascript, AJAX, and Django MVC from scratch. 1.Start off with the right directory structure: Starting off, I looked at a few different open-source projects for guidence ([1] and [2]), read a few blogs, but never had good idea on the best way to setup a Django project. The apps directory stores all of your customized django apps and the vendor directory stores any apps you do not want to install (or can’t install) using pip or easy_install.

Starting a Django 1.6 Project the Right Way. Back in February of 2012, I wrote an article titled 'Starting a Django Project the Right Way', and later followed up with 'Starting a Django 1.4 Project the Right Way'.

Starting a Django 1.6 Project the Right Way

Both of these articles still draw a consistent audience and are referenced in numerous StackOverflow answers, corporate wikis, and tweets. With 1.5 and 1.6 already out, now seems like an appropriate time to update the article again. The beginning of a project is a critical time, when choices are made that have long term consequences. There are a number of tutorials about how to get started with the Django framework, but few that discuss how to use Django in a professional way, using industry accepted best practices to make sure your project's development practices scale as your application grows.

A small bit of planning goes a long way towards making your life (and the lives of any coworkers) easier in the future. By the end of this post, you will have Prerequisites. The Web framework for perfectionists with deadlines. The Django Book. Starting a Django Project. Build Your Own Dev Server with VirtualBox. Sun’s VirtualBox is ideal for testing different desktop environments (for example, browser testing), but I’ve discovered it’s also great for running a test server environment.

Build Your Own Dev Server with VirtualBox

Instead of setting up Apache, PHP, and MySQL right on your desktop machine, you can place them in a virtual Linux server. That way there’s no interference with your desktop, and you can ensure that your development environment is as close as possible to your eventual deployment environment. With a virtual Linux server running inside your desktop operating system, you can SSH into it, upload files to it, load web pages from it–whatever you’d do with a real live server. And all the software you need is free and simple to configure. Let’s make a start! Setting Up Shop The first step is to download the VirtualBox client. Installing Ubuntu inside Windows using VirtualBox. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Installing Ubuntu inside Windows using VirtualBox

The screenshots in this tutorial use Ubuntu 12.04, but the same principles apply also to Ubuntu 12.10, 11.10, 10.04, and any future version of Ubuntu. Actually, you can install pretty much any Linux distribution this way. Introduction VirtualBox allows you to run an entire operating system inside another operating system.

Please be aware that you should have a minimum of 512 MB of RAM. 1 GB of RAM or more is recommended. Comparison to Dual-Boot Many websites (including the one you're reading) have tutorials on setting up dual-boots between Windows and Ubuntu. Advantages of virtual installation The size of the installation doesn't have to be predetermined. Setting up a Linux virtual machine for easy web development on Windows. Posted 4 years ago.

Setting up a Linux virtual machine for easy web development on Windows

Tagged windows, linux, and django. Being a Windows user can be a real drag when trying to use technologies originally designed for the Unix world. This hardship is especially prominent in web development. While I do admire ASP.NET MVC, and enjoy being able to develop in C# as much as possible, my real passion right now is using Python with the Django framework. For simple applications, I often start out using Cygwin, the Django development server, and a sqlite database (side note: have you ever tried to get the MySQLdb library installed in Cygwin? Using Windows to access a Linux virtual machine by its host name.

Posted 4 years ago.

Using Windows to access a Linux virtual machine by its host name

Tagged windows and linux. In my previous post, I talked about using a Linux virtual machine to ease the pain of doing web development in Windows. There is one additional step I took to greatly ease the pain of interacting with the Linux machine. Initially, I had to interact with the server using its IP address. While this process was straightforward for initiating a simple SSH session, it became increasingly frustrating when I needed to access it using HTTP and FTP. I’d much rather just reference the Linux machine using its hostname. These instructions were written against Ubuntu 10.10 and may require some tweaking depending on which flavor of Linux you are using.

Sudo apt-get install samba And you’re done! If you need configure the name of your workgroup or want to use a different NetBIOS name, edit the file /etc/samba/smb.conf and make sure this information is present: workgroup = {WORKGROUP_NAME}netbios name = {NAME_YOU_WANT} Accessing and debugging the Django development server from another machine. Posted 4 years ago.

Accessing and debugging the Django development server from another machine

Tagged coding and django. In continuing my series about setting up a Linux virtual machine for Django development (see parts one and two), I wanted to share another tip for accessing the VM from the host machine. Set up development server to listen to external requests By default, when using the Django management runserver command, the development server will only listen to requests originating from the local machine (using the loopback address 127.0.0.1). Luckily, the runserver command accepts an IP address and port.