Skip to content

Commit 16bba35

Browse files
authored
Merge pull request #46 from moscowpython/tech/remove_stale
remove stale code
2 parents 062ee5a + 2a427e2 commit 16bba35

File tree

7 files changed

+26
-424
lines changed

7 files changed

+26
-424
lines changed

landing_page/landing_page/settings.py

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
1-
"""
2-
Django settings for landing_page project.
3-
4-
Generated by 'django-admin startproject' using Django 2.0.5.
5-
6-
For more information on this file, see
7-
https://docs.djangoproject.com/en/2.0/topics/settings/
8-
9-
For the full list of settings and their values, see
10-
https://docs.djangoproject.com/en/2.0/ref/settings/
11-
"""
12-
131
import os
142

15-
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
163
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
174

18-
# Quick-start development settings - unsuitable for production
19-
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
20-
21-
# SECURITY WARNING: keep the secret key used in production secret!
22-
SECRET_KEY = '3=dgm+l+a*q98^7(frp1^q6fm_a-b-!pa758g$e34boojl3j0b'
5+
SECRET_KEY = os.environ.get('SECRET_KEY', '3=dgm+l+a*q98^7(frp1^q6fm_a-b-!pa758g$e34boojl3j0b')
236

24-
# SECURITY WARNING: don't run with debug turned on in production!
257
DEBUG = bool(int(os.getenv('DEBUG', False)))
268

279
ALLOWED_HOSTS = ['*']
2810

29-
# Application definition
30-
3111
INSTALLED_APPS = [
3212
'mainpage.apps.MainpageConfig',
3313
'django.contrib.admin',
@@ -68,19 +48,13 @@
6848

6949
WSGI_APPLICATION = 'landing_page.wsgi.application'
7050

71-
# Database
72-
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
73-
7451
DATABASES = {
7552
'default': {
7653
'ENGINE': 'django.db.backends.sqlite3',
7754
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
7855
}
7956
}
8057

81-
# Password validation
82-
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
83-
8458
AUTH_PASSWORD_VALIDATORS = [
8559
{
8660
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
@@ -96,9 +70,6 @@
9670
},
9771
]
9872

99-
# Internationalization
100-
# https://docs.djangoproject.com/en/2.0/topics/i18n/
101-
10273
LANGUAGE_CODE = 'ru-RU'
10374

10475
TIME_ZONE = 'Europe/Moscow'
@@ -115,9 +86,6 @@
11586

11687
USE_TZ = True
11788

118-
# Static files (CSS, JavaScript, Images)
119-
# https://docs.djangoproject.com/en/2.0/howto/static-files/
120-
12189
STATIC_URL = '/static/'
12290

12391
STATIC_ROOT = os.path.join(BASE_DIR, '../staticfiles')
@@ -129,5 +97,3 @@
12997
MEDIA_ROOT = os.path.join(BASE_DIR, '../media')
13098

13199
MEDIA_URL = '/media/'
132-
133-
WEBHOOK_KEY = '0001VypAArY7lFDgMdyC5kwutDGQdDc6rXljuIcI5iBttpPe200'

landing_page/landing_page/urls.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
"""landing_page URL Configuration
2-
3-
The `urlpatterns` list routes URLs to views. For more information please see:
4-
https://docs.djangoproject.com/en/2.0/topics/http/urls/
5-
Examples:
6-
Function views
7-
1. Add an import: from my_app import views
8-
2. Add a URL to urlpatterns: path('', views.home, name='home')
9-
Class-based views
10-
1. Add an import: from other_app.views import Home
11-
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12-
Including another URLconf
13-
1. Import the include() function: from django.urls import include, path
14-
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15-
"""
161
from django.contrib import admin
172
from django.urls import include, path
183

landing_page/landing_page/wsgi.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
"""
2-
WSGI config for landing_page project.
3-
4-
It exposes the WSGI callable as a module-level variable named ``application``.
5-
6-
For more information on this file, see
7-
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
8-
"""
9-
101
import os
112

123
from django.core.wsgi import get_wsgi_application

landing_page/mainpage/models.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.db import models
2-
from datetime import date, datetime, timedelta
2+
from datetime import date, timedelta
33

44

55
class MoscowPythonMeetup(models.Model):
@@ -225,16 +225,16 @@ def past_due_date(self):
225225
class LearnPythonMultiCityCourses(models.Model):
226226
class Meta:
227227
verbose_name_plural = 'LearnPython Цены на курсы в разных городах'
228-
228+
229229
def __str__(self):
230230
return f'Курсы в городе {self.city_name}'
231-
231+
232232
city_name = models.CharField(
233233
max_length=50,
234234
verbose_name='Название города',
235235
help_text='Какой город указывать в списке'
236236
)
237-
237+
238238
long = models.DecimalField(
239239
max_digits=9,
240240
decimal_places=6
@@ -244,37 +244,37 @@ def __str__(self):
244244
max_digits=9,
245245
decimal_places=6
246246
)
247-
247+
248248
early_date = models.DateField(
249249
verbose_name='Дата окончания ранней регистрации',
250250
blank=False,
251251
null=False
252252
)
253-
253+
254254
early_price = models.IntegerField(
255255
verbose_name="Стоимость курса в раннюю регистрацию",
256256
null=False,
257257
blank=False
258258
)
259-
259+
260260
early_installment_price = models.IntegerField(
261261
verbose_name="Стоимость рассрочки",
262262
null=False,
263263
blank=False
264264
)
265-
265+
266266
basic_date = models.DateField(
267267
verbose_name='Дата начала основной регистрации',
268268
blank=False,
269269
null=False
270270
)
271-
271+
272272
basic_price = models.IntegerField(
273273
verbose_name="Стоимость курса в обычную регистрацию",
274274
null=False,
275275
blank=False
276276
)
277-
277+
278278
basic_installment_price = models.IntegerField(
279279
verbose_name="Стоимость рассрочки",
280280
null=False,

0 commit comments

Comments
 (0)