List feature
+ implemented list feature + implemented category feature
This commit is contained in:
parent
5877b83424
commit
32d60f51ac
23 changed files with 210 additions and 60 deletions
0
invsystem/object_lister/__init__.py
Normal file
0
invsystem/object_lister/__init__.py
Normal file
3
invsystem/object_lister/admin.py
Normal file
3
invsystem/object_lister/admin.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
5
invsystem/object_lister/apps.py
Normal file
5
invsystem/object_lister/apps.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ObjectListerConfig(AppConfig):
|
||||
name = 'object_lister'
|
||||
0
invsystem/object_lister/migrations/__init__.py
Normal file
0
invsystem/object_lister/migrations/__init__.py
Normal file
3
invsystem/object_lister/models.py
Normal file
3
invsystem/object_lister/models.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
invsystem/object_lister/tests.py
Normal file
3
invsystem/object_lister/tests.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
6
invsystem/object_lister/urls.py
Normal file
6
invsystem/object_lister/urls.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.objlist, name='objlist'),
|
||||
]
|
||||
13
invsystem/object_lister/views.py
Normal file
13
invsystem/object_lister/views.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from django.shortcuts import render
|
||||
from object_adder.models import Object
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
|
||||
# Create your views here.
|
||||
@login_required
|
||||
def objlist(request):
|
||||
|
||||
objects = Object.objects.all()
|
||||
|
||||
context = {'title': 'Inventar', 'objects': objects}
|
||||
return render(request, 'object_lister/index.html', context)
|
||||
Loading…
Add table
Add a link
Reference in a new issue