On 15 Jun., 18:21, Joel Klabo wrote:
> I guess what I'm am trying say is that I was under the impression that
> when you go to a URL, a view is called. And only one view can be
> called per URL.
Yes, one page -> one URL. Some page elements can have their own URL
, , etc...
> And that view nee
On 15 Jun., 18:17, Joel Klabo wrote:
> Thanks, good info. So the template tag can do the DB query and all
> that without going through a view function?
Yes, see the query in the example code I posted:
profiles = UserProfile.objects.order_by('user__date_joined')
[:self.limit]
cheers
Paul
>
>
I guess what I'm am trying say is that I was under the impression that
when you go to a URL, a view is called. And only one view can be
called per URL. And that view needs to serve all of the data for that
page. It seems like there is a way to have multiple views being
rendered simultaneously. Is i
Thanks, good info. So the template tag can do the DB query and all
that without going through a view function?
On Jun 15, 8:09 am, Paul wrote:
> On 15 Jun., 06:55, Joel Klabo wrote:
>
> > I am working on a simple site right now and the views are pretty easy.
> > Usually just iterate a loop of ob
On 15 Jun., 06:55, Joel Klabo wrote:
> I am working on a simple site right now and the views are pretty easy.
> Usually just iterate a loop of objects. But, I am trying to figure out
> how a website with all different kinds of data, including a sign in
> form, is setup in django. Is that all in
As your site gets bigger, as mine does, you can choose to split up
your views over multiple .py files based on e.g. functional sections.
I recently created a file named views_admin.py. Following the Django
docs, I also named files based on contents. So a mydecorators.py, etc
( the my.. prefix is to
Interesting, thanks Venkatraman. Just finishing up the tutorial at this
point. Will look at that page.
On Tue, Jun 15, 2010 at 1:32 PM, Venkatraman S wrote:
>
> On Tue, Jun 15, 2010 at 3:54 PM, Sithembewena Lloyd Dube <
> zebr...@gmail.com> wrote:
>
>> @Venkatraman, wouldn't urls.py need views.p
On Tue, Jun 15, 2010 at 3:54 PM, Sithembewena Lloyd Dube
wrote:
> @Venkatraman, wouldn't urls.py need views.py to map to?
>
Depends on how you have structured your app and what is the functionality of
your app.
Refer to http://www.djangobook.com/en/2.0/chapter11/ how you can simply
avoid views.p
I have a site that has quite a few Django based pages plus login etc.
and I certainly had to structure the code over multiple modules. I
suggest that you do both a top-down and a bottom-up design (actually,
iterate between these).
Start with a top-down view which is the urls - list those and plan
@Venkatraman, wouldn't urls.py need views.py to map to?
On Tue, Jun 15, 2010 at 11:01 AM, Venkatraman S wrote:
>
> On Tue, Jun 15, 2010 at 10:25 AM, Joel Klabo wrote:
>
>> I am working on a simple site right now and the views are pretty easy.
>> Usually just iterate a loop of objects. But, I am
On Tue, Jun 15, 2010 at 10:25 AM, Joel Klabo wrote:
> I am working on a simple site right now and the views are pretty easy.
> Usually just iterate a loop of objects. But, I am trying to figure out
> how a website with all different kinds of data, including a sign in
> form, is setup in django. I
I am working on a simple site right now and the views are pretty easy.
Usually just iterate a loop of objects. But, I am trying to figure out
how a website with all different kinds of data, including a sign in
form, is setup in django. Is that all in one big view? Or, is there
some way to combine t
12 matches
Mail list logo