2008-3-19

23:53 phpluv
like form processing, database access ..
23:53 Magus-
not to be confused with templates
23:54 PhiR_home
phpluv, we that view actually
23:54 phpluv
ok what's called view is a controler
23:54 Magus-
no
23:54 mattmcc
Not really.
23:54 insin
no, it's a view ;)
23:54 PhiR_home
phpluv, it's not as simple but from your point of view yeah
23:54 phpluv
apart from being called view ... it has nothing of a view :)
23:54 Magus-
we're not saying its a template, which is what equates to the view of mvc
23:54 mattmcc
phpluv: You're trying to see Django as an MVC framework, which it's not.
23:54 PhiR_home
phpluv, it still decides what will be sent to the template for rendering
23:54 Magus-
but a django view is /not/ a controller
23:54 phpluv
can a view display data in different ways, ie. load different templates
23:55 Magus-
sure
23:55 insin
phpluv: it takes a request and returns a response - what happens in between is whatever you want to happen :)
23:55 phpluv
right, i assumed it was one, i was wrong :)
23:55 __machine
if i do class X(forms.ModelForm): class Meta: model = m; x = X(data=data); x.is_valid() to trigger validation... then x.cleaned_data gives me an error... x has no attribute cleaned_data... is that wrong?
23:55 phpluv
it's probably because it's from the publishing world
23:55 phpluv
which is very interesting
23:56 Magus-
__machine: did is_valid() actually pass/
23:56 __machine
is_valid failed...
23:56 Magus-
then of course there's no cleaned_data
23:57 __machine
i'm actually getting the no attribute error in one of my clean_* methods which is trying to get it's data from cleaned_data and validate it
23:57 phpluv
if a view can loead to different views of data, how can it be called A view ?
23:57 Magus-
for the same field, or a different field?
23:57 phpluv
lead*
23:57 Magus-
phpluv: because its not the same view as in MVC
23:57 Magus-
so stop reading more into the name
23:57 __machine
def clean_barcode): barcode = self.cleaned_data.get('barcode')
23:57 phpluv
ok ok difficult :)
23:57 Magus-
the 'view' of mvc is closer to the template
23:58 phpluv
i like to cast tings in patterns :)
23:58 Magus-
__machine: pastebin some full code, that should be fine unless something else is breaking things
23:58 insin
that doesn't help if they don't actually fit
23:59 phpluv
where can i see typical view code ?
23:59 Magus-
23:59 Magus-
23:59 Magus-
etc
Page 36 of 36   ← Previous  (3,539 total)