Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Migrating Your App to Django
A few days ago I mentioned Changeset 384 which included a new command, django-admin.py inspectdb <dbname>. It has also been tweaked and improved since it was initially committed. The other day I tried it out on a simple database structure, but I decided to throw a more complex example at it. I decided to take the final depot application from the excellent Agile Web Development with Rails book. Beta books rule by the way. I executed the SQL in rails-code/depot_final/db/create.sql from the the code tarball to set up the database structure. I then created a new project with django-admin startproject and edited settings/main.py to tell Django how to log in to my mysql database. After exporting the correct DJANGO_SETTINGS_MODULE I ran django-admin.py inspectdb depot_rails which gave me the following model: # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Add primary_key=True to one field in each model. # Feel free to rename the models, but don't rename # db_table values or field names. # # Also note: You'll have to insert the output of # 'django-admin.py sqlinitialdata [appname]' # into your database. … -
Django middleware
In the django project settings there is a key called MIDDLEWARE_CLASSES which is a tuple of strings implementing the middleware methods. Django base handler (TBD explain what this class does) reads this setting and initializes three of its own attributes: _request_middleware, _view_middleware and _response_middleware. It goes through the list of middleware classes instantiates each of [...] -
django decorators
Django framework has used some design patterns. There is a directory called decorator which currently has two decorators: (decorator is just a method which dynamically adds additional functionality to original method depending on the situation) funcA = login_required(funcA) This replaces the funcA with a function which checks if the user is logged in and calls [...] -
Getting to know the django web framework
I was just about to abandon python and join the ruby camp to be able to use the wonderful rails framework for web application development. (They do have very good documentation and impressive video demo which you should check out!) But then came the announcement of Django. I really like the python language and feel [...] -
Django: Another "Rails" Web Framework
The Rails hype continues: Django for Python is the most recently announced of what is becoming a long line of web frameworks inspired by Ruby on Rails. Others that have popped up include MonoRail for .NET & Mono, Subway for Python, Trails for Java, Catalyst and Maypole for Perl. In the context of all these rails derivatives, this article on "Could Rails have been built without Ruby?" is an interesting read. [source] For PHP we have also cake and biscuit. -
Django: Another "Rails" Web Framework
The Rails hype continues: Django for Python is the most recently announced of what is becoming a long line of web frameworks inspired by Ruby on Rails. Others that have popped up include MonoRail for .NET & Mono, Subway for Python, Trails for Java, Catalyst and Maypole for Perl. In the context of all these rails derivatives, this article on "Could Rails have been built without Ruby?" is an interesting read. [source] For PHP we have also cake and biscuit. -
Subscribe to my newsletter
Want to get email when I write new blog posts? Sign up here to get an email every week with a summary of my latest posts. I’ll also occasionally include a few shorter thoughts or links that don’t fit as well here on the blog. -
Ways I'm available to help
Summary: want help? Email me: jacob@<this domain>. I’ve been lucky and privileged enough to have had a long and successful career. I’m now in a position to use my accumulated knowledge, network, and experience to help others, and I’d like to do so. This is a list of ways I think I can help; if you see something here that’d be useful to you, please email me. This isn’t an exhaustive list, but it is representative. -
Search Results
This content won’t be rendered. See https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae.