fixed crud list
fixed payments upload -a
This commit is contained in:
+8
-4
@@ -1,4 +1,4 @@
|
||||
from django.forms import ModelForm
|
||||
from django.forms import ModelForm, TextInput
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from preinfo.models import Preinfo
|
||||
@@ -8,7 +8,12 @@ class PreinfoBaseForm(ModelForm):
|
||||
class Meta:
|
||||
model = Preinfo
|
||||
fields = '__all__'
|
||||
|
||||
widgets = {
|
||||
'container_number': TextInput(attrs={
|
||||
'oninput': 'validateContainerNumber(this)',
|
||||
'class': 'form-control'
|
||||
})
|
||||
}
|
||||
# success_url = reverse_lazy('client_preinfo')
|
||||
class PreinfoCreateForm(PreinfoBaseForm):
|
||||
"""
|
||||
@@ -24,7 +29,6 @@ class PreinfoCreateForm(PreinfoBaseForm):
|
||||
'received'] # Exclude fields that should not be set by the user
|
||||
|
||||
|
||||
class PreinfoEditForm(ModelForm):
|
||||
class PreinfoEditForm(PreinfoBaseForm):
|
||||
class Meta:
|
||||
model = Preinfo
|
||||
fields = ['container_number', 'container_type', 'line']
|
||||
@@ -6,7 +6,8 @@ from django.views import View
|
||||
from django.views.generic import CreateView, ListView, UpdateView
|
||||
|
||||
from DepoT.mixins.LineFiltweFormMixin import LineFilterFormMixin
|
||||
from common.utils.utils import filter_queryset_by_user, get_preinfo_by_number
|
||||
from common.utils.utils import filter_queryset_by_user, get_preinfo_by_number, send_test_email
|
||||
from payments.services import EPay
|
||||
from preinfo.forms import PreinfoCreateForm, PreinfoEditForm
|
||||
from preinfo.models import Preinfo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user