- Added role management views (list, create, edit, delete) - Created user_roles URL routing - Added role management templates with Bootstrap styling - Updated navbar with Roles link for owners and superusers - Enhanced decorators and mixins with superuser bypass - Added assign_owner_role.py utility script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
1.5 KiB
Python
32 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
URL configuration for TENANT schemas (shop1.inventory.by, shop2.inventory.by, etc.).
|
|
|
|
This is used for individual shop subdomains where shop owners manage their business.
|
|
"""
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
path('_nested_admin/', include('nested_admin.urls')), # Для nested admin
|
|
path('admin/', admin.site.urls), # Админка для владельца магазина (доступна на поддомене)
|
|
|
|
# Web interface for shop owners
|
|
path('', views.index, name='index'), # Главная страница
|
|
path('accounts/', include('accounts.urls')), # Управление аккаунтом
|
|
path('roles/', include('user_roles.urls')), # Управление ролями пользователей
|
|
path('products/', include('products.urls')), # Управление товарами
|
|
path('customers/', include('customers.urls')), # Управление клиентами
|
|
path('inventory/', include('inventory.urls')), # Управление складом
|
|
path('orders/', include('orders.urls')), # Управление заказами
|
|
path('pos/', include('pos.urls')), # POS Terminal
|
|
]
|
|
|
|
# Serve media files during development
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|