(ITEM_PREFIX + r'add/$', 'item_add'), # for adding sub-things
(r'^admin/$', 'admin_index'),
(r'^admin/terms/' + GENERIC_REGEX, 'admin_terms'),
- (r'^admin/courses/' + GENERIC_REGEX, 'admin_courses'),
- (r'^admin/items/' + GENERIC_REGEX, 'admin_items'),
(r'^admin/depts/' + GENERIC_REGEX, 'admin_depts'),
(r'^admin/news/' + GENERIC_REGEX, 'admin_news'),
(r'^admin/targets/' + GENERIC_REGEX, 'admin_targets'),
print("results are %d" % len(res))
collector = [(None,None)] * len(res)
- # we fudge this since it has more overhead
start = (page_num - 1) * count
end = (page_num * count) + 1
#collector.append ((bibid, unicode(title, 'ascii', 'ignore')))
collector.pop(idx)
- collector.insert (idx,(bibid, unicode(title, 'ascii', 'ignore')))
+ # collector.insert (idx,(bibid, unicode(title, 'ascii', 'ignore')))
+ collector.insert (idx,(bibid, unicode(title, 'utf-8', 'ignore')))
idx+=1
conn.close ()
###
# graham - zap this if it messes anything up :-)
###
-class CourseForm(ModelForm):
- class Meta:
- model = models.Course
-
- class Index:
- title = _('Courses')
- all = models.Course.objects.order_by('code').all
- cols = ['code', 'title']
- links = [0,1]
-
- clean_code = strip_and_nonblank('code')
- clean_title = strip_and_nonblank('title')
-
-admin_courses = generic_handler(CourseForm, decorator=admin_only)
-
-class ItemForm(ModelForm):
- class Meta:
- model = models.Item
-
- class Index:
- title = _('Items')
- all = models.Item.objects.order_by('title').all
- cols = ['title', 'author']
- links = [0,1]
-
- clean_title = strip_and_nonblank('title')
- clean_author = strip_and_nonblank('author')
-
-admin_items = generic_handler(ItemForm, decorator=admin_only)
-
class TargetForm(ModelForm):
class Meta:
model = models.Target
<li><a href="terms/">Terms</a></li>
<li><a href="depts/">Departments</a></li>
<li><a href="courses/">Courses</a></li>
- <li><a href="items/">Items</a></li>
<li><a href="news/">News Items</a></li>
</ul>
<ul>
<li><a href="targets/">Manage Z39.50 Targets</a></li>
- <!-- not sure if this is an admin option yet -->
<li><a href="../zsearch/">Search Z39.50 Targets</a></li>
</ul>
</body>