Skip to content
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

Merged
merged 5 commits into from
Nov 27, 2017

Conversation

cutwater
Copy link
Collaborator

Issue: #156



class ContentBlock(BaseModel):
name = models.SlugField()
Copy link
Collaborator Author

@cutwater cutwater Nov 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make name fields unique.

class ContentBlock(BaseModel):
name = models.SlugField()
title = models.CharField('title', max_length=256, blank=True)
image = models.CharField('image', max_length=256, blank=True)
Copy link
Collaborator Author

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 %}
Copy link
Collaborator Author

@cutwater cutwater Nov 21, 2017

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.

{% contentblock main-title %}
{{ contentblock.content | safe}}
{% endcontentblock %}
Copy link
Collaborator Author

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.
@cutwater cutwater changed the title WIP: Render content blocks from database Render content blocks from database Nov 27, 2017
@cutwater cutwater merged commit 0c96633 into ansible:develop Nov 27, 2017
@cutwater cutwater deleted the feature/editable-content-blocks branch November 27, 2017 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant