background preloader

Django

Facebook Twitter

Wagtail CMS - elegant, easy, open source content management. Migrating a Django app from MySQL to PostgreSQL. We just finished migrating the database for our Django 1.6 app from MySQL to PostgreSQL.

Migrating a Django app from MySQL to PostgreSQL

If you have a clean environment this process is as simple as running syncdb and/or migrate to create the tables, truncating the data in those tables, and running the dumpdata and loaddata management commands. Here are the steps to do this: Step 1: Create an empty database in your PostgreSQL instance CREATE DATABASE dbname OWNER rolename; Django - Full Stack Python. Django is a widely-used Python web application framework with a "batteries-included" philosophy.

Django - Full Stack Python

The principle behind batteries-included is that the common functionality for building web applications should come with the framework instead of as separate libraries. For example, authentication, URL routing, a templating system, an object-relational mapper (ORM), and database schema migrations (as of version 1.7) are all included with the Django framework. Compare that included functionality to the Flask framework which requires a separate library such as Flask-Login to perform user authentication.

The batteries-included and extensibility philosophies are simply two different ways to tackle framework building. Chicago Django/Python Blog - Imaginary Landscape Blog. A core challenge of setting up a Django project is creating a production-worthy server environment and project setup.

Chicago Django/Python Blog - Imaginary Landscape Blog

At Imaginary Landscape, we've put a lot of thought into how to accomplish this task in an intuitive and flexible way. DjangoTricks: How to Store Your Media Files in Amazon S3 Bucket. In this article, I will show you how to use Amazon Simple Storage Service (S3) to store your media files in the cloud.

DjangoTricks: How to Store Your Media Files in Amazon S3 Bucket

S3 is known and widely used for its scalability, reliability, and relatively cheap price. It is free to join and you only pay the hosting and bandwidth costs as you use it. The service is provided by Amazon.com. S3 tends to be attractive for start-up companies looking to minimize costs. Ultimate Front End Development Setup. By Frank Wiles on Oct 21, 2014.

Ultimate Front End Development Setup

Effective Django — Effective Django. Django Models in no time. Django Class-Based-View Inspector. Python pycharm – configuring remote interpreters from Windows to Linux. We Recommend These Resources If you are an avid Python developer, you may all be excited about the new features available in the Pycharm 2.5 release, especially the remote interpreters, virtualenv and setup.py support.

Python pycharm – configuring remote interpreters from Windows to Linux

You can read more about the new exciting features here.

Testing

How to Tango with Django: A Python Django Tutorial. Save yourself Time On many occasions we’ve seen clever students get stuck, spending hours trying to fight with Django and other aspect of web development, usually because a key piece of information was not provided or something was not clear.

How to Tango with Django: A Python Django Tutorial

While the occasional blip might set you back 10-15 minutes, sometimes they can take hours to resolve. We’ve tried to remove as many of these hurdles as possible. This will mean you can get on with developing your application, and not figuring out another piece of the puzzle. Configuration management - a look at Ansible. A year or so ago I looked around at some of the tools available for doing software configuration management.

Configuration management - a look at Ansible

I was in the process of deploying a Django application and stumbled upon this great (and kind of long) workshop video by Jacob Kaplan-Moss, one of the creators of Django. It’s a great resource for learning about web applications in general, talking about subjects such as reverse proxys and spoon feeding and automatic deployments. One of the things Jacob mentioned in the video was that he wasn’t happy with the tools available for configuration management software within the Python space. The major options include Chef and Puppet, which both are written in Ruby and uses a Ruby DSL for configuring. I haven’t tried Chef, but I have been digging into Puppet. It turns out, that about the same time I did look around, a new alternative was launched called Ansible, written in Python. I haven’t done a lot with it yet. The easiest config management system to use, ever.

. ← Go Back. Mezzanine Workflow. Posted by: Ken Bolton 1 year, 2 months ago (0 comments) This is the basic Mezzanine workflow to get projects completed rapidly.

Mezzanine Workflow

Bit of Pixels. Docs / Mezzanine / A Mezzanine Tutorial, Take 2. Contents Introduction: Greetings Mezzaniners, When I brought the first version of this site up a I wrote an, ah...difficult to read article on how the site was built using Mezzanine.

Docs / Mezzanine / A Mezzanine Tutorial, Take 2

Oh sure, you could copy/paste diff files and generate the changes for each step in the process. Django and Static Files - Do I Smell Burning? Django’s handling of static files is great, but sometimes causes confusion. If you’re wondering how it all fits together, what some of the settings mean, or just want some example uses, then keep reading. Introduction. SASS is low hanging fruit for lots of easy win. — Jamie Curle. Django - How can I setup Nginx Proxy Buffering with Gunicorn over Amazon EC2. Serving Django as a Nginx & Supervisord Sandwich with a Gunicorn Filling. — Jamie Curle.

I've toyed with a few ways of serving Django applications, but finally I've got one that I think is super tasty and nice and lean. When serving Django it's easy to feel like there are too many technologies involved. At first it's hard to know which parts do what. In an attempt to straighten out some confusion for you this post outlines how I do it. At the heart of this setup there are three technologies and they're organised like a sandwich. Setting Up Your Own Sentry Server. If you are hosting a Django site, Sentry will make your life easier.

After my review of various hosting companies I decided to put EnvelopeBudget.com on Webfaction. Modern web development workflow with AngularJS - Adolfo Benedetti. Tags: django (We’re using AngularJS in a couple of Django projects, so I decided to go to an AngularJS meeting in Haarlem, the Netherlands. This is a summary of the second talk.) Adolfo’s talk is about structuring your web projects with Yeoman and Maven.

Yeoman is build by the same team as AngularJS, so he started looking at how to integrate it with his Java-based workflow. On the backend, you can control your environment pretty fine. He mentioned git flow as the ideal way to manage your source code. Maven provides developers with ways to manager builds, reports, documentation, installation and so on. Ok, in his demo he set up some java project with archetype, jersey and other things I never heard about. Good point however: he copy/pasted a testcase into the project, too, so he did test driven development. Multiple sites, single application in Django.

Russell, I am working through something similar and I think that the basic structure would be to have project folders for each site plus a folder for your shared applications (whose models use the 'Site' object and 'CurrentSiteManager'. Serving Django Static Files on Heroku - Max Burstein's Blog. Serving Django Static Files on Heroku (Posted on December 15th, 2012) Realtime Django Using Node.js and Socket.IO - Max Burstein's Blog. Our goal for today is to build a realtime chatroom using Django, Redis, and Socket.IO. Zero to Django in 4 months - What I've learned - Part 1. Effective Django — Effective Django. Nyergler/effective-django-tutorial. Django: how to evaluate a project for refactoring.

Beginner DevOps with Django and Fabric. The Intro. YetiHQ/yeti-fab. Djangocon_Finland_2012_05_26_kaleva.pdf. Faster Django view unit tests with mocks. 27 Jul 2012 Unit tests need to be fast.