class Meta: widgets = { 'products_per_page': NumberInput(), 'max_products_per_page': NumberInput(), 'related_products_to_show': NumberInput(), 'max_quantity': NumberInput() } tabs = [{ 'title': 'Shop', 'fields': [ 'products_per_page', 'max_products_per_page', 'related_products_to_show', 'order_id', 'order_id_prefix', 'order_id_suffix', 'max_quantity', 'guest_checkout', 'stocklevel', 'special_requirements', 'terms_page', 'image_placeholder', 'sku_is_barcode', 'barcode_system', 'mail_subject_prefix', 'mail_notify_address', 'mail_from_address', 'shop_email_template', 'ordering_options', 'ordering_default' ] }] sections = { 'products_per_page': 'Pagination', 'order_id': 'Order Reference Number', 'max_quantity': 'Options', 'terms_page': 'T&C\'s and Image Placeholder', 'sku_is_barcode': 'SKU and Barcodes', 'mail_subject_prefix': 'Email Notification', 'ordering_options': 'Product Ordering' }
class Meta: widgets = { 'max_items': NumberInput() } tabs = [ { 'title': 'Title', 'fields': [ 'title', 'disabled' ] }, { 'title': 'Directory', 'fields': [ 'include_tags_1', 'include_tags_2', 'include_tags_3', 'include_tags_4', 'include_tags_5', 'include_tags_6', 'exclude_tags', 'order_mode', 'max_items' ] } ] sections = { 'title': 'Title', 'include_tags_1': 'Aggregation (What it presents)' }
class Meta: widgets = { 'max_items': NumberInput() } tabs = [ { 'title': 'Directory', 'fields': [ 'include_tags_1', 'include_tags_2', 'include_tags_3', 'include_tags_4', 'include_tags_5', 'include_tags_6', 'exclude_tags', 'order_mode', 'max_items', 'cascade_tags', ] } ] sections = { 'tags': 'Classification (Where it is presented)', 'include_tags_1': 'Aggregation (What it presents)' }
class Meta: widgets = { 'max_items': NumberInput() } tabs = [ { 'title': 'Navigation', 'fields': [ 'nav_include_tags', 'nav_exclude_tags', 'nav_order_mode', ] }, { 'title': 'Directory', 'fields': [ 'include_tags_1', 'include_tags_2', 'include_tags_3', 'include_tags_4', 'include_tags_5', 'include_tags_6', 'exclude_tags', 'order_mode', 'max_items' ] } ] sections = { 'nav_include_tags': 'Navigation Aggregation (What it presents within the navigation)', 'include_tags_1': 'Aggregation (What it presents)' }
class ProductSKUForm(BaseForm, ProductSKUFormMixin): """ Form for controlling product SKU details. """ _id = forms.IntegerField(required=False, widget=forms.HiddenInput()) enabled = forms.BooleanField(required=False, initial=False, widget=forms.CheckboxInput()) sku = forms.CharField( required=False, max_length=255, label='SKU', widget=forms.TextInput(attrs={'class': 'input-medium'}), help_text='SKU (Stock-keeping unit). Unique product code.') barcode = forms.CharField( required=False, max_length=32, label='Barcode', widget=forms.TextInput(attrs={'class': 'input-small'}), help_text='Barcode') price = forms.DecimalField(max_digits=12, decimal_places=2, required=False, label='Price', widget=BootstrapTextInput( prepend=settings.CURRENCY, attrs={'class': 'rounded input-mini'})) stocklevel = forms.IntegerField(required=False, label='Stock Level', initial=0, widget=NumberInput()) def configure(self, request, barcode_system): self._barcode_system = barcode_system if barcode_system: if request.settings.sku_is_barcode: self.remove_field('sku') self.fields['barcode'].label = 'SKU / Barcode' self.fields[ 'barcode'].help_text = 'SKU / Barcode (%s)' % barcode_system.upper( ) else: self.fields[ 'barcode'].help_text = 'Barcode (%s)' % barcode_system.upper( ) else: self.remove_field('barcode')
class Meta: model = Voucher fields = '__all__' widgets = { 'max_usage': NumberInput(), 'valid_from': DateInput(), 'valid_until': DateInput(), 'categories': forms.CheckboxSelectMultiple(), 'delivery_countries': forms.CheckboxSelectMultiple() } sections = { 'title': 'Name and Discount Code', 'valid_from': 'Time Range and Discount', 'categories': 'Categories', 'delivery_countries': 'Delivery Countries' }
class Meta: widgets = { 'max_items': NumberInput() } tabs = [ { 'title': 'Directory', 'fields': [ 'include_tags_1', 'include_tags_2', 'include_tags_3', 'include_tags_4', 'include_tags_5', 'include_tags_6', 'exclude_tags', 'order_mode', 'max_items' ] } ]
class Meta: widgets = { 'lat': forms.HiddenInput(), 'lng': forms.HiddenInput(), 'zoom': forms.HiddenInput(), 'email': EmailInput(), 'phone': PhoneInput(), 'twitter': UrlInput(), 'facebook': UrlInput(), 'linkedin': UrlInput(), 'google_plus': UrlInput(), 'youtube': UrlInput(), 'instagram': UrlInput(), 'blogger': UrlInput(), 'pinterest': UrlInput(), 'twitter_widget_id': BootstrapTextInput(prepend='#'), 'enquiry_email': EmailInput(), 'enquiry_from': EmailInput(), 'enquiry_reply': EmailInput(), 'page_size': NumberInput(attrs={'min': 2}), 'max_page_size': NumberInput(attrs={'min': 2}), 'monday_start': TimeInput(), 'monday_close': TimeInput(), 'tuesday_start': TimeInput(), 'tuesday_close': TimeInput(), 'wednesday_start': TimeInput(), 'wednesday_close': TimeInput(), 'thursday_start': TimeInput(), 'thursday_close': TimeInput(), 'friday_start': TimeInput(), 'friday_close': TimeInput(), 'saturday_start': TimeInput(), 'saturday_close': TimeInput(), 'sunday_start': TimeInput(), 'sunday_close': TimeInput() } tabs = [{ 'title': 'Pages and Address', 'fields': [ 'homepage', 'default_404', 'contact_page', 'enquiry_template', 'name', 'meta_name', 'address1', 'address2', 'postcode', 'city', 'county', 'country', 'default_encoding', 'notification_text', 'notification_enabled' ] }, { 'title': 'Location', 'fields': [ '_location', 'lat', 'lng', 'zoom', ] }, { 'title': 'Contact', 'fields': [ 'email', 'phone', 'mailchimp_api', 'mailchimp_list_id', 'enquiry_email', 'enquiry_from', 'enquiry_reply' ] }, { 'title': 'Social Media', 'fields': [ 'skype', 'linkedin', 'facebook', 'twitter', 'google_plus', 'youtube', 'instagram', 'blogger', 'pinterest', 'twitter_name', 'twitter_widget_id', ] }, { 'title': 'Identification', 'fields': [ 'analytics_key', 'analytics_hash_location', 'webmaster_key', 'globalsign_key' ] }, { 'title': 'Pagination', 'fields': [ 'paging_enabled', 'paging_child_pages', 'page_size', 'max_page_size' ] }, { 'title': 'Opening Times', 'fields': [ 'monday_start', 'tuesday_start', 'wednesday_start', 'thursday_start', 'friday_start', 'saturday_start', 'sunday_start', 'monday_close', 'tuesday_close', 'wednesday_close', 'thursday_close', 'friday_close', 'saturday_close', 'sunday_close', 'opening_times_enabled', ] }, { 'title': 'Directory', 'fields': ['order_mode'] }] sections = { 'homepage': 'Default Pages', 'name': 'Name and Address', 'default_encoding': 'Default Encoding', 'notification_text': 'Important Notification', '_location': 'Location', 'email': 'Contact', 'skype': 'Social Media Links', 'twitter_name': 'Social Media Widgets', 'mailchimp_api': 'Newsletter Signup (MailChimp)', 'enquiry_email': 'Sending Emails', 'monday_start': 'Start Times', 'monday_close': 'Finish Times', 'opening_times_enabled': 'Enable Opening Times', 'order_mode': 'Directory Default Order' }
class Meta: exclude = ['_nav', '_data'] widgets = { 'title': forms.TextInput(attrs={ 'class': 'slugify', 'autocomplete': 'off' }), 'slug': forms.TextInput(attrs={ 'class': 'slug', 'autocomplete': 'off' }), 'seq': NumberInput(attrs={ 'class': 'input-mini', 'min': '0' }), '_excerpt': widgets.Textarea(attrs={'rows': '8'}), '_meta_description': widgets.Textarea() } tabs = [{ 'title': 'Content', 'fields': [] }, { 'title': 'Title', 'fields': [ 'title', 'slug', 'legacy_url', '_excerpt', '_meta_title', '_meta_description', '_meta_keywords', '_meta_preview', ] }, { 'title': 'Presentation', 'fields': [ 'template', ] }, { 'title': 'Gallery', 'fields': ['image', '_gallery_images'] }, { 'title': 'Visibility', 'fields': ['disabled', 'sitemap', 'seq'] }] sections = { 'title': 'Page Data', '_excerpt': 'Excerpt', '_meta_title': 'Meta Data', '_meta_preview': 'Search Result Preview', 'template': 'Template', 'image': 'Primary Image and Gallery' } limits = { '_meta_title': FormInputLimit(65), '_meta_description': FormInputLimit(240) }