Snippet List
This code publishes an iCal file that can be subscribed to in Google Calendar. They change the way they interpret iCal data occasionally, so this may break, I'll try to keep it up to date.
There is some crazy string replace stuff going on there, I haven't yet convinced vObject to format things properly.
Feedback welcome.
*Note: this works for my existing feeds, but if I add a new feed to GCal, the timezones are incorrect, I'm working on that.
- calendar
- timezone
- google
- publish
- ical
- subscribe
A django admin command that takes a fixture and makes the target database the same as that fixture, deleting objects that in the database but not in the fixture, updating objects that are different in the database, and inserting missing ones.
Place this code in your_app/management/commands/syncdata.py
You will need to use manage.py (not django-admin.py) for Django to recognise custom commands (see http://www.djangoproject.com/documentation/django-admin/#customized-actions).
This snippet is the 'loaddata' command with this patch applied: http://code.djangoproject.com/ticket/7159 (with minor tweaks).
The intention is that 'dumpdata' on system A followed by 'syncdata' on system B is equivalent to a database copy from A to B. The database structure in A and B must match.
- admin
- database
- import
- commands
- copy
- command
- synchronise
- publish
2 snippets posted so far.