made biography optional and cleaned up speaker code a little

This commit is contained in:
James Tauber 2012-07-12 15:53:44 -04:00
parent 19d8b1dc7e
commit 81853ece30
2 changed files with 2 additions and 25 deletions

View file

@ -1,7 +1,5 @@
from django import forms
from django.contrib import messages
from markitup.widgets import MarkItUpWidget
from symposion.speakers.models import Speaker
@ -40,24 +38,3 @@ class SpeakerForm(forms.ModelForm):
if not value:
return None
return int(value)
# class SignupForm(PinaxSignupForm):
# def save(self, speaker, request=None):
# # don't assume a username is available. it is a common removal if
# # site developer wants to use email authentication.
# username = self.cleaned_data.get("username")
# email = self.cleaned_data["email"]
# new_user = self.create_user(username)
# if speaker.invite_email == new_user.email:
# # already verified so can just create
# EmailAddress(user=new_user, email=email, verified=True, primary=True).save()
# else:
# if request:
# messages.info(request, u"Confirmation email sent to %(email)s" % {"email": email})
# EmailAddress.objects.add_email(new_user, email)
# new_user.is_active = False
# new_user.save()
# self.after_signup(new_user)
# return new_user

View file

@ -17,14 +17,14 @@ class Speaker(models.Model):
user = models.OneToOneField(User, null=True, related_name="speaker_profile")
name = models.CharField(max_length=100, help_text="As you would like it to appear in the conference program.")
biography = MarkupField(help_text="A little bit about you. Edit using <a href='http://warpedvisions.org/projects/markdown-cheat-sheet/' target='_blank'>Markdown</a>.")
biography = MarkupField(blank=True, help_text="A little bit about you. Edit using <a href='http://warpedvisions.org/projects/markdown-cheat-sheet/' target='_blank'>Markdown</a>.")
photo = models.ImageField(upload_to="speaker_photos", blank=True)
twitter_username = models.CharField(
max_length = 15,
blank = True,
help_text = "Your Twitter account"
)
annotation = models.TextField() # staff only
annotation = models.TextField() # staff only
invite_email = models.CharField(max_length=200, unique=True, null=True, db_index=True)
invite_token = models.CharField(max_length=40, db_index=True)
created = models.DateTimeField(