Skip to content

Commit

Permalink
prepared it to work with django 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe committed Aug 11, 2012
1 parent 9b0d248 commit 62b999a
Show file tree
Hide file tree
Showing 36 changed files with 298 additions and 350 deletions.
8 changes: 4 additions & 4 deletions django_mongokit/mongodb/base.py
Expand Up @@ -130,17 +130,17 @@ def _drop_database(self, database_name):
self.connection.connection.drop_database(database_name)




class DatabaseWrapper(BaseDatabaseWrapper):
operators = {}
_commit = ignore
_rollback = ignore

autocommit = None # ignore
autocommit = None # ignore

def __init__(self, settings_dict, alias=None, # alias was added in Django 1.2
def __init__(self, settings_dict, alias=None, # alias was added in Django 1.2
*args, **kwargs):
super(DatabaseWrapper, self).__init__(settings_dict, alias=alias, *args, **kwargs)

if settings_dict['HOST']:
kwargs['host'] = settings_dict['HOST']
if settings_dict['PORT']:
Expand Down
9 changes: 4 additions & 5 deletions django_mongokit/test_settings.py
Expand Up @@ -14,16 +14,16 @@

DATABASES = {
'default': {
'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'example-sqlite3.db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
},
},
'mongodb': {
'ENGINE': 'django_mongokit.mongodb',
'NAME': 'example',
'ENGINE': 'django_mongokit.mongodb',
'NAME': 'example',
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
Expand Down Expand Up @@ -99,4 +99,3 @@
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
)

2 changes: 1 addition & 1 deletion django_mongokit/version.txt
@@ -1 +1 @@
0.2.2
0.2.3
11 changes: 0 additions & 11 deletions exampleproject/manage.py

This file was deleted.

86 changes: 0 additions & 86 deletions exampleproject/settings.py

This file was deleted.

107 changes: 0 additions & 107 deletions exampleproject/settings_django11.py

This file was deleted.

42 changes: 0 additions & 42 deletions exampleproject/test_runner.py

This file was deleted.

8 changes: 0 additions & 8 deletions exampleproject/test_settings.py

This file was deleted.

20 changes: 0 additions & 20 deletions exampleproject/urls.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 62b999a

Please sign in to comment.