This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.contrib import admin | |
| from django import forms | |
| from django.utils.translation import ugettext_lazy as _ | |
| from cms.models import Page | |
| from cms.admin.forms import PageForm | |
| from cms.admin.pageadmin import PageAdmin | |
| class CustomPageForm(PageForm): | |
| page_title = forms.CharField(label=_("Title Tag"), widget=forms.TextInput(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from filer.utils.files import get_valid_filename | |
| def no_subfolders(instance, filename): | |
| return get_valid_filename(filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // backbone form editor (form field) | |
| Backbone.Form.editors.SingleFileUpload = Backbone.Form.editors.Base.extend ({ | |
| //tagName:"input", | |
| _self: false, | |
| uploader: false, | |
| template:false, | |
| template_id: "#singleFileUploadTemplate", | |
| additional_fields: [], | |
| events: { | |
| 'change': function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fabric.api import task, env, run, local, roles, cd, execute, hide, puts,\ | |
| sudo | |
| import posixpath | |
| import re | |
| env.forward_agent = True | |
| env.project_name = 'parkhotel' # var | |
| env.repository = 'git@bitbucket.org:benzkji/bnzk_{project_name}.git'.format(**env) | |
| env.local_branch = 'master' | |
| env.remote_ref = 'origin/master' |
NewerOlder