Changeset 108
- Timestamp:
- 07-01-2008 20:45:15 (12 months ago)
- Author:
- s0undt3ch
- Message:
-
Set xmlrpc url to the defined one on the spec(let's see if crawlers stop throwing errors).
Remember author name and last language chosen with cookies.
- Location:
- trunk/pastie
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r41
|
r108
|
|
| 19 | 19 | # CUSTOM ROUTES HERE |
| 20 | 20 | map.connect('newpaste', '', controller='pasties', action='new') |
| 21 | | map.connect('xmlrpc', '/xmlrpc/:action/:id', controller='xmlrpc') |
| | 21 | map.connect('xmlrpc', '/RPC2/:action/:id', controller='xmlrpc') |
| 22 | 22 | # map.connect('xmlrpc', '/xmlrpc/', controller='xmlrpc', action='index') |
| 23 | 23 | map.connect('list', '/list/:id', controller='pasties', action='list') |
-
|
r33
|
r108
|
|
| 16 | 16 | log.debug('On new') |
| 17 | 17 | c.tags = [str(tag.name) for tag in Session.query(Tag).all()] |
| | 18 | if 'author' in request.cookies: |
| | 19 | c.author = request.cookies['author'] |
| | 20 | else: |
| | 21 | c.author = '' |
| | 22 | if 'language' in request.cookies: |
| | 23 | c.language = request.cookies['language'] |
| | 24 | else: |
| | 25 | c.language = '' |
| 18 | 26 | c.public_key = config['spamfilter.recaptcha.public_key'] |
| 19 | 27 | if id: |
| … |
… |
|
| 44 | 52 | for tag in paste.tags: |
| 45 | 53 | tagscache.remove_value(tag.name) |
| | 54 | |
| | 55 | # Set some defaults on user cookie |
| | 56 | response.set_cookie('language', language, expires=31556926) |
| | 57 | response.set_cookie('author', author, expires=31556926) |
| 46 | 58 | redirect_to('paste', id=paste.id) |
| 47 | 59 | |
-
|
r46
|
r108
|
|
| 26 | 26 | <dd> |
| 27 | 27 | <input type="text" id="id_author" class="vTextField" name="author" |
| 28 | | size="30" value="" maxlength="100" /> |
| | 28 | size="30" value="$c.author" maxlength="100" /> |
| 29 | 29 | <span class="error-message" py:if="'author' in c.errors"> |
| 30 | 30 | $c.errors.author |
| … |
… |
|
| 40 | 40 | selected="${c.parent.language==lexer and 'selected' or ''}"> |
| 41 | 41 | ${lexers[lexer]}</option> |
| 42 | | <option py:if="not c.parent" |
| 43 | | value="$lexer">${lexers[lexer]}</option> |
| | 42 | <option py:if="not c.parent" value="$lexer" |
| | 43 | selected="${c.language==lexer and 'selected' or ''}"> |
| | 44 | ${lexers[lexer]}</option> |
| 44 | 45 | </py:for> |
| 45 | 46 | </select> |
Download in other formats:
|
|