mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Added explicit field declarations to edit & update views
This commit is contained in:
@@ -68,6 +68,7 @@ class PersonDetail(generic.DetailView):
|
||||
|
||||
class PersonCreate(generic.CreateView):
|
||||
model = models.Person
|
||||
fields = ['name','phone','email','address','notes']
|
||||
|
||||
def get_success_url(self):
|
||||
if self.request.is_ajax():
|
||||
@@ -84,6 +85,7 @@ class PersonCreate(generic.CreateView):
|
||||
|
||||
class PersonUpdate(generic.UpdateView):
|
||||
model = models.Person
|
||||
fields = ['name','phone','email','address','notes']
|
||||
|
||||
def get_success_url(self):
|
||||
if self.request.is_ajax():
|
||||
@@ -120,6 +122,7 @@ class OrganisationDetail(generic.DetailView):
|
||||
|
||||
class OrganisationCreate(generic.CreateView):
|
||||
model = models.Organisation
|
||||
fields = ['name','phone','email','address','notes','union_account']
|
||||
|
||||
def get_success_url(self):
|
||||
if self.request.is_ajax():
|
||||
@@ -136,6 +139,7 @@ class OrganisationCreate(generic.CreateView):
|
||||
|
||||
class OrganisationUpdate(generic.UpdateView):
|
||||
model = models.Organisation
|
||||
fields = ['name','phone','email','address','notes','union_account']
|
||||
|
||||
def get_success_url(self):
|
||||
if self.request.is_ajax():
|
||||
@@ -172,6 +176,7 @@ class VenueDetail(generic.DetailView):
|
||||
|
||||
class VenueCreate(generic.CreateView):
|
||||
model = models.Venue
|
||||
fields = ['name','phone','email','address','notes']
|
||||
|
||||
def get_success_url(self):
|
||||
if self.request.is_ajax():
|
||||
@@ -188,6 +193,7 @@ class VenueCreate(generic.CreateView):
|
||||
|
||||
class VenueUpdate(generic.UpdateView):
|
||||
model = models.Venue
|
||||
fields = ['name','phone','email','address','notes']
|
||||
|
||||
def get_success_url(self):
|
||||
if self.request.is_ajax():
|
||||
|
||||
Reference in New Issue
Block a user