"Se le ve cara" es una expresión que quiere decir que el proyecto ya esta caminando :D, para esto tuve que tener un ejemplo... me dije: "Bueno estoy haciendo un site muy web 2.0 asi que llammoslo... "Web 2.0 news :D""
Las urls han cambiado, los modelos cambiaron, y por supuesto se añaden las templates.
Estructura del proyecto:
.Nuevas urls:
|-- __init__.py
|-- __init__.pyc
|-- db
| `-- publicame.db
|-- manage.py
|-- media
| |-- css
| | |-- html.css
| | |-- layout.css
| | `-- print.css
| `-- images
| |-- bg
| | |-- balloons.gif
| | |-- bullet.gif
| | |-- footer.jpg
| | |-- gradient.jpg
| | |-- header.jpg
| | |-- header_left.jpg
| | `-- header_right.jpg
| |-- firefox.jpg
| `-- icons
| |-- exclamation.gif
| |-- go.gif
| |-- quote.gif
| `-- stop.gif
|-- news
| |-- __init__.py
| |-- __init__.pyc
| |-- models.py
| |-- models.pyc
| |-- urls.py
| |-- urls.pyc
| |-- views.py
| `-- views.pyc
|-- settings.py
|-- settings.pyc
|-- templates
| |-- base.html
| |-- base_2col.html
| |-- comments
| | |-- free_preview.html
| | |-- freecomment_list.html
| | |-- freeform.html
| | `-- posted.html
| `-- news
| |-- article_archive.html
| `-- article_detail.html
|-- urls.py
`-- urls.pyc
Screenshot:
from django.conf.urls.defaults import *
from django.contrib.comments.feeds import LatestFreeCommentsFeed
from django.contrib.comments.models import FreeComment
comments_info_dict = {
'queryset': FreeComment.objects.all(),
'paginate_by': 15,
}
urlpatterns = patterns('',
# Index example
(r'^$', 'publicame.news.views.index'),
# Example:
(r'^news/', include('publicame.news.urls')),
# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),
# static media docs -- development
(r'^css/(.*.css)$', 'django.views.static.serve', {'document_root': 'media/css', 'show_indexes': False}),
(r'^images/(.*.jpeg|.*.jpg|.*.gif)$', 'django.views.static.serve', {'document_root': 'media/images', 'show_indexes': False}),
(r'^js/(.*.js)$', 'django.views.static.serve', {'document_root': 'media/js', 'show_indexes': False}),
# Comments
(r'^comments/$', 'django.views.generic.list_detail.object_list', comments_info_dict),
(r'^comments/', include('django.contrib.comments.urls.comments')),
)
Usando el comments framework!!!Gracias a fullahead por su template que esta genial!!!


