Skip to content
Snippets Groups Projects
Commit a48bd1ae authored by Martin Burchell's avatar Martin Burchell
Browse files

Merge branch 'tabbed_page' into fix_upload_button

parents daf6173a 5a4a66a0
Branches
No related tags found
2 merge requests!26Make view edit view into tab,!25Fix upload button
......@@ -36,7 +36,7 @@ def _get_rendering_details(context, tab_instance):
if tab_instance.settings:
settings = tab_instance.settings
else:
settings = {} # TODO: json field doesn't default to this?
settings = {}
request = context.get('request')
......
......@@ -26,7 +26,6 @@ def setup_function(function):
clear_tabs()
@pytest.mark.django_db
@patch(render_to_string_method)
def test_uses_template_name(mock_render):
......
......@@ -32,9 +32,9 @@ class TabbedPageView(TemplateView):
candidates = []
tab_name = self.kwargs.get('tab_name')
if tab_name:
candidates = self.page.tabs.all().filter(name=tab_name)
candidates = self.page.tabs.filter(name=tab_name)
if len(candidates) == 0:
candidates = self.page.tabs.all().filter(default=True)
candidates = self.page.tabs.filter(default=True)
if len(candidates) == 0:
candidates = self.page.tabs.all()
if len(candidates) > 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment