Showing posts with label django. Show all posts
Showing posts with label django. Show all posts

Saturday, August 27, 2011

Django + Google App Engine == love

The support for Django in Google app engine is almost completely perfect. The only thing missing is the fact that you cannot query on joins. A build of Django that is up to date and takes this fact into account is available called "django-norel"

To get started on converting Google App Engine Projects to Django you can view this post : http://code.google.com/appengine/articles/django-nonrel.html

And to get started on converting Pure Django projects on Google App Engine you should read this :
http://www.allbuttonspressed.com/projects/djangoappengine

Friday, August 19, 2011

All about django hosting

Django is by far the most popular web framework for Python. This was validated further when google app engine provided support for django templates.

So now that the python web framework battle is settled the question of hosting your application is the only one that remains (and will remain ... its a good thing).

Community Page
First off ... the official community page is : http://djangofriendly.com/hosts/

A more personalized page
This is a good link just as it is : http://djangohosting.com/

In Short (people's vote)
The most recommended shared host is webfaction.

My Personal recomendation
Feature wise https://www.alwaysdata.com/ is the best. You even get SSH access! Even make remote user accounts with differentiated permissions.
You can try them for free (not time limited) with a 10MB storage account.

Enjoy!

Thursday, August 18, 2011

Using the django version that comes with google app engine as your default

I have google app engine installed in my C: drive and the path to django looks like this :
I modified my PYTHONPATH adding "C:\Program Files\Google\google_appengine\lib\django_1_2;" at the end as shown (the ; should not be important but some ide's need it to scan properly):



To run the django tools from the command line (not google app engine specific ... valid for all django installations): 

I then added the django's bin folder "C:\Program Files\Google\google_appengine\lib\django_1_2\django\bin" to my system PATH as shown:


Next you need to fix the file association using the following registry script (save as .reg and merge)


Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\py_auto_file\shell\open\command] @="\"C:\\PYTHON\\App\\python.exe\" \"%1\" %*"


This basically adds this key:



Now you can test it from the command pro as follows :
"django-admin.py --version"



Enjoy!

Sunday, July 3, 2011

Code first development with .NET hits primetime

I remember code first development since the days of django :
https://docs.djangoproject.com/en/dev/intro/tutorial01/

This was on of the best database experience I have had.

Now the same thing is possible out of the box with .NET using code first devleopment. The launch blog post is here :
http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx

I just came across a really nice Associations tutorial here : http://weblogs.asp.net/manavi/archive/2011/05/17/associations-in-ef-4-1-code-first-part-6-many-valued-associations.aspx

Enjoy!