File: sync_couchdb.py

package info (click to toggle)
python-couchdbkit 0.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 640 kB
  • ctags: 1,257
  • sloc: python: 7,240; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 339 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
from django.db.models import get_apps
from django.core.management.base import BaseCommand
from couchdbkit.ext.django.loading import couchdbkit_handler

class Command(BaseCommand):
    help = 'Sync couchdb views.'

    def handle(self, *args, **options):
        for app in get_apps():
            couchdbkit_handler.sync(app, verbosity=2)