Skip to content

Commit

Permalink
better support for setting layout
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 15, 2016
1 parent 8a206e4 commit d833639
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/appier_extras/parts/admin/part.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def routes(self):
def models(self):
return models

def template(self, template, layout = "fluid", *args, **kwargs):
def template(self, template, layout = None, *args, **kwargs):
layout = self.session.get("layout", self.layout)
template = "%s/%s" % (layout, template)
return appier.Part.template(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
{% block name %}Models{% endblock %}
{% block content %}
<ul>
{% for model in models %}
<li>{{ model._name() }}</li>
{% for section, models in models_d.items() %}
{% for model in models %}
<li>{{ model._name() }}</li>
{% endfor %}
{% endfor %}
</ul>
{% endblock %}

0 comments on commit d833639

Please sign in to comment.