Exemplo n.º 1
0
###################################################################################

from django.conf.urls import include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

from inventory.views import post
from inventory.machine import machineviews
from django.contrib.admin import site
import adminactions.actions as actions

# register all adminactions
site.add_action(actions.mass_update)
site.add_action(actions.export_as_csv)

urlpatterns = [ 
    url(r'^machine/(?P<machine_id>\d+)/$', machineviews),
    url(r'^grappelli/', include('grappelli.urls')),
    #url(r'^admin/', include(admin.site.urls)),
    url(r'^post/', post),
    url(r'^adminactions/', include('adminactions.urls')),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^', include(admin.site.urls)),
]
# Use lines below only during development if you want django 
# to server static files

#urlpatterns += staticfiles_urlpatterns()
Exemplo n.º 2
0
from django.conf.urls import patterns, url, include, handler500
from django.contrib import admin
import django.contrib.auth.models
from django.contrib.admin import site
import adminactions.actions as actions

if not django.contrib.auth.models.User in site._registry:
    site.register(django.contrib.auth.models.User)

site.add_action(actions.mass_update)
site.add_action(actions.graph_queryset)
site.add_action(actions.export_as_csv)
site.add_action(actions.export_as_fixture)

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
)

Exemplo n.º 3
0
from admin_adv_search_builder.filters import AdvancedSearchBuilder
from adminsortable2.admin import SortableAdminMixin

#from ajax_select import make_ajax_form

#from massadmin import mass_change_selected




admin.site.site_header="SMART-ID"

#site.add_action(mass_change_selected)


site.add_action(actions.graph_queryset)
#site.add_action(actions.export_as_xls)

class AreaAdmin(admin.ModelAdmin):
    actions=None

    


admin.site.register(Area, AreaAdmin)


class EmpleadoAdmin (ImportExportModelAdmin, admin.ModelAdmin):

    search_fields = ("Id_Empleado", "nombre_Emp", 
                     "ApellidoP_Emp", "ApellidoM_Emp", "puesto", "correo_Emp")
Exemplo n.º 4
0
###################################################################################

from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

from inventory.views import post
from inventory.machine import machineviews
from django.contrib.admin import site
import adminactions.actions as actions

# register all adminactions
site.add_action(actions.mass_update)
site.add_action(actions.export_as_csv)

urlpatterns = patterns('',
    url(r'^/machine/(?P<machine_id>\d+)/$', machineviews),
    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^post/', post),
    url(r'^adminactions/', include('adminactions.urls')),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^$', include(admin.site.urls)),
    )
# Use lines below only during development if you want django 
# to server static files

#urlpatterns += staticfiles_urlpatterns()
Exemplo n.º 5
0
# pylint: disable=C0111,E0602,F0401,R0904,E1002

from django.contrib import admin
from django.forms.widgets import Textarea, TextInput
from django.db import models
from django.contrib.admin import site
from django.db.models import Q
from django.contrib.admin import SimpleListFilter

import adminactions.actions as actions

from podiobooks.core.models import Award, Category, Contributor, ContributorType, Episode, License, Media, Series, \
    Title, TitleCategory, TitleContributor

site.add_action(actions.export_as_csv)


# ## Custom Filters
class HasCoverListFilter(SimpleListFilter):
    """ Custom filter to find titles that don't have a cover image """
    title = "Has Cover"
    parameter_name = 'has_cover'

    def lookups(self, request, model_admin):
        return ('y', 'Yes'), ('n', 'No')

    def queryset(self, request, queryset):
        if self.value() == 'y':
            return queryset.filter(~Q(cover=""), cover__isnull=False)
        if self.value() == 'n':
Exemplo n.º 6
0
# pylint: disable=C0111,E0602,F0401,R0904,E1002

from django.contrib import admin
from django.forms.widgets import Textarea, TextInput
from django.db import models
from django.contrib.admin import site
from django.db.models import Q
from django.contrib.admin import SimpleListFilter

import adminactions.actions as actions

from podiobooks.core.models import Award, Category, Contributor, ContributorType, Episode, License, Media, Series, \
    Title, TitleCategory, TitleContributor


site.add_action(actions.export_as_csv)


# ## Custom Filters
class HasCoverListFilter(SimpleListFilter):
    """ Custom filter to find titles that don't have a cover image """
    title = "Has Cover"
    parameter_name = 'has_cover'

    def lookups(self, request, model_admin):
        return ('y', 'Yes'), ('n', 'No')

    def queryset(self, request, queryset):
        if self.value() == 'y':
            return queryset.filter(~Q(cover=""), cover__isnull=False)
        if self.value() == 'n':