iniciado pwa. mas to sem tempo pra continuar agora

This commit is contained in:
2025-01-30 11:00:49 -03:00
parent cc375d5d29
commit 66fb4eb17b
5 changed files with 32 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ INSTALLED_APPS = [
'orders', 'orders',
'login', 'login',
'django_extensions', 'django_extensions',
'pwa',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
@@ -146,3 +147,31 @@ MEDIA_URL = '/media/'
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# pwa.py
# from django.conf import settings
PWA_APP_NAME = "Gestão Raul"
PWA_APP_SHORT_NAME = "PWA"
PWA_APP_DESCRIPTION = "Descrição do Gestão Raul"
PWA_APP_THEME_COLOR = "#000000"
PWA_APP_BACKGROUND_COLOR = "#ffffff"
PWA_APP_DISPLAY = "standalone"
PWA_APP_ORIENTATION = "any"
PWA_APP_START_URL = "/"
PWA_APP_ICONS = [
{
"src": "/static/midia/logo.png",
"sizes": "160x160",
"type": "image/png"
},
# ... adicione outros tamanhos de ícones
]
PWA_APP_SPLASH_SCREEN = {
"src": "/static/midia/logo.png",
"media": "(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"
}
PWA_APP_DIR = "ltr"
PWA_APP_LANG = "pt-BR"

View File

@@ -29,6 +29,7 @@ urlpatterns = [
path('categories/', include('categories.urls')), path('categories/', include('categories.urls')),
path('balcao/', include('balcao.urls')), path('balcao/', include('balcao.urls')),
path('pedidos/', include('orders.urls')), path('pedidos/', include('orders.urls')),
path('', include('pwa.urls')),
] ]

View File

@@ -9,7 +9,8 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{% static 'midia/favicon/favicon.ico' %}" /> <link rel="shortcut icon" href="{% static 'midia/favicon/favicon.ico' %}" />
{% load pwa %}
{% progressive_web_app_meta %}
<link rel="stylesheet" href="{% static 'pico.css' %}"> <link rel="stylesheet" href="{% static 'pico.css' %}">
<link rel="stylesheet" href="{% static 'base.css' %}"> <link rel="stylesheet" href="{% static 'base.css' %}">
{% block 'head' %} {% block 'head' %}