| 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | |
|---|
| 3 | #_____________________________________________________________________________ |
|---|
| 4 | # meta information |
|---|
| 5 | |
|---|
| 6 | __author__ = "Jens Diemer" |
|---|
| 7 | __url__ = "http://www.PyLucid.org" |
|---|
| 8 | __description__ = "A RSS feed reader" |
|---|
| 9 | __long_description__ = """ |
|---|
| 10 | This lucidFunction read from a given URL the RSS feed ans integrade |
|---|
| 11 | it on your CMS Page. |
|---|
| 12 | """ |
|---|
| 13 | |
|---|
| 14 | #_____________________________________________________________________________ |
|---|
| 15 | # preferences |
|---|
| 16 | |
|---|
| 17 | from django.conf import settings |
|---|
| 18 | |
|---|
| 19 | from django import forms |
|---|
| 20 | from django.utils.translation import ugettext as _ |
|---|
| 21 | |
|---|
| 22 | class PreferencesForm(forms.Form): |
|---|
| 23 | # url = forms.URLField( |
|---|
| 24 | # initial="http://sourceforge.net/export/rss2_projnews.php?group_id=146328", |
|---|
| 25 | # min_length = 15, |
|---|
| 26 | # verify_exists = True, |
|---|
| 27 | # label=_("feed URL"), |
|---|
| 28 | # help_text = _("The URL address of the RSS feed."), |
|---|
| 29 | # widget=forms.TextInput(attrs={'class':'bigger'}), |
|---|
| 30 | # ) |
|---|
| 31 | # FIXME: Create a choice field thats listed all existing files. |
|---|
| 32 | internal_page = forms.CharField( |
|---|
| 33 | initial="RSS", |
|---|
| 34 | help_text = _( |
|---|
| 35 | "The template filename for this feed." |
|---|
| 36 | " (The internal page stored in %s or %s)" |
|---|
| 37 | ) % (settings.INTERNAL_PAGE_DIR, settings.CUSTOM_INTERNAL_PAGE_DIR), |
|---|
| 38 | ) |
|---|
| 39 | timeout = forms.IntegerField( |
|---|
| 40 | initial = 1, |
|---|
| 41 | min_value = 1, |
|---|
| 42 | max_value = 60, |
|---|
| 43 | help_text=_("socket timeout for getting the RSS feed.") |
|---|
| 44 | ) |
|---|
| 45 | debug = forms.BooleanField( |
|---|
| 46 | initial=False, required=False, |
|---|
| 47 | help_text=_( |
|---|
| 48 | "Display the raw parsed feed?" |
|---|
| 49 | " Usefull to edit the template for this feed." |
|---|
| 50 | ), |
|---|
| 51 | ) |
|---|
| 52 | |
|---|
| 53 | #_____________________________________________________________________________ |
|---|
| 54 | # plugin administration data |
|---|
| 55 | |
|---|
| 56 | plugin_manager_data = { |
|---|
| 57 | "debug" : { |
|---|
| 58 | "must_login" : True, |
|---|
| 59 | "must_admin" : False, |
|---|
| 60 | }, |
|---|
| 61 | "lucidTag" : { |
|---|
| 62 | "must_login" : False, |
|---|
| 63 | "must_admin" : False, |
|---|
| 64 | }, |
|---|
| 65 | } |
|---|