fysm-4-1iframespace-accessstablestagetest-hooks
Last change
on this file since 57f8ffa was
57f8ffa,
checked in by Alex Dehnert <adehnert@…>, 15 years ago
|
Add tag support (as not seen in c27da9e)
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[80982de] | 1 | from django.db import models |
---|
| 2 | |
---|
| 3 | import datetime |
---|
| 4 | |
---|
| 5 | import groups.models |
---|
| 6 | |
---|
| 7 | class FYSM(models.Model): |
---|
| 8 | group = models.ForeignKey(groups.models.Group) |
---|
[dafa3c8] | 9 | display_name = models.CharField(max_length=50) |
---|
[80982de] | 10 | year = models.IntegerField() |
---|
| 11 | website = models.URLField() |
---|
[80194d8] | 12 | join_url = models.URLField(help_text="If you have a specific web page for students interested in joining your group, you can link to it here. If you leave this blank it will default to your website.") |
---|
| 13 | contact_email = models.EmailField(help_text="Give an address for students interested in joining the group to email (e.g., an officers list)") |
---|
| 14 | description = models.TextField(help_text="Explain in about three or four sentences what your group does and why incoming freshmen should get involved.") |
---|
[1c853ea] | 15 | logo = models.ImageField(upload_to='fysm/logos', blank=True, ) |
---|
[57f8ffa] | 16 | tags = models.CharField(max_length=100, blank=True, help_text="Specify some free-form, comma-delimited tags for your group", ) |
---|
| 17 | categories = models.ManyToManyField('FYSMCategory', blank=True, help_text="Put your group into whichever of our categories seem applicable.", ) |
---|
[80982de] | 18 | |
---|
| 19 | class Meta: |
---|
| 20 | verbose_name = "FYSM submission" |
---|
| 21 | |
---|
[c27da9e] | 22 | class FYSMCategory(models.Model): |
---|
[80982de] | 23 | name = models.CharField(max_length=10) |
---|
[dafa3c8] | 24 | slug = models.SlugField() |
---|
[80982de] | 25 | blurb = models.TextField() |
---|
[aba463b] | 26 | |
---|
| 27 | def __str__(self, ): |
---|
| 28 | return self.name |
---|
[dafa3c8] | 29 | |
---|
| 30 | class Meta: |
---|
[c27da9e] | 31 | verbose_name = "FYSM category" |
---|
| 32 | verbose_name_plural = "FYSM categories" |
---|
Note: See
TracBrowser
for help on using the repository browser.