better imports
This commit is contained in:
parent
60353a6429
commit
f43c71960f
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from main.models import *
|
from main.models import Host
|
||||||
|
|
||||||
class HostForm(forms.ModelForm):
|
class HostForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -5,7 +5,8 @@ from django.http import HttpResponse
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from main.forms import *
|
from main.forms import HostForm
|
||||||
|
from main.models import Host
|
||||||
|
|
||||||
class HomeView(TemplateView):
|
class HomeView(TemplateView):
|
||||||
template_name = "base.html"
|
template_name = "base.html"
|
||||||
@ -34,4 +35,4 @@ def OverviewView(request):
|
|||||||
host.save()
|
host.save()
|
||||||
|
|
||||||
context['HostForm'] = form
|
context['HostForm'] = form
|
||||||
return render(request, "main/overview.html", context)
|
return render(request, "main/overview.html", context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user