Well, it turns out there's a very powerful feature baked into Django which can handle the task for us.
Contents contributed and discussions participated by pagetribe .
Build a Microblog with Django - Webmonkey - 0 views
-
-
Django includes an internal "dispatcher" which allows objects to listen for signals from other objects.
-
In our case, our tumblelog app is going to "listen" to our Entry and Link models. Every time a new Entry or Link is saved, those models will send out a signal. When the tumblelog app gets the signal it will automatically update itself.
Integrate Web APIs into Your Django Site - Webmonkey - 0 views
-
Link.objects.get_or_create( url = info['href'], description = info['extended'], tags = info.get('tag', ''), date = parsedate(info['time']), title = info['description']
-
But we don't want to have to log in to the shell every time we want to update our displayed list of bookmarks. In fact, we want our site to automatically update itself. To do that, we're going to write a quick python script and then run it through a cron job.
-
problem
- ...9 more annotations...
Standalone Django scripts - 0 views
-
Set DJANGO_SETTINGS_MODULE before you run
-
export DJANGO_SETTINGS_MODULE=yoursite.settings
-
# Cron jobs for foo.com run at 3AM DJANGO_SETTINGS_MODULE=foo.settings 0 3 * * * python /path/to/maintenance/script.py 30 3 * * * python /path/to/other/script.py # Cron jobs for bar.com run at 4AM DJANGO_SETTINGS_MODULE=bar.settings 0 4 * * * python /path/to/maintenance/script.py 30 4 * * * python /path/to/other/script.py
Django and Crontab: Best Friends - 0 views
Stuff: A Brief Pyjamas + Django Tutorial - 0 views
-
Django is a web framework written in Python. Pyjamas is a Python port of the google web toolkit (written in Java). Pyjamas can be used with Django to create web applications.
Overview - Applications for Django - 0 views
Digg-style pagination in Django | Ryan Kanno: The diary of an Enginerd in Hawaii - 0 views
Django cheat sheet (Mercurytide) - 0 views
-
Django cheat sheet
This Week in Django - 0 views
Screencast: Django Command Extensions | Surfing in Kansas - 1 views
-
Django Command Extensions from Eric Holscher on Vimeo.
Big list of Django tips (and some python tips too) | Surfing in Kansas - 0 views
-
Big list of Django tips
-
Writing managers is really simple, and they provide a better user interface to your code. This code snippet simply adds a latest() method to the default objects manager class ForecastDayManager(Manager): def __init__(self, *args, **kwargs): super(ForecastDayManager, self).__init__(*args, **kwargs) def latest(self): return self.get_query_set().order_by('forecast_date')[0] It can be called ForecastDay.objects.latest(). This is a trivial example, but there is a lot of power that lies in this functionality.
Working with models, part 2 - 0 views
-
Every Django model class and every instance of every Django model class has an attribute on it named _meta
1 - 16 of 16
Showing 20▼ items per page