Roles not being discovered for command update rolls

Issue #1 resolved
Anonymous created an issue

== core settings.py == {{{

!python

INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.comments', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.flatpages', 'django.contrib.redirects', 'django.contrib.markup', 'django.contrib.webdesign', #fso apps 'libfso.contrib.shibboleth', 'libfso.contrib.locus', #'libfso.contrib.mdm', 'libfso.contrib.people',

#third party apps, modules, etc
'debug_toolbar',
'south',
'extauth',

] }}}

== project/settings.py == {{{

!python

INSTALLED_APPS = INSTALLED_APPS + ['project.barcode'] }}}

== project/urls.py == {{{

!python

from django.conf.urls.defaults import * from piston.resource import Resource

from libfso.contrib.locus.api import *

Uncomment the next two lines to enable the admin:

from django.contrib import admin admin.autodiscover()

from extauth import roles roles.autodiscover()

campuses = Resource(handler=CampusHandler) buildings = Resource(handler=BuildingHandler) rooms = Resource(handler=RoomHandler)

urlpatterns = patterns('', url(r'^accounts/login/$', 'libfso.contrib.shibboleth.views.login', name = "titan-login"), url(r'^accounts/logout/$', 'libfso.contrib.shibboleth.views.logout', name = "titan-logout"),

# Uncomment the admin/doc line below to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),

# campus, building, room api
(r'^api/locus/', include('libfso.contrib.locus.urls')),

(r'', include('project.barcode.urls'))

) }}}

== project/barcode/roles.py ==

{{{

!python

from extauth import roles from project.barcode.models import AssetScan

class AssetScanRoles(roles.RoleManager): pass

roles.register(AssetScan, AssetScanRoles) }}}

Comments (1)

  1. Log in to comment