Lines 7-13
import cherrypy
Link Here
|
7 |
|
7 |
|
8 |
from web.model import latest_per_day, \ |
8 |
from web.model import latest_per_day, \ |
9 |
build_centerpkg_list, \ |
9 |
build_centerpkg_list, \ |
10 |
get_atom |
10 |
get_atom, \ |
|
|
11 |
NotValidAtom |
11 |
from web.lib.headers import lastmodified_httpheader, \ |
12 |
from web.lib.headers import lastmodified_httpheader, \ |
12 |
lastmodified_rightcontent |
13 |
lastmodified_rightcontent |
13 |
from web.lib.query_filter import sanitize_query_string |
14 |
from web.lib.query_filter import sanitize_query_string |
Lines 380-386
class Root(object):
Link Here
|
380 |
cat = args[0] |
381 |
cat = args[0] |
381 |
pn = args[1] |
382 |
pn = args[1] |
382 |
cpvstr = '%s/%s' % (cat, pn) |
383 |
cpvstr = '%s/%s' % (cat, pn) |
383 |
cpvtmp = get_atom(cpvstr) |
384 |
try: |
|
|
385 |
cpvtmp = get_atom(cpvstr) |
386 |
except NotValidAtom: |
387 |
raise cherrypy.HTTPRedirect("/") |
388 |
|
384 |
pn = cpvtmp.package |
389 |
pn = cpvtmp.package |
385 |
cat = cpvtmp.category |
390 |
cat = cpvtmp.category |
386 |
pagetitle = "/package/%s/%s" % (cat, pn) |
391 |
pagetitle = "/package/%s/%s" % (cat, pn) |