-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.3.1' | ||
__version__ = '0.3.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% extends "admin/change_list.html" %} | ||
{% load admin_list i18n mptt_admin %} | ||
|
||
{% block result_list %} | ||
{% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} | ||
{% mptt_result_list cl %} | ||
{% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} | ||
{% endblock %} | ||
|
||
{% block object-tools-items %} | ||
<li><a href="{% url 'lineup:rebuild' %}" class="rebuildlink">{% trans "Rebuild" %}</a></li> | ||
{{ block.super }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.urls import path | ||
|
||
from . import views | ||
|
||
app_name = "lineup" | ||
urlpatterns = [ | ||
path("", views.RebuildTreeView.as_view(), name="rebuild"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.urls import reverse | ||
from django.views.generic import View | ||
from django.shortcuts import redirect | ||
from .models import MenuItem | ||
|
||
class RebuildTreeView(View): | ||
def get(self, request): | ||
MenuItem.objects.rebuild() | ||
return redirect(reverse('admin:lineup_menuitem_changelist')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters