Issue #1 resolved

Roles not being discovered for command update rolls

Anonymous avatarAnonymous created an issue

core settings.py

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

INSTALLED_APPS = INSTALLED_APPS + ['project.barcode']

project/urls.py

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

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

class AssetScanRoles(roles.RoleManager):
    pass

roles.register(AssetScan, AssetScanRoles)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.