andreirk / django-hotclub

Automatically exported from code.google.com/p/django-hotclub
0 stars 0 forks source link

'things' in Pinax 0.5.1 breaks with recent django trunk (r9729) #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Pinax 0.5.1
2. Install Django from trunk
3. Try to use projects or tribes

What is the expected output? What do you see instead?

I expect to see the pages for projects or tribes - I see an error message:

"Could not determine relationship on related name topics"

What version of the product are you using? On what operating system?
Pinax 0.5.1
Django r9729
Debian Linux

Please provide any additional information below.
Switching to Django 1.0.2 cleared up the problem.

Original issue reported on code.google.com by davidrey...@googlemail.com on 12 Jan 2009 at 9:01

GoogleCodeExporter commented 9 years ago
To add a bit of clarity to this for those who want to look into this, the 
exception came from django-things. The 
exception is gone from dpaste too, bummer.

Original comment by bros...@gmail.com on 13 Jan 2009 at 1:23

GoogleCodeExporter commented 9 years ago
Brosner: I've recreated the Traceback: http://dpaste.com/hold/108444/

Original comment by davidrey...@googlemail.com on 13 Jan 2009 at 9:26

GoogleCodeExporter commented 9 years ago

Original comment by flo...@gmail.com on 14 Jan 2009 at 9:36

GoogleCodeExporter commented 9 years ago
I can reproduce this with Pinax trunk and Django 1.0.2 :-(

Original comment by jtau...@gmail.com on 21 Jan 2009 at 5:18

GoogleCodeExporter commented 9 years ago
Here's a patch I should have submitted earlier: it's probably easiest just to 
patch locally until django-things is 
fixed but it could be monkey-patched after detecting which version of the child 
table data structure is 
returned.

Index: apps/external_apps/things/fields.py
===================================================================
--- apps/external_apps/things/fields.py (revision 47)
+++ apps/external_apps/things/fields.py (working copy)
@@ -123,8 +123,9 @@
             children = related_manager.all().query.where.children
             related_column_name = None
             for child in children:
-                if child[0][0] == related_table:
-                    related_column_name = child[0][1]
+                # BUG: This data-structure is in flux between Django-trunk and 
django-things trunk:
+                if child[0] == related_table:
+                    related_column_name = child[1]
                     break
             if related_column_name is None:
                 raise ValueError("Could not determine relationship on related name %s" % self.field_name)

Original comment by adamsc@gmail.com on 21 Jan 2009 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by pyDanny on 13 Mar 2009 at 4:17

GoogleCodeExporter commented 9 years ago
i still get this error even with the patch...

Original comment by pco...@gmail.com on 18 Mar 2009 at 4:32

GoogleCodeExporter commented 9 years ago
It looks like the version of 5.1 I downloaded already has the patch applied, but
nonetheless I'm still getting the same error.

http://dpaste.com/hold/21294/

Sorry if this is uncomfortably close to "+1 Me too!"

Original comment by verybut...@gmail.com on 30 Mar 2009 at 8:24

GoogleCodeExporter commented 9 years ago
I have verified that this is done and closed for release 0.7. This may fail in 
0.5.1
but support for that release ends shortly.

Original comment by pyDanny on 1 Apr 2009 at 3:10

GoogleCodeExporter commented 9 years ago
For those still using 0.5.1 with the patch applied and you're *still* getting 
ValueError at /projects/, the fix <a 
href="http://groups.google.com/group/pinax-
users/browse_thread/thread/9d7d2d8aa7932eb/43ea64c43a3a1d7e?
lnk=gst&q=ValueError+at+%2Fprojects%2F#43ea64c43a3a1d7e">here</a> worked for me:
http://groups.google.com/group/pinax-users/browse_thread/thread/9d7d2d8aa7932eb/
43ea64c43a3a1d7e?
lnk=gst&q=ValueError+at+%2Fprojects%2F#43ea64c43a3a1d7e

Original comment by jhea...@earthlink.net on 6 Apr 2009 at 1:00