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
|
Line | |
---|
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) |
---|
9 | display_name = models.CharField(max_length=50) |
---|
10 | year = models.IntegerField() |
---|
11 | website = models.URLField() |
---|
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.") |
---|
15 | logo = models.ImageField(upload_to='fysm/logos', blank=True, ) |
---|
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.", ) |
---|
18 | |
---|
19 | class Meta: |
---|
20 | verbose_name = "FYSM submission" |
---|
21 | |
---|
22 | class FYSMCategory(models.Model): |
---|
23 | name = models.CharField(max_length=10) |
---|
24 | slug = models.SlugField() |
---|
25 | blurb = models.TextField() |
---|
26 | |
---|
27 | def __str__(self, ): |
---|
28 | return self.name |
---|
29 | |
---|
30 | class Meta: |
---|
31 | verbose_name = "FYSM category" |
---|
32 | verbose_name_plural = "FYSM categories" |
---|
Note: See
TracBrowser
for help on using the repository browser.