project/kiwipycon/proceedings/forms.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 13 Jul 2010 01:43:25 +0530
changeset 103 852015a7eead
parent 93 7c27e8d9231d
parent 101 fb27be005a5c
permissions -rw-r--r--
Merged changes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
84
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     1
# -*- coding: utf-8 -*-
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     2
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     3
from django import forms
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     4
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     5
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     6
class ProceedingsForm(forms.Form):
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     7
    """Form for proceedings.
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     8
    """
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     9
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    10
    title = forms.CharField(required=True, label=u'Title',
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    11
                            widget=forms.TextInput(attrs={'size':'70'}))
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    12
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    13
    abstract = forms.CharField(
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    14
        widget=forms.Textarea(attrs={'cols': '80', 'rows': '8'}),
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    15
        required=True, label=u'Abstract',
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    16
        help_text=u'Upto 200 words. Content must strictly be in reSt format.')
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    17
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    18
    body = forms.CharField(
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    19
        widget=forms.Textarea(attrs={'cols': '80', 'rows': '25'}),
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    20
        required=False, label=u'Body', help_text=u'Approximately 7 pages. '
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    21
        'Content must strictly be in reSt format.')
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    22
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    23
    rst_file = forms.FileField(
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    24
        required=False, label=u'reStructuredText file',
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    25
        help_text=u'The file should contain two sections, one with a heading '
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    26
        "'Abstract' and other with a heading 'Body'.")
d01c62c2a628 Added the initial proceedings app files and enabled them in both production and development settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    27
86
cbe77a26e7a3 Combined 2 authors fields in forms to a single author field. This will be taken care by jQuery on the UI side.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 84
diff changeset
    28
    authors = forms.CharField(
94
e86755df35da Add admin interface and views for proceedings. Booklet is also setup to generate paper.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 86
diff changeset
    29
        required=False, label=u'Author(s)',
101
fb27be005a5c Added complete support for dynamic form to add extra authors fields to proceedings form and added initial support for autocompletion based on user names for authors.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 94
diff changeset
    30
        help_text=u'User ID of the author.')
fb27be005a5c Added complete support for dynamic form to add extra authors fields to proceedings form and added initial support for autocompletion based on user names for authors.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 94
diff changeset
    31
fb27be005a5c Added complete support for dynamic form to add extra authors fields to proceedings form and added initial support for autocompletion based on user names for authors.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 94
diff changeset
    32
    attachment = forms.FileField(
fb27be005a5c Added complete support for dynamic form to add extra authors fields to proceedings form and added initial support for autocompletion based on user names for authors.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 94
diff changeset
    33
        required=False, label=u'Attachments',
fb27be005a5c Added complete support for dynamic form to add extra authors fields to proceedings form and added initial support for autocompletion based on user names for authors.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 94
diff changeset
    34
        help_text=u'Attachments like images that must used in your paper '
fb27be005a5c Added complete support for dynamic form to add extra authors fields to proceedings form and added initial support for autocompletion based on user names for authors.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 94
diff changeset
    35
        'for rendering.')