README.md changes and newsletter removal
This commit is contained in:
parent
62a6f9f64c
commit
ad85942c33
37 changed files with 4 additions and 467 deletions
|
@ -17,7 +17,6 @@ from sortedm2m.forms import SortedMultipleChoiceField
|
|||
|
||||
from judge.models import Language, Organization, Profile, TIMEZONE
|
||||
from judge.utils.recaptcha import ReCaptchaField, ReCaptchaWidget
|
||||
from judge.utils.subscription import Subscription, newsletter_id
|
||||
from judge.widgets import Select2MultipleWidget, Select2Widget
|
||||
|
||||
valid_id = re.compile(r"^\w+$")
|
||||
|
@ -51,11 +50,6 @@ class CustomRegistrationForm(RegistrationForm):
|
|||
widget=Select2MultipleWidget(attrs={"style": "width:100%"}),
|
||||
)
|
||||
|
||||
if newsletter_id is not None:
|
||||
newsletter = forms.BooleanField(
|
||||
label=_("Subscribe to newsletter?"), initial=True, required=False
|
||||
)
|
||||
|
||||
if ReCaptchaField is not None:
|
||||
captcha = ReCaptchaField(widget=ReCaptchaWidget())
|
||||
|
||||
|
@ -124,9 +118,6 @@ class RegistrationView(OldRegistrationView):
|
|||
profile.language = cleaned_data["language"]
|
||||
profile.organizations.add(*cleaned_data["organizations"])
|
||||
profile.save()
|
||||
|
||||
#if newsletter_id is not None and cleaned_data["newsletter"]:
|
||||
# Subscription(user=user, newsletter_id=newsletter_id, subscribed=True).save()
|
||||
return user
|
||||
|
||||
def get_initial(self, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue