2008-8-2
| 23:32 | espeed | admin.site.register(Entry, EntryAdmin) |
| 23:32 | rozwell | espeed: you have to have the autodiscover bit etc. in your urls.py |
| 23:32 | hylje | don't paste on the channel |
| 23:32 | DeadPanda | peritus: it's still in ther e- django.db.models.fields.related.create_many_related_manager :( |
| 23:32 | rozwell | espeed: if that's your app/admin.py, that's fine for that |
| 23:32 | peritus | DeadPanda: what are broken/missing? |
| 23:32 | rozwell | espeed: now make sure your project's urls.py is as the tutorial shows you |
| 23:33 | DeadPanda | peritus: nothing's broken, it just looks like a PITA to debug |
| 23:34 | espeed | I have admin.autodiscover() in urls.py, and the admin page is working, just no reference to Entry |
| 23:34 | rozwell | DeadPanda: i don't know how it would be any easier to debug if the class wasn't defined in the function's local namespace |
| 23:34 | rozwell | espeed: what revision of trunk are you using? |
| 23:34 | espeed | checked out today... |
| 23:35 | rozwell | espeed: trunk admin was/is broken a day or two ago |
| 23:35 | espeed | ...I'll update it...be back in a sec... |
| 23:42 | k0001 | guys |
| 23:43 | k0001 | is is normal that authtestdata.json fixtures (from django/contrib/auth/fixtures) automatically load when runing ./manage.py test ? |
| 23:43 | rozwell | k0001: yes |
| 23:43 | rozwell | k0001: any installed apps tests will be run |
| 23:44 | k0001 | rozwell: ohh, i see =) thanx |
| 23:47 | k0001 | rozwell: nevermind... i was inheriting from unittest.TestCase instead of django.test.TestCase .. so i was getting weird results =) |
| 23:49 | davidcramer | ugh how do i use __import__ to do something like from N import * |
| 23:49 | hylje | i think you don't |
| 23:50 | davidcramer | -.- |
| 23:50 | davidcramer | theres a bad way, but theres gotta be a better way |
| 23:51 | hylje | import the module and use it instead (e.g. dynmodule.foo) |
| 23:52 | davidcramer | well i wanted to make a .current module, which did the import and just did an import * from it |
| 23:53 | hylje | hm? |
| 23:53 | davidcramer | sec let me show you my code |
| 23:54 | davidcramer | |
| 23:54 | davidcramer | basically i want this "current.py" to be a virtual module |
| 23:55 | hylje | why don't you __import__ the real module directly |
| 23:55 | davidcramer | because this would simplify things |
| 23:55 | davidcramer | so i could just do import current all the time and have access to everything |
| 23:55 | davidcramer | WAIT |
| 23:55 | davidcramer | i got it :) |
| 23:55 | davidcramer | this is cake |
| 23:56 | davidcramer | locals() = sphinxapi.locals() -- i bet i can do some hackery like this |
| 23:56 | hylje | you'll one morning realize the atrocity |
| 23:56 | davidcramer | oh maybe not |
| 23:57 | Killarny | __import__( module, fromlist=[ 'name1', 'name2', ... ] ) |
| 23:57 | davidcramer | Killarny: i had to use getattr though |
| 23:57 | davidcramer | just imporring the module name didnt wanna work right |
Page 26 of 26
← Previous
(2,542 total)