Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merging in the fix from @akinfold as well as another that was giving a

bug on relationships.clear() due to a missing 'through'...good to go
passing on 1.3 and 1.4
  • Loading branch information...
commit 6eec835a76f19c0560c2987c0f9653a02440d558 1 parent c4b264c
Charles Leifer authored September 05, 2012
5  relationships/models.py
@@ -271,11 +271,12 @@ class RelationshipsDescriptor(object):
271 271
         def __get__(self, instance, instance_type=None):
272 272
             manager = RelatedManager(
273 273
                 model=User,
274  
-                query_field_name='related_to__pk',
  274
+                query_field_name='related_to',
275 275
                 instance=instance,
276 276
                 symmetrical=False,
277 277
                 source_field_name='from_user',
278  
-                target_field_name='to_user'
  278
+                target_field_name='to_user',
  279
+                through=Relationship,
279 280
             )
280 281
             return manager
281 282
 
15  runtests.py
@@ -14,13 +14,20 @@
14 14
     db_name = ''
15 15
 
16 16
 if not settings.configured:
  17
+    if django.VERSION < (1, 4):
  18
+        tl = (
  19
+            'django.template.loaders.filesystem.load_template_source',
  20
+            'django.template.loaders.app_directories.load_template_source',
  21
+        )
  22
+    else:
  23
+        tl = (
  24
+            'django.template.loaders.filesystem.Loader',
  25
+            'django.template.loaders.app_directories.Loader',
  26
+        )
17 27
     settings.configure(
18 28
         DATABASES=dict(default=dict(ENGINE=db_engine, NAME=db_name)),
19 29
         SITE_ID = 1,
20  
-        TEMPLATE_LOADERS = (
21  
-            'django.template.loaders.filesystem.load_template_source',
22  
-            'django.template.loaders.app_directories.load_template_source',
23  
-        ),
  30
+        TEMPLATE_LOADERS = tl,
24 31
         MIDDLEWARE_CLASSES = (
25 32
             'django.middleware.common.CommonMiddleware',
26 33
             'django.contrib.sessions.middleware.SessionMiddleware',

0 notes on commit 6eec835

Please sign in to comment.
Something went wrong with that request. Please try again.