Adding functions for bills

This commit is contained in:
Alexander Hosking 2021-12-25 22:04:59 -05:00
parent 23cb231bdc
commit ebb48c1a42
4 changed files with 10 additions and 5 deletions

View File

@ -4,6 +4,8 @@ from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
class CustomIndexDashboard(Dashboard):
# app_label = "api"
columns = 3
def init_with_context(self, context):

View File

@ -29,7 +29,7 @@ SECRET_KEY = env("SECRET_KEY", default='django-insecure-7uajhmbt^@)mklk1ur=slkmn
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env("DEBUG")
ALLOWED_HOSTS = ["127.0.0.1", "192.168.1.187", "192.168.1.23"]
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "192.168.1.187", "192.168.1.23"]
# Application definition
@ -172,5 +172,5 @@ JET_THEMES = [
]
# JET_INDEX_DASHBOARD = 'jet.dashboard.dashboard.DefaultIndexDashboard'
JET_APP_INDEX_DASHBOARD = 'dashboard.CustomIndexDashboard'
# JET_INDEX_DASHBOARD = 'dashboard.CustomIndexDashboard'
# JET_APP_INDEX_DASHBOARD = 'dashboard.CustomIndexDashboard'
JET_INDEX_DASHBOARD = 'dashboard.CustomIndexDashboard'

View File

@ -8,5 +8,6 @@ from . import views
urlpatterns = [
path('', views.index, name='index'),
path('admin/', admin.site.urls),
path('<int:bill_id>/', views.detail, name='detail')
# path('admin/', admin.site.urls),
]

View File

@ -3,4 +3,6 @@ from django.http import HttpResponse
def index(request):
return HttpResponse("Let there be bills!")
# Create your views here.
def detail(request, bill_id):
return HttpResponse("You're looking at Bill %s." % bill_id)