معرفی شرکت ها


django-userswitch-0.2.2


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A quick 'n' dirty Django app for switching between different users while testing
ویژگی مقدار
سیستم عامل -
نام فایل django-userswitch-0.2.2
نام django-userswitch
نسخه کتابخانه 0.2.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Owais Lone
ایمیل نویسنده owais.lone@ikraftsoft.com
آدرس صفحه اصلی https://github.com/ikraftsoft/django-userswitch
آدرس اینترنتی https://pypi.org/project/django-userswitch/
مجوز New BSD License
================= Django UserSwitch ================= A quick 'n' dirty django app for switching between different users while testing. * "Quick and dirty". Just include the middleware. That's it! * Provides a select box with a list of users. * User list can be defined in ``settings`` or all users are loaded. * Works only when ``settings.DEBUG`` is ``True`` ------------ Requirements ------------ Django 1.2 ------------ Installation ------------ To install the latest version:: pip install git+git://github.com/ikraftsoft/django-userswitch#egg=django-userswitch It can also be installed from PyPI with ``pip`` or ``easy_install``:: pip install django-userswitch easy_install install django-userswitch ------------- Setup & Usage ------------- Add ``userswitch`` middleware to the ``MIDDLEWARE_CLASSES`` in settings.py after the default middlewares:: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ... 'userswitch.middleware.UserSwitchMiddleware', ) Optionally you can add ``USERSWITCH_OPTIONS`` dict to the settings.py:: USERSWITCH_OPTIONS = { 'css_class': '', # CSS class to be added to the switcher widget. Default='userswitch'. 'css_inline': '', # Inline css for the switcher widget, if any 'content_types': (), # a tuple of content-type for which to render switcher widget. Default = ('text/html', 'application/xhtml+xml') 'auth_backend': '', # Custom auth backend if any. Default = 'django.contrib.auth.backends.ModelBackend' 'replace_text': '', # Text to replace with the widget, default add to end "body" tag. 'users': (), # List of usernames(as strings) to be shown in the switcher widget. If its empty, all users are loaded. 'force_on': False, # Turns on USERSWITCH even if DEBUG = False } Note: default value of ``css_inline`` option provides some basic absolute positioning. To change those either specify ``css_inline`` option manually or override ``position``, ``top``, ``right`` in the class specified in ``css_class`` with ``!important``. That's All!


نحوه نصب


نصب پکیج whl django-userswitch-0.2.2:

    pip install django-userswitch-0.2.2.whl


نصب پکیج tar.gz django-userswitch-0.2.2:

    pip install django-userswitch-0.2.2.tar.gz