cmShoppingList 0.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cmShoppingList/__init__.py +5 -0
- cmShoppingList/admin.py +5 -0
- cmShoppingList/app_settings.py +6 -0
- cmShoppingList/apps.py +7 -0
- cmShoppingList/auth_hooks.py +34 -0
- cmShoppingList/management/__init__.py +0 -0
- cmShoppingList/management/commands/data/market_types.tsv +18616 -0
- cmShoppingList/management/commands/populate_types.py +141 -0
- cmShoppingList/migrations/0001_initial.py +36 -0
- cmShoppingList/migrations/0002_itemequivalence.py +26 -0
- cmShoppingList/migrations/__init__.py +0 -0
- cmShoppingList/models.py +42 -0
- cmShoppingList/static/cmShoppingList/components/ShoppingList.js +224 -0
- cmShoppingList/static/cmShoppingList/css/main.css +41 -0
- cmShoppingList/static/cmShoppingList/scripts/parse.js +168 -0
- cmShoppingList/tasks.py +12 -0
- cmShoppingList/templates/cmShoppingList/base.html +8 -0
- cmShoppingList/templates/cmShoppingList/index.html +66 -0
- cmShoppingList/templates/cmShoppingList/vue/shoppinglist-component.html +59 -0
- cmShoppingList/urls.py +13 -0
- cmShoppingList/views.py +42 -0
- cmshoppinglist-0.11.dist-info/METADATA +86 -0
- cmshoppinglist-0.11.dist-info/RECORD +25 -0
- cmshoppinglist-0.11.dist-info/WHEEL +4 -0
- cmshoppinglist-0.11.dist-info/licenses/LICENSE +21 -0
cmShoppingList/admin.py
ADDED
cmShoppingList/apps.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from django.utils.translation import gettext_lazy as _
|
|
2
|
+
|
|
3
|
+
from allianceauth import hooks
|
|
4
|
+
from allianceauth.services.hooks import MenuItemHook, UrlHook
|
|
5
|
+
|
|
6
|
+
from . import urls
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CMShoppingListMenuItem(MenuItemHook):
|
|
10
|
+
"""This class ensures only authorized users will see the menu entry"""
|
|
11
|
+
|
|
12
|
+
def __init__(self):
|
|
13
|
+
# setup menu entry for sidebar
|
|
14
|
+
MenuItemHook.__init__(
|
|
15
|
+
self,
|
|
16
|
+
_("Shopping List"),
|
|
17
|
+
"fas fa-cart-shopping fa-fw",
|
|
18
|
+
"cmShoppingList:index"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def render(self, request):
|
|
22
|
+
if request.user.has_perm("cmShoppingList.basic_access"):
|
|
23
|
+
return MenuItemHook.render(self, request)
|
|
24
|
+
return ""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@hooks.register("menu_item_hook")
|
|
28
|
+
def register_menu():
|
|
29
|
+
return CMShoppingListMenuItem()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@hooks.register("url_hook")
|
|
33
|
+
def register_urls():
|
|
34
|
+
return UrlHook(urls, "cmShoppingList", r"^cmShoppingList/")
|
|
File without changes
|