-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOL #839
base: master
Are you sure you want to change the base?
SOL #839
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ venv/ | |
.venv/ | ||
.pytest_cache/ | ||
**__pycache__/ | ||
db.sqlite3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an extra space after |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
django==4.1 | ||
django~=5.1.2 | ||
flake8==5.0.4 | ||
flake8-quotes==3.3.1 | ||
flake8-variables-names==0.0.5 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,51 +13,166 @@ class Migration(migrations.Migration): | |
initial = True | ||
|
||
dependencies = [ | ||
('auth', '0012_alter_user_first_name_max_length'), | ||
("auth", "0012_alter_user_first_name_max_length"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Driver', | ||
name="Driver", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('password', models.CharField(max_length=128, verbose_name='password')), | ||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), | ||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), | ||
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), | ||
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), | ||
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), | ||
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), | ||
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), | ||
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), | ||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), | ||
('license_number', models.CharField(max_length=255)), | ||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), | ||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("password", models.CharField(max_length=128, verbose_name="password")), | ||
( | ||
"last_login", | ||
models.DateTimeField( | ||
blank=True, null=True, verbose_name="last login" | ||
), | ||
), | ||
( | ||
"is_superuser", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Designates that this user has all permissions without explicitly assigning them.", | ||
verbose_name="superuser status", | ||
), | ||
), | ||
( | ||
"username", | ||
models.CharField( | ||
error_messages={ | ||
"unique": "A user with that username already exists." | ||
}, | ||
help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", | ||
max_length=150, | ||
unique=True, | ||
validators=[ | ||
django.contrib.auth.validators.UnicodeUsernameValidator() | ||
], | ||
verbose_name="username", | ||
), | ||
), | ||
( | ||
"first_name", | ||
models.CharField( | ||
blank=True, max_length=150, verbose_name="first name" | ||
), | ||
), | ||
( | ||
"last_name", | ||
models.CharField( | ||
blank=True, max_length=150, verbose_name="last name" | ||
), | ||
), | ||
( | ||
"email", | ||
models.EmailField( | ||
blank=True, max_length=254, verbose_name="email address" | ||
), | ||
), | ||
( | ||
"is_staff", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Designates whether the user can log into this admin site.", | ||
verbose_name="staff status", | ||
), | ||
), | ||
( | ||
"is_active", | ||
models.BooleanField( | ||
default=True, | ||
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting registration.", | ||
verbose_name="active", | ||
), | ||
), | ||
( | ||
"date_joined", | ||
models.DateTimeField( | ||
default=django.utils.timezone.now, verbose_name="date joined" | ||
), | ||
), | ||
("license_number", models.CharField(max_length=255)), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
( | ||
"groups", | ||
models.ManyToManyField( | ||
blank=True, | ||
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.", | ||
related_name="user_set", | ||
related_query_name="user", | ||
to="auth.Group", | ||
verbose_name="groups", | ||
), | ||
), | ||
( | ||
"user_permissions", | ||
models.ManyToManyField( | ||
blank=True, | ||
help_text="Specific permissions for this user.", | ||
related_name="user_set", | ||
related_query_name="user", | ||
to="auth.Permission", | ||
verbose_name="user permissions", | ||
), | ||
Comment on lines
+115
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
), | ||
], | ||
options={ | ||
'verbose_name': 'driver', | ||
'verbose_name_plural': 'drivers', | ||
"verbose_name": "driver", | ||
"verbose_name_plural": "drivers", | ||
}, | ||
managers=[ | ||
('objects', django.contrib.auth.models.UserManager()), | ||
("objects", django.contrib.auth.models.UserManager()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Manufacturer', | ||
name="Manufacturer", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255)), | ||
('country', models.CharField(max_length=255)), | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("name", models.CharField(max_length=255)), | ||
("country", models.CharField(max_length=255)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Car', | ||
name="Car", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('model', models.CharField(max_length=255)), | ||
('drivers', models.ManyToManyField(related_name='cars', to=settings.AUTH_USER_MODEL)), | ||
('manufacturer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='taxi.manufacturer')), | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("model", models.CharField(max_length=255)), | ||
( | ||
"drivers", | ||
models.ManyToManyField( | ||
related_name="cars", to=settings.AUTH_USER_MODEL | ||
), | ||
), | ||
( | ||
"manufacturer", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="taxi.manufacturer", | ||
), | ||
), | ||
], | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 5.1.2 on 2024-10-28 22:22 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("taxi", "0003_alter_manufacturer_name"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="driver", | ||
name="is_active", | ||
field=models.BooleanField( | ||
default=True, | ||
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.", | ||
verbose_name="active", | ||
), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,8 @@ | |
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = ( | ||
"django-insecure-8ovil3xu6=eaoqd#-#&ricv159p0pypoh5_lgm*)-dfcjqe=yc" | ||
) | ||
SECRET_KEY = ("django-insecure-8ovil3xu6=" | ||
"eaoqd#-#&ricv159p0pypoh5_lgm*)-dfcjqe=yc") | ||
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
# SECURITY WARNING: don"t run with debug turned on in production! | ||
DEBUG = True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
@@ -94,20 +93,24 @@ | |
}, | ||
{ | ||
"NAME": "django.contrib.auth.password_validation." | ||
"MinimumLengthValidator", | ||
"MinimumLengthValidator", | ||
}, | ||
{ | ||
"NAME": "django.contrib.auth.password_validation." | ||
"CommonPasswordValidator", | ||
"CommonPasswordValidator", | ||
}, | ||
{ | ||
"NAME": "django.contrib.auth.password_validation." | ||
"NumericPasswordValidator", | ||
"NumericPasswordValidator", | ||
}, | ||
] | ||
|
||
AUTH_USER_MODEL = "taxi.Driver" | ||
|
||
LOGIN_REDIRECT_URL = "taxi:index" | ||
|
||
# LOGOUT_REDIRECT_URL = "/registration/lo" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
# Internationalization | ||
# https://docs.djangoproject.com/en/4.0/topics/i18n/ | ||
|
||
|
@@ -133,3 +136,7 @@ | |
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field | ||
|
||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" | ||
|
||
INTERNAL_IPS = [ | ||
"127.0.0.1", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra space before
db.sqlite3
. This might prevent Git from correctly ignoring the file. Please remove the space to ensure it is properly ignored.