List Info

Thread: Multi page article




Multi page article
country flaguser name
United States
2007-08-29 14:23:45
Hi all,

Any tips for setting up a multi-page article (ie one news
story spread
over several pages, box with a content list of the news
story, links,
etc.)?

With my current knowledge I would do this:

class NewsStory(models.Model):
 headline = ...
 image = ...

class NewsStoryPage(models.Model):
  story = models.Foreignkey(NewsStory, edit_inline=True)
  page_number = models.IntegerField()
  content = ....

The ordering with the integer number would probably be an
inconvience
for the editor...

But is this the way to go?

Cheers,
  >>Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Multi page article
country flaguser name
United States
2007-08-29 14:53:49
I wouldn't be storing the pages in a separate model, but
rather using
some sort of page break marker within a 'body' field of the
NewsStory... otherwise i can imagine it will become
difficult to edit
(add an extra paragraph to the first page, then cut-n-paste
like a
waterfall through the other pages...)

You could then perhaps create a custom filter to do
something like:

{% newsarticle.body|page pagenum %}

which just outputs the page you're after based on the page
break
markers within the body text. I'm no expert either, but
there's an
idea 

Hope that helps!
-Michael

On Aug 30, 5:23 am, MichaelMartinides
<michael.martini...gmail.com>
wrote:
> Hi all,
>
> Any tips for setting up a multi-page article (ie one
news story spread
> over several pages, box with a content list of the news
story, links,
> etc.)?
>
> With my current knowledge I would do this:
>
> class NewsStory(models.Model):
>  headline = ...
>  image = ...
>
> class NewsStoryPage(models.Model):
>   story = models.Foreignkey(NewsStory,
edit_inline=True)
>   page_number = models.IntegerField()
>   content = ....
>
> The ordering with the integer number would probably be
an inconvience
> for the editor...
>
> But is this the way to go?
>
> Cheers,
>   >>Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Multi page article
country flaguser name
United States
2007-08-29 16:10:25
I would second Michael's suggestion to use a page break
marker. I have
used that in many instances with great succcess -- your
content admins
will thank you 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Multi page article
country flaguser name
United States
2007-08-30 04:33:16
Ok, I somehow didnt think of this, thank a lot!

Looks like the best solution also to me, I will go for
this!


On Aug 29, 11:10 pm, RajeshD <rajesh.dha...gmail.com> wrote:
> I would second Michael's suggestion to use a page break
marker. I have
> used that in many instances with great succcess -- your
content admins
> will thank you 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )