Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > Django Plugins

    django-vkontakte-iframe 0.4

    Download button

    No screenshots available
    Downloads: 341  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mikhail Korobov | More programs
    MIT/X Consortium Lic... / FREE
    November 29th, 2011, 20:53 GMT [view history]
    ROOT / Internet / Django Plugins

     Read user reviews (0)  Refer to a friend  Subscribe

    django-vkontakte-iframe description

    Django app for developing vk.com (aka vkontakte.ru) iframe applications

    django-vkontakte-iframe is a Django app for developing vk.com (aka vkontakte.ru largest, Russian social network) iframe applications.

    Handles user authentication and registration.

    Installation

    pip install django-vkontakte-iframe

    Optional:

     * vkontakte >= 0.9.4.1 for populating cities and countries info via admin action
     * django-webtest >= 1.2.2 for tests

    Usage

     1. Register and configure vkontakte iframe application here: http://vkontakte.ru/apps.php?act=add
     2. Add your app's settings to settings.py:

     VK_APP_ID = '1234567' # Application ID
     VK_APP_KEY = 'M1gytuHwni' # Application key
     VK_APP_SECRET = 'MiRFwrDYwcYFCTD18EcY' # Secure key


     3. Add 'vk_iframe' to INSTALLED_APPS
     4. Add 'vk_iframe.backends.VkontakteUserBackend' to AUTHENTICATION_BACKENDS:

     AUTHENTICATION_BACKENDS = (
     'django.contrib.auth.backends.ModelBackend',
     'vk_iframe.backends.VkontakteUserBackend',
     )


     5. Put 'vk_iframe.middleware.AuthenticationMiddleware' and 'vk_iframe.middleware.LoginRequiredMiddleware' to the end of MIDDLEWARE_CLASSES:

     MIDDLEWARE_CLASSES = [
     # ...
     'vk_iframe.middleware.AuthenticationMiddleware',
     'vk_iframe.middleware.LoginRequiredMiddleware',
     ]


     Vkontakte visitors will be automatically registered and authorized as django users (username == vkontakte user id).

     LoginRequiredMiddleware is an optional. It returns 403 for all unauthorized requests with urls not listed in settings.PUBLIC_URLS. You should enable it for security reasons. Example of PUBLIC_URLS:

     PUBLIC_URLS = [
     '^admin/$',
     '^my-callback/',
     ]


     6. Run python ./manage.py syncdb (or python ./manage.py migrate vk_iframe if South is used)
     7. Optional: load initial geo data (cities and countries):

     python manage loaddata vk-geo

     8. If you want to store more user data then put the following line as the 'First API request' ('Первый ·апрос к API') option (in your app edit page at vkontakte.ru):

     method=getProfiles&uids={viewer_id}&format=json&v=3.0&fields=uid,first_name,last_name,nickname,domain,sex,bdate,city,country,
    timezone,photo,photo_medium,photo_big,has_mobile,rate,contacts,education


     9. That's all. All your app's visitors are now registered and authenticated django users. Additional profile data is available as user.vk_profile.

    Product's homepage

    Requirements:

    · Python
    · Django
    · django-annoying

    What's New in This Release: [ read full changelog ]

    · request.vk_api with vkontakte.API instance (thanks Anton Smirnov);
    · Workaround for AttributeError in forms.py (thanks Evgeniy Kirov);
    · Improved Safari cookie fix (thanks Domantas Jackūnas);
    · IFrameFixMiddleware works now if user agent is not set (thanks Evgeniy Kirov).

      


    TAGS:

    vkontakte.ru iframe | iframe application | vkontakte.ru | iframe | Django

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM