only as ugly as two includes having the same namespace is illogical
marsam has quit
BertrandBordage
the idea is that urls are automatically builded to avoid having to define the same kind of urls and views every time
cebor joined the channel
schinckel
(I was about to say "there was something about this on django-dev", but I think that was you)
BertrandBordage
I wanted to build the namespace from the model app_label
yes, that was me :o)
so what I said wasn't quite accurate
Ariel_Calzada joined the channel
Ariel_Calzada has quit
milind joined the channel
zaze joined the channel
Ariel_Calzada joined the channel
in fact, the application urls.py is like this:
urlpatterns = patterns(b'',
url(br'', include(ExampleViewSet().urls)),
url(br'', include(TweetViewSet().urls)),
)
schinckel
Maybe using a callable or object for the patterns might work. A bit like how the admin works.
Ariel_Calzada has quit
bvlaar has quit
BertrandBordage
Yes, but I guess the admin is building all its patterns at the same time
tbaxter joined the channel
mattmcc
Yeah, if you construct pattern names like <app_label>_<model_name>_add/list/detail then you don't need to worry about namespaces.
bvlaar joined the channel
Spark23 has quit
Spark23 joined the channel
BertrandBordage
so, I guess I have to drop the idea of automatically specifying a namespace
(if I want to keep this architecture)
cebor has quit
mattmcc: yes, but it's better for understanding to keep the same syntax as the admin (admin:model_create)
mattmcc
Eh, I disagree.
The purpose of URL namespaces is to allow multiple instances of one app to coexist.
BertrandBordage
I may have misunderstood how namespace should be used :\
mattmcc
And that's not the problem you're addressing here.
BertrandBordage
yes
I understand now
md4d joined the channel
thanks FunkyBob, schinckel and mattmcc − I'm getting back to work :)
md4d has quit
hyperair joined the channel
Raisins has quit
bvlaar has quit
F1skr has quit
bvlaar joined the channel
theslow1 has quit
CRF_H0M3R
Someone can help me with this traceback? http://dpaste.org/i1qHc/ I'm trying to do tests and I'm getting AttributeError: type object 'Create' has no attribute 'objects'
Raisins joined the channel
FunkyBob
CRF_H0M3R: and which line of the paste is line 45 of test_vciews_create ? because what's there doesn't match the test_save in your paste
cramm has quit
smill has quit
BertrandBordage
the line is written below: it's line 11 in this snippet
CRF_H0M3R
FunkyBob: line 11
BertrandBordage
oh, I noticed the difference ;)
CreateForm != Create
FunkyBob
exactly
CRF_H0M3R: the code in the error doesn't match the code in your paste
so either you pasted the wrong file/lines... or your error is using old code?