Projects tagged ‘django’, ‘python’, and ‘template’


Jump to tag:

Projects tagged ‘django’, ‘python’, and ‘template’

Filtered by Project Tags django python template

Refine results Project Tags templatetags (4) templatetag (2) flash (1) clevercss (1) fast (1) pagination (1) cms (1) digg (1) app (1) mp3 (1) cheetah (1) djangoapplication (1)

[11 total ]

2 Users
 

Created about 1 year ago.

2 Users

A tree based django CMS applicationThis Django CMS enable you to create and administrate hierarchical pages in a simple and powerful way. DemoThis admin interface is no up to date, but could give ... [More] you an idea of what the software is doing: admin : http://pagesdemo.piquadrat.ch/admin/ frontend : http://pagesdemo.piquadrat.ch/pages/ See the Screenshots Key featuresAutomatic creation of localized placeholders (content area) in admin by adding placeholders tags into page templates. Django admin application integration. Multilingual support. Various Rich Text Editors are directly available. Page can be moved in the tree in a visual way. The tree can be expanded/collapsed. A cookie remember your preferences. Possibility to specify a different page URL for each language. The frontend example provide a basic "edit in place" feature. Directory-like page hierarchy (page can have the same name if they are not in the same directory) Every page can have multiple alias URLs. It's especially useful to migrate websites. Possibility to integrate 3th party apps Optional featuresHere is the list of features you can enable/disable: Revisions. Support for future publication start/end date. Inherited page permissions. Grant all rights to a user. Grant rights on a page only. Grant rights on a page hierarchy. Inherited templates. Page redirection to another page. Page tagging. User input sanitizer (to avoid XSS). Sites framework Dependencies & CompatibilityDjango 1.1, Django 1.0 with older release (1.0.5) Python 2.3. django-mptt django-tagging (if PAGE_TAGGING = True) html5lib (if PAGE_SANITIZE_USER_INPUT = True) django-tinymce (if PAGE_TINYMCE = True) jQuery. Compatible with MySQL, PostgreSQL, SQLite3, some issues are known with Oracle Help and documentationFAQ Install in existing project Check the rest of the Wiki Or post something into the Google Group Test itTo test this CMS checkout the code with subversion : svn checkout http://django-page-cms.googlecode.com/svn/trunk/ django-page-cms And then, run the development server : cd example/ manage.py syncdb manage.py runserverTo run the test suite: python setup.py testIf you have the special page permission system enabled and you are not admin, you must create a PagePermission object with all rights assigned to your user. After that you will be able to create pages. Handling imagesDjango page CMS can use these other projects: http://code.google.com/p/django-page-cms-image-placeholder/ http://code.google.com/p/django-filebrowser/ TranslationsThis application is available in english, german, french, spanish, danish and russian. Site made with Django Page CMShttp://www.osff.no/ Other Django CMSDjango CMS comparaison [Less]
Created about 1 year ago.

1 Users

A set of utilities for creating robust pagination tools throughout a django application. Screencast: History2008-10-24: Version 1.0 Released
Created about 1 year ago.

0 Users

A Django style template to python code compiler written in python aimed to speed.
Created 10 months ago.

0 Users

Create a widgets.py in your application. There you will create a class that subclasses Widget. example: class Login(Widget): template = "account/login.html" def get_context(): ... [More] return {"login_form":LoginForm()} the widget has access to the request and the user. In the template you can do the following now: {% load widget %} {% widget Login %}This will render the template with the context from the get_context function. Widgets will be auto discovered. Code is in alpha stage and not even tested in a production. commits follow... patches are welcome [Less]
Created 12 months ago.

0 Users

A Django application for integrating a Flash based mp3 audioplayer into templates using a custom template tag. It uses the flashplayer from http://www.1pixelout.net/code/audio-player-wordpress-plugin ... [More] and can be easily customized by template parameters. More information can be found at http://pyjax.net/blog/1/2007/06/27/django-flash-audioplayer/ [Less]
Created about 1 year ago.

0 Users

