github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

mihasya / yourmuni

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (1)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Commuting made easy - save the muni stops that interest you most — Read more

  cancel

http://yourmuni.appspot.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

fixed invalid syntax 
mihasya (author)
Wed Jan 28 17:33:31 -0800 2009
commit  2f637e23246d546460001c1a14b9c4021a2baf7a
tree    6cedc9f263a1d4c999b17d20dab36e7a6db7df1c
parent  6906d4d0e9e924d302b0d4c5a653353fde1af5ae
yourmuni / forms.py forms.py
100644 25 lines (22 sloc) 0.85 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django import forms
from models import Bmark
from google.appengine.ext import db
from django.utils.translation import ugettext_lazy as _
from google.appengine.api import users
from django.template.defaultfilters import slugify
import re
 
class AddBmarkForm(forms.Form):
    name = forms.CharField(max_length=50, required=False)
    description = forms.CharField(max_length=255, required=True)
 
    def clean_description(self):
        desc = self.cleaned_data['description']
        name = slugify(desc).decode()
        q = db.Query(Bmark)
        q.filter('name =', name)
        q.filter('user =', users.get_current_user())
        if (q.get()):
            raise forms.ValidationError(_("A bookmark with that \
name exists already"))
        else:
            self.cleaned_data['name'] = name
            return desc
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server