|
15 | 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) |
16 | 16 | """ |
17 | 17 | from django.urls import path |
18 | | -from .views.start import start |
19 | | -from .views.have_you_ever_smoked import have_you_ever_smoked |
20 | | -from .views.date_of_birth import date_of_birth |
21 | | -from .views.responses import responses |
| 18 | +from .views.start import StartView |
| 19 | +from .views.have_you_ever_smoked import HaveYouEverSmokedView |
| 20 | +from .views.date_of_birth import DateOfBirthView |
| 21 | +from .views.responses import ResponsesView |
22 | 22 | from .views.age_range_exit import age_range_exit |
23 | 23 | from .views.non_smoker_exit import non_smoker_exit |
24 | 24 | from .views.your_results import your_results |
25 | | -from .views.height import height |
26 | | -from .views.weight import weight |
27 | | -from .views.sex_at_birth import sex_at_birth |
28 | | -from .views.gender import gender |
29 | | -from .views.ethnicity import ethnicity |
| 25 | +from .views.height import HeightView |
| 26 | +from .views.weight import WeightView |
| 27 | +from .views.sex_at_birth import SexAtBirthView |
| 28 | +from .views.gender import GenderView |
| 29 | +from .views.ethnicity import EthnicityView |
30 | 30 |
|
31 | 31 | urlpatterns = [ |
32 | | - path('start', start, name='start'), |
33 | | - path('have-you-ever-smoked', have_you_ever_smoked, name='have_you_ever_smoked'), |
34 | | - path('date-of-birth', date_of_birth, name='date_of_birth'), |
35 | | - path('height', height, name='height'), |
36 | | - path('weight', weight, name='weight'), |
37 | | - path('sex-at-birth', sex_at_birth, name='sex_at_birth'), |
38 | | - path('gender', gender, name='gender'), |
39 | | - path('ethnicity', ethnicity, name='ethnicity'), |
40 | | - path('responses', responses, name='responses'), |
| 32 | + path('start', StartView.as_view(), name='start'), |
| 33 | + path('have-you-ever-smoked', HaveYouEverSmokedView.as_view(), name='have_you_ever_smoked'), |
| 34 | + path('date-of-birth', DateOfBirthView.as_view(), name='date_of_birth'), |
| 35 | + path('height', HeightView.as_view(), name='height'), |
| 36 | + path('weight', WeightView.as_view(), name='weight'), |
| 37 | + path('sex-at-birth', SexAtBirthView.as_view(), name='sex_at_birth'), |
| 38 | + path('gender', GenderView.as_view(), name='gender'), |
| 39 | + path('ethnicity', EthnicityView.as_view(), name='ethnicity'), |
| 40 | + path('responses', ResponsesView.as_view(), name='responses'), |
41 | 41 | path('age-range-exit', age_range_exit, name='age_range_exit'), |
42 | 42 | path('non-smoker-exit', non_smoker_exit, name='non_smoker_exit'), |
43 | 43 | path('your-results', your_results, name='your_results'), |
|
0 commit comments