Cleverstyle django template tagsThese templatetags can be used in your Django applications to load stylesheets and css code based on the awesome clevercss python module. There is a similar project ... [More] http://code.google.com/p/django-clevercss/ which allows you store your clevercss code in the db and call it from the templates. I used the file extension .pcss for no other reason than it's easy to identify. A .pcss file is a file written in clevercss code which will be used to generate css files and code. You can separate your styles by writing multiple .pcss files and merging them into one css file inside your templates. The default setup assumes both the css and pcss dir are subdirectories of the same directory (i.e. they're siblings) and will look for .pcss files in MEDIA_ROOT/pcss, convert them and save them to MEDIA_ROOT/css under the same filename. I don't know how taxing this could be in a production environment. I generally use this module during the development phase and then use the {% stylelink 'my_merged_css_file' %} template tag (included in this package) or hard link to the previously generated merged css file once going live. SettingsIn your application settings you can set the following. CLEVERSTYLE_BASE_DIR - Default: '' The base directory in relation to MEDIA_ROOT. The css and pcss directories should be subdirectories of this. CLEVERSTYLE_PCSS_DIR - Default: 'pcss' The directory which holds the .pcss files in relation to settings.CLEVERSTYLE_BASE_DIR. CLEVERSTYLE_CSS_DIR - Default: 'css' The directory which will hold the generated .css files in relation to settings.CLEVERSTYLE_BASE_DIR. Add cleverstyle to your installed apps INSTALLED_APPS=( 'django.contrib.sessions', 'django.contrib.sites', 'cleverstyle', )Load the cleverstyle tags in your templates {% load cleverstyle_tags %}The four basic template tags are: {% clevertag %} {% clevercode %} {% clevermerge %} {% clevermergecode %}{% clevertag pcssfilename[,anotherfile,nth file] [base_dir] [css_dir] [pcss_dir] % }{% clevertag 'my_file1' %} Look for my_file1.pcss in the pcss directory Compare this file to the corresponding css file in the css directory Parse the pcss file and write to the css file (if necessary) Return a tag pointing to the css file. {% clevertag 'my_file1,my_file2,my_file3' %} {% clevertag 'my_file1' 'projects' %} {% clevertag 'my_file1' 'projects' 'style' %} {% clevertag 'my_file1' 'projects' 'style' 'cleverstyle' %} Source files found in the projects/cleverstyle directory in relation to MEDIA_ROOT. {% clevercode %} clevercss code {% endclevercode %}You can write clevercss code in your templates. {% clevercode %} body: margin:0 #header: padding: 15px h1: color: #FFF {% endclevercode %} Which renders as body { margin: 0; } body #header { padding: 15px; } body #header h1 { color: #FFF } {% clevermerge 'filename[,filename2,filenameN]' 'save_as' %} This tag allows you to separate your style markup files logically and merge them into one css file. {% clevermerge 'structure,lists,tables,content,colors,sidebar,footer' 'site-style' %} Merges the selected .pcss files into one .css file and returns a tag. {% clevermergecode 'filename[,filename2,filenameN]' %}Merges the selected .pcss files returns the css code. This follows the same principle as the {% clevermerge %} tag but no save_as file is generated. It should be used between tags. {% clevermergecode 'structure,lists,tables,content,colors,sidebar,footer' %} clevercss codeIf you haven't yet learned about clevercss syntax, please have a look here. An Example/static/pcss/panels.pcss blue=#49678B white=#FDFDFD green=#81B723 div.panel: background: $blue width: 350px margin: 10px auto clear:both padding-bottom: 5px h3: font-size: 1.27em color: $white clear:both margin: 5px 10px border-bottom: 1px solid $blue.darken(30) span: color: $green.brighten(30) text-decoration:underline ul: float:right display:inline margin:0 clear:both li: background: $green float:left display:block padding: 0 a: display:block padding: 3px 7px font-weight:bold text-decoration: none margin: 3px margin-right: 0 background: green.brighten(5) color: $white &:hover: color: #555 background: $blue.brighten(30) text-decoration:underline &:last-child: a: margin-right: 3px div.subpanel: background: $blue.darken(20) clear:both margin: 10px border: 1px solid $white p: color: $white text-align:center Which generates a new css file /static/css/panels.css div.panel { background: #49678b; width: 350px; margin: 10px auto; clear: both; padding-bottom: 5px; } div.panel h3 { font-size: 1.27em; color: #fdfdfd; clear: both; margin: 5px 10px; border-bottom: 1px solid #253548; } div.panel h3 span { color: #c6e88a; text-decoration: underline; } div.panel ul { float: right; display: inline; margin: 0; clear: both; } div.panel ul li { background: #81b723; float: left; display: block; padding: 0; } div.panel ul li a { display: block; padding: 3px 7px; font-weight: bold; text-decoration: none; margin: 3px; margin-right: 0; background: #009900; color: #fdfdfd; } div.panel ul li a:hover { color: #555555; background: #9fb4cd; text-decoration: underline; } div.panel ul li:last-child a { margin-right: 3px; } div.panel div.subpanel { background: #253548; clear: both; margin: 10px; border: 1px solid #fdfdfd; } div.panel div.subpanel p { color: #fdfdfd; text-align: center; } [Less]
Created 7 months ago.

