fix_test #4
@ -78,6 +78,7 @@ class ProfileForm(forms.ModelForm):
|
|||||||
|
|
||||||
|
|
||||||
class RegistrationForm(UserCreationForm):
|
class RegistrationForm(UserCreationForm):
|
||||||
|
captcha = TurnstileField(label='', theme='light', size='normal')
|
||||||
# Поля пользователя
|
# Поля пользователя
|
||||||
first_name = forms.CharField(
|
first_name = forms.CharField(
|
||||||
max_length=30,
|
max_length=30,
|
||||||
|
|||||||
@ -30,6 +30,8 @@
|
|||||||
{% bootstrap_field form.specialization %}
|
{% bootstrap_field form.specialization %}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary" style="width: 100%;">Зарегистрироваться</button>
|
<button type="submit" class="btn btn-primary" style="width: 100%;">Зарегистрироваться</button>
|
||||||
|
<!-- {{ form.as_p }} -->
|
||||||
|
{{ form.captcha }}
|
||||||
</form>
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
|
|||||||
@ -229,6 +229,10 @@ class RegisterView(PageViewTrackingMixin, MenuContextMixin, SuccessMessageMixin,
|
|||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
self.request = kwargs.pop('request', None)
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class ProfileEditView(LoginRequiredMixin, PageViewTrackingMixin, MenuContextMixin, BreadcrumbMixin, UpdateView):
|
class ProfileEditView(LoginRequiredMixin, PageViewTrackingMixin, MenuContextMixin, BreadcrumbMixin, UpdateView):
|
||||||
model = Profile
|
model = Profile
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user