Changeset - 836166f4b313
[Not reviewed]
0 4 0
Luke Hatcher - 12 years ago 2012-07-14 01:43:08
lukeman@gmail.com
remove extra speaker profile fields
4 files changed with 1 insertions and 35 deletions:
0 comments (0 inline, 0 general)
symposion/speakers/admin.py
Show inline comments
...
 
@@ -4,6 +4,6 @@ from symposion.speakers.models import Speaker
 

	
 

	
 
admin.site.register(Speaker,
 
    list_display = ["name", "email", "twitter_username", "sessions_preference", "created"],
 
    list_display = ["name", "email", "created"],
 
    search_fields = ["name"],
 
)
...
 
\ No newline at end of file
symposion/speakers/fixture_gen.py
Show inline comments
...
 
@@ -15,14 +15,12 @@ def speakers():
 
        user=guido,
 
        name="Guido van Rossum",
 
        biography="I wrote Python, and named it after Monty Python",
 
        twitter_username="gvanrossum",
 
    )
 
    Speaker.objects.create(
 
        user=matz,
 
        name="Yukihiro Matsumoto",
 
        biography="I wrote Ruby, and named it after the rare gem Ruby, a pun "
 
            "on Perl/pearl.",
 
        twitter_username="yukihiro_matz"
 
    )
 
    Speaker.objects.create(
 
        user=larry,
symposion/speakers/forms.py
Show inline comments
...
 
@@ -7,34 +7,13 @@ from symposion.speakers.models import Speaker
 

	
 
class SpeakerForm(forms.ModelForm):
 
    
 
    sessions_preference = forms.ChoiceField(
 
        widget=forms.RadioSelect(),
 
        choices=Speaker.SESSION_COUNT_CHOICES,
 
        required=False,
 
        help_text="If you've submitted multiple proposals, please let us know if you only want to give one or if you'd like to give two talks."
 
    )
 
    
 
    class Meta:
 
        model = Speaker
 
        fields = [
 
            "name",
 
            "biography",
 
            "photo",
 
            "twitter_username",
 
            "sessions_preference"
 
        ]
 
        widgets = {
 
            "biography": MarkItUpWidget(),
 
        }
 
    
 
    def clean_twitter_username(self):
 
        value = self.cleaned_data["twitter_username"]
 
        if value.startswith("@"):
 
            value = value[1:]
 
        return value
 
    
 
    def clean_sessions_preference(self):
 
        value = self.cleaned_data["sessions_preference"]
 
        if not value:
 
            return None
 
        return int(value)
symposion/speakers/models.py
Show inline comments
...
 
@@ -19,11 +19,6 @@ class Speaker(models.Model):
 
    name = models.CharField(max_length=100, help_text="As you would like it to appear in the conference program.")
 
    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
 
    invite_email = models.CharField(max_length=200, unique=True, null=True, db_index=True)
 
    invite_token = models.CharField(max_length=40, db_index=True)
...
 
@@ -31,12 +26,6 @@ class Speaker(models.Model):
 
        default = datetime.datetime.now,
 
        editable = False
 
    )
 
    sessions_preference = models.IntegerField(
 
        choices=SESSION_COUNT_CHOICES,
 
        null=True,
 
        blank=True,
 
        help_text="If you've submitted multiple proposals, please let us know if you only want to give one or if you'd like to give two talks. You may submit more than two proposals."
 
    )
 
    
 
    def __unicode__(self):
 
        if self.user:
0 comments (0 inline, 0 general)