0.0.16
login routines
This commit is contained in:
0
RoutesApp/__init__.py
Normal file
0
RoutesApp/__init__.py
Normal file
3
RoutesApp/admin.py
Normal file
3
RoutesApp/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
RoutesApp/apps.py
Normal file
6
RoutesApp/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class RoutesappConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'RoutesApp'
|
||||
25
RoutesApp/forms.py
Normal file
25
RoutesApp/forms.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# # coding=utf-8
|
||||
from django import forms
|
||||
from django.contrib.auth.forms import AuthenticationForm
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
from .models import *
|
||||
|
||||
|
||||
class RegistrationForm(forms.Form):
|
||||
type_transport = forms.ChoiceField(choices=type_transport_choices, initial='avia', required=True)
|
||||
departure_DT = forms.DateTimeField(required=True)
|
||||
arrival_DT = forms.DateTimeField(required=True)
|
||||
from_country = forms.CharField(required=True)
|
||||
to_country = forms.CharField(required=True)
|
||||
from_city = forms.CharField(required=True)
|
||||
to_city = forms.CharField(required=True)
|
||||
from_place = forms.ChoiceField(choices=transfer_location_choices, initial='other', required=True)
|
||||
to_place = forms.ChoiceField(choices=transfer_location_choices, initial='other', required=True)
|
||||
cargo_type = forms.ChoiceField(choices=cargo_type_choices, initial='parcel', required=True)
|
||||
weight = forms.IntegerField(required=True)
|
||||
phone = forms.CharField(required=True)
|
||||
add_phone = forms.CharField(required=True)
|
||||
receive_msg_by_email = forms.BooleanField(initial=False, required=True)
|
||||
receive_msg_by_sms = forms.BooleanField(initial=False, required=True)
|
||||
owner = forms.IntegerField(required=True)
|
||||
0
RoutesApp/migrations/__init__.py
Normal file
0
RoutesApp/migrations/__init__.py
Normal file
23
RoutesApp/models.py
Normal file
23
RoutesApp/models.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
# Create your models here.
|
||||
|
||||
|
||||
type_transport_choices = (
|
||||
('avia', _('Авиатранспорт')),
|
||||
('road', _('Наземный транспорт'))
|
||||
)
|
||||
|
||||
transfer_location_choices = (
|
||||
('airport', _('В аэропорту')),
|
||||
('city', _('По городу')),
|
||||
('other', _('По договоренности'))
|
||||
)
|
||||
|
||||
cargo_type_choices = (
|
||||
('passenger', _('Пассажир')),
|
||||
('cargo', _('Груз')),
|
||||
('parcel', _('Бандероль')),
|
||||
('package', _('Посылка')),
|
||||
('letter', _('Письмо\Документ'))
|
||||
)
|
||||
3
RoutesApp/tests.py
Normal file
3
RoutesApp/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
3
RoutesApp/views.py
Normal file
3
RoutesApp/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user