diff --git a/padelclub_backend/settings.py b/padelclub_backend/settings.py index 2e14c53..2dc87a2 100644 --- a/padelclub_backend/settings.py +++ b/padelclub_backend/settings.py @@ -26,9 +26,9 @@ SECRET_KEY = 'django-insecure-60*l@#e*-bc3o%#c#e3vikjcl$518bz2%xe3a3s3iudorq%dal # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +# ALLOWED_HOSTS = ['ssh-stax.alwaysdata.net', 'www.pokerrumble.net'] ALLOWED_HOSTS = ['*'] - # Application definition INSTALLED_APPS = [ @@ -41,6 +41,7 @@ INSTALLED_APPS = [ 'django.contrib.staticfiles', 'rest_framework', 'rest_framework.authtoken', + 'dj_rest_auth', ] AUTH_USER_MODEL = "tournaments.CustomUser" diff --git a/padelclub_backend/settings_app.py b/padelclub_backend/settings_app.py index b4c6880..bdf0716 100644 --- a/padelclub_backend/settings_app.py +++ b/padelclub_backend/settings_app.py @@ -11,3 +11,19 @@ REST_FRAMEWORK = { 'rest_framework.authentication.TokenAuthentication', ] } + +# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +# EMAIL_HOST = 'smtp-xlr.alwaysdata.net' +# EMAIL_PORT = 587 +# EMAIL_HOST_USER = 'automatic@padelclub.app' +# EMAIL_HOST_PASSWORD = 'XLRSport$2024' +# EMAIL_USE_TLS = True +# DEFAULT_FROM_EMAIL = 'Padel Club ' + +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +EMAIL_HOST = 'smtp-xlr.alwaysdata.net' +EMAIL_PORT = 587 +EMAIL_HOST_USER = 'xlr@alwaysdata.net' +EMAIL_HOST_PASSWORD = 'XLRSport$2024' +EMAIL_USE_TLS = True +DEFAULT_FROM_EMAIL = 'Padel Club ' diff --git a/padelclub_backend/urls.py b/padelclub_backend/urls.py index dc2bb89..f97bd39 100644 --- a/padelclub_backend/urls.py +++ b/padelclub_backend/urls.py @@ -38,6 +38,7 @@ urlpatterns = [ path("", include("tournaments.urls")), path('admin/', admin.site.urls), path('api-auth/', include('rest_framework.urls')), + path('dj-rest-auth/', include('dj_rest_auth.urls')), path('api/plus/api-token-auth/', obtain_auth_token, name='api_token_auth'), path("api/plus/user-by-token/", views.user_by_token, name="user_by_token"), path("api/plus/change-password/", views.ChangePasswordView.as_view(), name="change_password"), diff --git a/requirements.txt b/requirements.txt index 4035803..dcd22cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Django==4.2.11 djangorestframework==3.14.0 psycopg2-binary==2.9.9 +dj-rest-auth==5.1.0 diff --git a/tournaments/migrations/0022_alter_round_loser_alter_tournament_is_private.py b/tournaments/migrations/0022_alter_round_loser_alter_tournament_is_private.py new file mode 100644 index 0000000..acc5b05 --- /dev/null +++ b/tournaments/migrations/0022_alter_round_loser_alter_tournament_is_private.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.11 on 2024-04-02 08:56 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournaments', '0021_match_name_match_order_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='round', + name='loser', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='tournaments.round'), + ), + migrations.AlterField( + model_name='tournament', + name='is_private', + field=models.BooleanField(default=False), + ), + ]