Code Monkey home page Code Monkey logo

django-suit-examples's People

Contributors

darklow avatar jonashaag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-suit-examples's Issues

Add example for editable list-based widget styling

I'd like to see an example for styling of widget that appears as an editable item in a list (as part of http://django-suit.readthedocs.io/en/develop/list_attributes.html#list-cell-attributes).

I have tried this:

    def suit_cell_attributes(self, obj, column):
        if column == '_duration_days':
            return {'class': 'text-center'}
        if column == 'planned_month':
            return {'widget': TextInput(attrs={'class': 'text-center input-mini'})}

(with planned_month appearing in the list_editable list, of course).

The result does not seem to indicate any styling change for planned_month (but duration_days works).

list_example

Assets missing.

The website says non-commercial version can be obtained from github, but there seems that the assets (css, js) are missing from this repo.

djangos-select2 showing wrong form

I'm following the admin.py example and can't seem to get select2 working with django-suit. Considering the following admin.py config any ideas on what I am missing? This is for a tags module I'm putting together to add searchability based on tagged content to a model called accounts. Would be useful in a bunch of other areas on my app but this is the quickest to work on currently. Screenshot of my accounts form...showing the legacy select method.

admin.py
from django.contrib import admin
from accounts.models import *
from inventory.models import *
from services.models import *
from tags.models import *
from import_export.admin import ImportExportModelAdmin
from import_export import resources
from django_select2 import *
from django.forms import TextInput, ModelForm, Textarea, Select

TAGS

class TagChoices(AutoModelSelect2Field):
queryset = tag.objects
search_fields = ['tag', ]

class TagsForm(ModelForm):
tag_verbose_name = tag._meta.verbose_name
country = TagChoices(
widget=AutoHeavySelect2Widget(
select2_options={
'width': '220px',
'placeholder': 'Lookup %s ...' % tag_verbose_name
}
)
)

ACCOUNT

class AccountsGeneral(admin.TabularInline):
model = account
suit_classes = 'suit-tab suit-tab-general'

class AccountsServices(admin.StackedInline):
model = service
suit_classes = 'suit-tab suit-tab-services'
extra = 0
can_delete = False

class AccountsNotes(admin.TabularInline):
model = note
suit_classes = 'suit-tab suit-tab-general'
extra = 0
can_delete = False

class AccountsAdmin(admin.ModelAdmin):
form = TagsForm
list_display = ('id', 'name', 'type', 'phone', 'address1', 'address2', 'city', 'state', 'zip', 'status')
list_display_links = ('id', 'name', 'type', 'phone', 'address1', 'address2', 'city', 'state', 'zip', 'status')
list_filter = ('type', 'city', 'state', 'status')
search_fields = ['id', 'name', 'phone', 'address1']
inlines = (AccountsServices, AccountsNotes,)
fieldsets = [
(None, {
'classes': ('suit-tab suit-tab-general',),
'fields': ['name', 'phone', 'type', 'status', 'tags',]
}),

('Billing Address:', {
'classes': ('suit-tab suit-tab-general',),
'fields': ['address1', 'address2', 'city', 'state', 'zip', 'url',]
}),
('Billing Info:', {
'classes': ('suit-tab suit-tab-general',),
'fields': ['parent_flag', 'parent_account','billid',]
}),
(None, {
'classes': ('suit-tab suit-tab-inventory',),
'fields': []
}),

(None, {
'classes': ('suit-tab suit-tab-services',),
'fields': []
}),

]
suit_form_tabs = (('general', 'General'), ('network', 'Network'), ('services', 'Services'),)

c7829f38-3bbc-11e4-8188-8327d216b67c

Impossible integration of django-filer==1.1.1

Impossible integration of django-filer==1.1.1 only display in menu a option of Filer > Folders and when click modify folder says:
TemplateSyntaxError at /admin/filer/folder/
'filermedia' is not a valid tag library: Template library filermedia not found, tried django.templatetags.filermedia,suit.templatetags.filermedia,django.contrib.admin.templatetags.filermedia,django.contrib.staticfiles.templatetags.filermedia,django_assets.templatetags.filermedia,django_activeurl.templatetags.filermedia,main.templatetags.filermedia,import_export.templatetags.filermedia,cookielaw.templatetags.filermedia,easy_thumbnails.templatetags.filermedia,filer.templatetags.filermedia,mptt.templatetags.filermedia

Python 2.7.6
Django==1.6.2
Pillow==2.3.0
django-filer==1.1.1
django_mptt==0.7
django-polymorphic==0.8.1
easy-thumbnails==2.3

http://django-filer.readthedocs.org/en/latest/index.html

Custom View

Hey, nice examples but can you add the custom views templates and how to make this, thanks for all πŸ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.