-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render content blocks from database #199
Render content blocks from database #199
Conversation
galaxy/main/models.py
Outdated
|
||
|
||
class ContentBlock(BaseModel): | ||
name = models.SlugField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make name
fields unique.
galaxy/main/models.py
Outdated
class ContentBlock(BaseModel): | ||
name = models.SlugField() | ||
title = models.CharField('title', max_length=256, blank=True) | ||
image = models.CharField('image', max_length=256, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop title
and image
fields
$ ansible-galaxy install username.rolename | ||
</pre> | ||
</div> | ||
{% contentblock main-downloads %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using single tag for rendering block content, e.g. {% contentblock main-downloads %}
.
Content should be safe by default.
galaxy/templates/home_title.html
Outdated
{% contentblock main-title %} | ||
{{ contentblock.content | safe}} | ||
{% endcontentblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing new line
* Import data along with creating ContentBlock database table in migration `0055_contentblock`. * Make ContentBlock.name field unique.
Issue: #156