~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/exercise_service.py

  • Committer: William Grant
  • Date: 2010-02-23 08:55:42 UTC
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: grantw@unimelb.edu.au-20100223085542-r8xw14bxxoraza51
Permit underscores in all names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        if not VALID_URL_NAME.match(identifier):
52
52
            raise BadRequest(
53
53
                "Exercise names must consist of an alphanumeric character "
54
 
                "followed by any number of alphanumerics, ., + or -.")
 
54
                "followed by any number of alphanumerics, ., +, - or _.")
55
55
 
56
56
        if req.store.find(Exercise, id=unicode(identifier)).one():
57
57
            raise BadRequest("An exercise with that URL name already exists.")