mirror of
https://github.com/kennethreitz-archive/chishop.git
synced 2026-06-21 16:00:58 +00:00
91631a0837
roles.
13 lines
253 B
Python
13 lines
253 B
Python
from djangopypi import conf
|
|
|
|
|
|
def current_role(request=None):
|
|
role = conf.DEFAULT_ROLE
|
|
if request:
|
|
role = getattr(request, "pypi_role", None) or role
|
|
return role
|
|
|
|
|
|
def get_mro(role):
|
|
return tuple([role] + list(conf.ROLES[role]))
|