mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-05 06:08:46 -05:00
fixed manifest and added v3 redirect
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from pydoc import locate
|
||||
|
||||
from django.urls import include, path, re_path
|
||||
from django.views.generic import TemplateView
|
||||
from django.views.generic import TemplateView, RedirectView
|
||||
from drf_spectacular.views import SpectacularAPIView
|
||||
from rest_framework import routers
|
||||
|
||||
@@ -133,9 +133,9 @@ urlpatterns = [
|
||||
path('service-worker.js', (TemplateView.as_view(template_name="sw.js", content_type='application/javascript')), name='service_worker'),
|
||||
path('manifest.json', views.web_manifest, name='web_manifest'),
|
||||
|
||||
|
||||
re_path(r'^v3/.*', views.vue3, name='vue_3'),
|
||||
path('', views.index, name='index'),
|
||||
path('<path:resource>', views.index, name='index'),
|
||||
path('<path:resource>', views.index, name='tandoor_frontend'),
|
||||
]
|
||||
|
||||
generic_models = (Recipe, RecipeImport, Storage, ConnectorConfig, RecipeBook, SyncLog, Sync, Comment, RecipeBookEntry, InviteLink, UserSpace, Space)
|
||||
|
||||
@@ -531,7 +531,7 @@ def web_manifest(request):
|
||||
"short_name": _("Plan"),
|
||||
"description": _("View your meal Plan"),
|
||||
"url": "./mealplan",
|
||||
icons: [
|
||||
"icons": [
|
||||
{
|
||||
"src": static('logo_color_plan.svg'),
|
||||
"sizes": "any"
|
||||
@@ -550,7 +550,7 @@ def web_manifest(request):
|
||||
"short_name": _("Shopping"),
|
||||
"description": _("View your shopping lists"),
|
||||
"url": "./shopping",
|
||||
icons: [
|
||||
"icons": [
|
||||
{
|
||||
"src": static('logo_color_shopping.svg'),
|
||||
"sizes": "any"
|
||||
@@ -667,3 +667,7 @@ def get_orphan_files(delete_orphans=False):
|
||||
orphans = find_orphans()
|
||||
|
||||
return [img[1] for img in orphans]
|
||||
|
||||
|
||||
def vue3(request):
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
|
||||
Reference in New Issue
Block a user