On Oct 1, 11:56 am, Matt <marine.ro...@gmail.com> wrote:
> How do you add an article to that? I mean put some python and django
> code down so I can understand it but, here's what I think it might be:
>
> example.py
>
> #!C:/Python/python
>
> import datetime
>
> today = datetime.datetime.today()
>
> class article_list():
>      class articles():
>         def from_Sarah():
>              def Fire():
>                 headline = "Fire in Manhattan"
>                 description = "There was a fire in New York City at
> %s" % today
>                 content = "There was a gruesome fire...."
>
> example.html
>
> <html>
> <head>
> <title>{% block title %}Articles from Sarah{% endblock title}</title>
> </head>
> <body>
> <img src="logo.gif" alt="Logo" align="left" />
> {% block content %}
>    {% for articles in article list %}
>         <h2>{{articles.from_Sarah.headline}}</h2>
>         <h4>{{articles.from_Sarah.description}}</h4>
>         <p>{{articles.from_Sarah.content}}</p>
>   {% endfor %}
> {% endblock content %}
> </body>
> </html>
>
> Thats how it's supposed to be right?

Er, no.

Please read the excellent documentation, starting with the tutorial,
at http://docs.djangoproject.com.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to