Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed db_router as it was nevery really supposed to be committed.. …

…opps
  • Loading branch information...
commit 18d2224d878057168ae952b1e914d3f74279cadf 1 parent 73d0800
Jonathan Moss authored
Showing with 0 additions and 37 deletions.
  1. +0 −37 achtung/db_router.py
View
37 achtung/db_router.py
@@ -1,37 +0,0 @@
-from django.contrib.sites.models import Site
-
-
-class DbMap(dict):
-
- def __getitem__(self, key):
- return {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': 'django_achtung',
- 'USER': 'root',
- 'PASSWORD': 'ran32dom',
- 'HOST': '',
- 'PORT': '',
- 'OPTIONS': {
- 'init_command': 'SET storage_engine=INNODB',
- }
- }
-
-class DomainRouter(object):
- """A router to control which database is used by which domain"""
-
-
- def get_db_from_domain(self):
- print Site.objects.get_current()
- return 'default'
-
- def db_for_read(self, model, **hints):
- return self.get_db_from_domain()
-
- def db_for_write(self, model, **hints):
- return self.get_db_from_domain()
-
- def allow_relation(self, obj1, obj2, **hints):
- return None
-
- def allow_syncdb(self, db, model):
- return True
Please sign in to comment.
Something went wrong with that request. Please try again.