2👍
-
Storing HTML tags is not inherently unsafe. You just have to scrub them of dangerous content before putting them in the database.
-
Your page model will need to include information about the category. Then when displaying a category, you’ll query your pages by category to get all the “computer” pages to display on the computer page.
0👍
Do split this in 2 separate questions in the future.
-
Storing HTML is fine. When you output it be sure to use |safe in the templates. If you really want to be picky, you can avoid storing by using http://en.wikipedia.org/wiki/Textile_%28markup_language%29 or http://en.wikipedia.org/wiki/Markdown. They are wysiwig editors out there that do all your trouble.
-
You can create a Category model and all your pages with have a ForeignKey to this model. One of the most flexible solutions I found was to use tags, so a page can have multiple tags and thus fall under multiple ‘categories’ http://code.google.com/p/django-tagging/
Hope this helps.
- [Answered ]-Using Django's CBV, how can I check if request.user == my_model.user?
- [Answered ]-Displaying multiple dependent python models on 1 page
- [Answered ]-Django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: thumbnail
- [Answered ]-Using forms in Django
- [Answered ]-Django, Extend BaseUserManager,