0 Users

Dynamic template snippets for Django, based on django-flatblocks.
Created 10 months ago.

0 Users

Overviewpluralize_pl is fully compatible with Django's "pluralize" filter. Works exactly the same as long as you are giving it up to 2 comma-separated arguments. The difference is you can provide it ... [More] with a third argument, which will be used as a second plural form and applied according to Polish grammar rules: * If value is 0, {{ value|pluralize:"komentarz,komentarzy,komentarze" }} displays "0 komentarzy". * If value is 1, {{ value|pluralize:"komentarz,komentarzy,komentarze" }} displays "1 komentarz". * If value is 2, {{ value|pluralize:"komentarz,komentarzy,komentarze" }} displays "2 komentarze". * If value is 5, {{ value|pluralize:"komentarz,komentarzy,komentarze" }} displays "5 komentarzy". It also can be used with i18n: (the following examples assume "spam,spams" is translated into Polish in language files as "mielonka,mielonek,mielonki") * If value is 1 and current language is English, {{ value|pluralize:_("spam,spams") }} displays "1 spam". * If value is 4 and current language is English, {{ value|pluralize:_("spam,spams") }} displays "4 spams". * If value is 5 and current language is English, {{ value|pluralize:_("spam,spams") }} displays "5 spams".* If value is 1 and current language is Polish, {{ value|pluralize:_("spam,spams") }} displays "1 mielonka". * If value is 4 and current language is Polish, {{ value|pluralize:_("spam,spams") }} displays "4 mielonki". * If value is 5 and current language is Polish, {{ value|pluralize:_("spam,spams") }} displays "5 mielonek".Installation and usagePlace the application folder somewhere on the PYTHONPATH Add the application to INSTALLED_APPS for your project Before you can start using it in your template you need to load it: {% load pluralize_pl %} [Less]
Created 3 months ago.

0 Users

Cheetah template engine for DjangoUsage Use the render_cheetah_response shortcut just as you would use render_to_response Use the CheetahTemplate class to render contexts in your views from text or ... [More] file News - Now released a version which is the stand alone module django_cheetahtemplates and contains the application of the example below. See the source svn repository for the most up to date code. ExamplePut this in your views from django_cheetahtemplates import render_cheetah_response,CheetahTemplate from django.template import Context from django.http import HttpResponse def hello(request): # Use shortcut return render_cheetah_response('hello.tmpl', {'myvar':'hello world','range':range} ) def hello2(request): # Create and render context context = Context({'myvar':'hello'}) context['range'] = range template = CheetahTemplate(filename='hello.tmpl') return HttpResponse(template.render(context))Then create hello.tmpl somewhere in your TEMPLATE_DIRS $myvar #for i in $range(10) $i#slurp #end forWhen you go to the url linked to either hello or hello2 you will see this hello world 0123456789Capabilities: Django context/template rendering compatibility with CheetahTemplate class. Shortcut replacement for render_to_response => render_cheetah_response TODO: Cheetah template path search (always defaults to your project directory when trying to include files) Fix: find your template from there with relative links? Transfer over filters to cheetah format Create URL shortcuts for generic cheetah template views (like 'direct_to_template' in urls.py) [Less]
Created about 1 year ago.