Hello,
I am about to develop a blogging application for my site (it's also a learning
Django app, so please don't point me to existing projects ;-)
Since I do want to omit to change my entire app due to mistakes I had made
while designing the model I would like to discuss my concept here before
starting to develop.
Right now the app should support only one Blog so there is only one model:
BlogEntry:
class BlogEntry(models.Model):
title = models.CharField(max_length=100)
content = models.TextField()
creationDate = models.DateTimeField(auto_now_add=True)
eventually I will add an FileField or ImageField for attachments.
What about the Slug Field. I've read the docs but I'm not sure if it makes any
sense here? How is it used normally?
Another point is how to build an URL to identify a BlogEntry instance. I could
use the automatically added id field, like: xgm.de/blog/132286302. Are the
ids usually usable directly as part of the URLs or are there any potential
non-usable characters? I know this depends on the DB backend. Development
will be done on sqlite, production use on MySQL.
This is what I prefer ATM.
Of couse I will also use a date based generic view to provide a archive view
on the blog.
Another possibility would be to take the content field into account when
constructing the URL: xgm.de/blog/My_first_entry. To make it unique I could
prepend or append an unique random id or a part of the date.
Thanks for any ideas and comments!
Florian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---