معرفی شرکت ها


django-wordpress-auth-lite-0.1.0


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

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

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

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

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

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

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

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

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

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

مشاهده بیشتر

توضیحات

Django integration with WordPress authentication and WITHOUT roles / capabilities system.
ویژگی مقدار
سیستم عامل -
نام فایل django-wordpress-auth-lite-0.1.0
نام django-wordpress-auth-lite
نسخه کتابخانه 0.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده UNKNOWN
ایمیل نویسنده UNKNOWN
آدرس صفحه اصلی https://github.com/ScilCoop/django-wordpress-auth-lite.git
آدرس اینترنتی https://pypi.org/project/django-wordpress-auth-lite/
مجوز UNKNOWN
===================== Django WordPress Auth ===================== Introduction ============ Allows for access in Django to a WordPress installation for checking for things like login status. Requirements ============ Python Dependencies: * `phpserialize`_ WordPress Dependencies: * `root Cookie`_ .. _`phpserialize`: http://pypi.python.org/pypi/phpserialize .. _`root Cookie`: http://wordpress.org/extend/plugins/root-cookie/ Alternatives to Root Cookie --------------------------- If you are receiving warnings using *root Cookie*, please see `this issue`_ for alternative solutions. .. _`this issue`: https://github.com/dellis23/django-wordpress-auth/issues/6 Installation ============ Add your WordPress's auth keys and salts (found in wp-config.php) to your settings.py. .. sourcecode:: python WORDPRESS_LOGGED_IN_KEY = "rs&^D%jPdu=vk|VVDsdfsdgsdgsdg9sd87f98s7h[Xm$3gT/@1xdasd" WORDPRESS_LOGGED_IN_SALT = "3]x^n{d8=su23902iu09jdc09asjd09asjd09jasdV-Lv-OydAQ%?~" Add your WordPress database to DATABASES in settings.py. .. sourcecode:: python DATABASES = { 'default': { ... # default django DB }, 'wordpress': { # must be named 'wordpress' 'ENGINE': 'django.db.backends.mysql', 'NAME': 'wordpress', 'USER': '...', 'PASSWORD': '...', 'HOST': '...', 'PORT': 3306, } } Add the middleware to MIDDLEWARE_CLASSES in settings.py. Make sure it's placed somewhere after the session middleware. .. sourcecode:: python MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', # ... 'wordpress_auth_lite.middleware.WordPressAuthMiddleware', ) Finally, add `wordpress_auth_lite` to INSTALLED_APPS. .. sourcecode:: python INSTALLED_APPS = ( # ... 'wordpress_auth_lite', ) Usage ===== To restrict a view to users that are authenticated with WordPress: ``wordpress_requires_role`` decorator. .. sourcecode:: python from wordpress_auth_lite.decorators import wordpress_login_required @wordpress_login_required def my_view(): pass Finally, the middleware provides access to the WordPress user via ``request.wordpress_user``. See ``models.py`` for full reference. Some of the redundant naming conventions in the WordPress database have been made simpler as well.


نحوه نصب


نصب پکیج whl django-wordpress-auth-lite-0.1.0:

    pip install django-wordpress-auth-lite-0.1.0.whl


نصب پکیج tar.gz django-wordpress-auth-lite-0.1.0:

    pip install django-wordpress-auth-lite-0.1.0.tar.gz