Use private instead of open.
This commit is contained in:
parent
fdd6433af5
commit
d4acb0d434
|
@ -21,7 +21,7 @@ class VillageDetailView(DetailView):
|
||||||
class VillageCreateView(CreateView):
|
class VillageCreateView(CreateView):
|
||||||
model = Village
|
model = Village
|
||||||
template_name = 'village_form.html'
|
template_name = 'village_form.html'
|
||||||
fields = ['name', 'description', 'open']
|
fields = ['name', 'description', 'private']
|
||||||
success_url = reverse_lazy('villages:list')
|
success_url = reverse_lazy('villages:list')
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
@ -34,7 +34,7 @@ class VillageCreateView(CreateView):
|
||||||
class VillageUpdateView(UpdateView):
|
class VillageUpdateView(UpdateView):
|
||||||
model = Village
|
model = Village
|
||||||
template_name = 'village_form.html'
|
template_name = 'village_form.html'
|
||||||
fields = ['name', 'description', 'open']
|
fields = ['name', 'description', 'private']
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
return self.get_object().get_absolute_url()
|
return self.get_object().get_absolute_url()
|
||||||
|
|
Loading…
Reference in a new issue