Files
@ 2465f2645e2e
Branch filter:
Location: symposion_app/pinaxcon/registrasion/forms.py - annotation
2465f2645e2e
808 B
text/x-python
urlize abstracts
I've looked through the database and I can't find any accepted
proposals that actually contain anything to linkify - but I've had
several requests from people that I think are reasonable, things like
being able to link to their project (we ask them to provide a project
url but we don't use that link)
This seems like a reasonably fast way to let those people add a
link. We still have to manually accept changes to their proposal so we
have a chance to look at the content of the url if we want.
The urlize filter adds rel=nofollow to the link automatically.
I've looked through the database and I can't find any accepted
proposals that actually contain anything to linkify - but I've had
several requests from people that I think are reasonable, things like
being able to link to their project (we ask them to provide a project
url but we don't use that link)
This seems like a reasonably fast way to let those people add a
link. We still have to manually accept changes to their proposal so we
have a chance to look at the content of the url if we want.
The urlize filter adds rel=nofollow to the link automatically.
85ee108a1f92 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 833eebc46ddb 833eebc46ddb 833eebc46ddb 079f87b1d261 079f87b1d261 833eebc46ddb 079f87b1d261 9d7be5f6dfcf 079f87b1d261 079f87b1d261 833eebc46ddb 833eebc46ddb 833eebc46ddb 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 8fa8fc4012a5 8fa8fc4012a5 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 079f87b1d261 079f87b1d261 079f87b1d261 833eebc46ddb 39b556b7ac4f 833eebc46ddb | from pinaxcon.registrasion import models
from django import forms
class YesNoField(forms.TypedChoiceField):
def __init__(self, *args, **kwargs):
kwargs['required'] = True
super(YesNoField, self).__init__(
*args,
coerce=lambda x: x in ['True', 'Yes', True],
choices=((None, '--------'), (False, 'No'), (True, 'Yes')),
**kwargs
)
class ProfileForm(forms.ModelForm):
''' A form for requesting badge and profile information. '''
required_css_class = 'label-required'
class Meta:
model = models.AttendeeProfile
exclude = ['attendee']
widgets = {
'past_lca': forms.widgets.CheckboxSelectMultiple
}
field_classes = {
"of_legal_age": YesNoField,
}
|