Django-tequila.

Django ¿ë Tequila ÀÎÁõ ½Ã½ºÅÛ
Áö±Ý ´Ù¿î·Îµå

Django-tequila. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • LGPL v3
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Julien Delasoie
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://kis-doc.epfl.ch/

Django-tequila. ű×


Django-tequila. ¼³¸í

Django-tequila´Â Django.InstallationCheckoutÀÇ ÀÎÁõ ½Ã½ºÅÛÀ¸·Î Tequila¸¦ »ç¿ëÇÒ ¼öÀÖ´Â Django ¾ÛÀÔ´Ï´Ù. SVNÀÇ Ãâó´Â SVN co https://svn.epfl.ch/svn/django-tools/trunk/django- µ¥Å³¶ó´Â °« ¸¸µç µð·ºÅ丮·Î À̵¿ÇÏ¿© ½ÇÇàµË´Ï´Ù. Python Setup.py InstallConfurationYou´Â ./django-tequila/sample_appsettings.py- aspsettings.py- addÀÇ Django ¾Û ¿¹Á¦¸¦ ãÀ» ¼ö ÀÖ½À´Ï´Ù. middleware_classesÀÇ ³¡¿¡ : 'django_tequila.middleware.tquilamiddleware', - Ãß°¡ install_apps : 'django_tequila', - Authentication_Backends = ( 'django_tequila.django_backend.tquilabackend') - tequila ·Î±×ÀÎ ÆäÀÌÁö¿¡¼­ Àμâ ÇÒ À̸§À» ¼³Á¤ÇϽʽÿÀ. tequila_service_name = "django_tequila_service"$ - ¸¶Áö¸·À¸·Î, login_url = "/ login"login_redirect_url = "/"login_redirect_if_not_allowed = "/ not_allowed"logout_url = "/"urs.py-ÀÌ ÁÙÀ» Ãß°¡ÇϽʽÿÀ : django_tequila_urls urlpatterns + = django_tequila_urlpatternsprofile customizationyou·Î django_tequila_urlpatterns URLPATTERNS¿¡¼­ »ç¿ëÀÚ¿¡ ´ëÇÑ ¸î °¡Áö Ãß°¡ Á¤º¸¸¦ À¯ÁöÇÏ°í ½Í½À´Ï´Ù. ÇÁ·ÎÇÊ »ç¿ëÀÚ Á¤ÀÇ¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀºÀÌ ÆäÀÌÁö¸¦ »ìÆ캸½Ê½Ã¿À .- ÀÌ¿Í °°ÀÌ Models.py¿¡¼­ ÇÁ·ÎÇÊÀ» ¸¸µì´Ï´Ù. django.contrib.auth.models »ç¿ëÀÚ °¡Á® ¿À±â ¸ðµ¨ Ŭ·¡½º userProfile (models.model) : #Required ÇÊµå »ç¿ëÀÚ = models.foreignkey (»ç¿ëÀÚ, °íÀ¯ = true) sciper = models.positiveIntegerField (null = true, blank = true) where = models.charfield (max_length = 100, null = true, blank = true) ´ÜÀ§ = ¸ðµ¨ .charField (max_length = 300, null = true, blank = true) group = models.charfield (max_length = 150, null = true, blank = true) classe = models.charfield (max_length = 100, null = true, blank = true) ) statut = models.charfield (max_length = 100, null = true, blank = true) # Æ®¸®°Å user_post_save (sender, instance, ** kwargs)¿¡ ´ëÇÑ ÇÁ·ÎÆÄÀÏ ÀÛ¼ºÀ»À§ÇÑ Æ®¸®°Å : profile, new = userprofile.objects.get_or_create ( user = instance) # Æ®¸®°Å ¸ðµ¨À» µî·ÏÇÕ´Ï´Ù. isignals.post_save.connect (user_post_save, sender = user) - Django¿¡ ¸ðµ¨À» »ç¿ëÇϵµ·Ï Django¿¡ ¾Ë¸®½Ê½Ã¿À : auth_profile_module = "my_ap p.UserProfile "- µ¥ÀÌÅͺ£À̽º ¾÷µ¥ÀÌÆ® : ./manage.py SyncDBSITE admin »ç¿ëÀÚ ÁöÁ¤ °ü¸® »çÀÌÆ®¸¦ »ç¿ëÇÏ·Á¸é ¸ðµç ´Ü°è¸¦ ¼öÇàÇÏ¿© ÀÛ¾÷ Django °ü¸® »çÀÌÆ®°¡ ÀÖ´ÂÁö È®ÀÎÇÑ ´ÙÀ½ ´ÙÀ½ ´Ü°è¸¦ ¼öÇàÇϽʽÿÀ. - URLÀ» ¼öÁ¤ÇϽʽÿÀ. - URLÀ» ¼öÁ¤ÇϽʽÿÀ. - URLÀ» ¼öÁ¤ÇϽʽÿÀ. PY´Â ´ÙÀ½°ú °°½À´Ï´Ù. django_tequila.admin import tequilaadminsite admin.autodiscover () admin.site .__ class__ = tequilaAdminsite¿¡¼­ Django.contrib °¡Á® ¿À±â °ü¸®ÀÚ¿¡¼­ admin.autodminsite - »ç¿ëÀÚ À̸§Àº Å×ų¶ó¿¡¼­ ·Î±×ÀÎÇÏ´Â µ¥ »ç¿ëÇÏ´Â »ç¿ëÀÚ¿Í °°¾Æ¾ßÇÕ´Ï´Ù. ±× ¼ø°£¿¡ »ç¿ëÀÚ°¡ ¾Æ´Ï°Å³ª ÀϺθ¦ ÆíÁýÇÏ·Á´Â °æ¿ìÀÌ ¸í·ÉÀ» »ç¿ëÇÏ¿© ¼öÆÛ À¯Àú¸¦ ÀÛ¼ºÇϽʽÿÀ ( ¹× ¹Ù²Ù±â ¹× À̸ÞÀÏ·Î ¹Ù²Ù±â) : python manage.py createsuperuser --username = - mail = <À̸ÞÀÏ> Ãß°¡ ÆÁ ¹× ¼³Á¤À» Ãß°¡ ÆÁ - ´©±º°¡°¡ ¾Û¿¡ ¿¬°áÇÏ·Á°í ÇÒ ¶§ ºñÈ°¼º »ç¿ëÀÚ¸¦ ¸¸µé ¼ö ÀÖ½À´Ï´Ù. µû¶ó¼­ ´©°¡ ¾×¼¼½ºÇÏ´Â »ç¶÷À» ¼öµ¿À¸·Î Á¦¾î ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì Settings.py ¿¡ÀÌ ÇàÀ» Ãß°¡ÇϽʽÿÀ. tequila_new_user_inactive = true- Tequila¿Í ÇÔ²² »ç¿ëÀÚ Á¤ÀÇ Çã¿ëÀ» Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì Settings.py ¿¡ÀÌ ÇàÀ» Ãß°¡ÇϽʽÿÀ. tequila_config_allow = 'Categorie = Shibboleth'- Tequila¿Í ÇÔ²² »ç¿ëÀÚ Á¤ÀÇ ÆĶó¹é ¿ä¼Ò¸¦ Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ °æ¿ìÀÌ ÁÙÀ» ¼³Á¤ÇϽʽÿÀ. py.py : tequila_config_additional = { 'allowedorgs': 'EPFL, UNIL'} - »ç¿ëÀÚ ¿¬°áÀÌ Å×ų¶ó ÇÁ·Î¼¼½º¸¦ Ãß»ç ÇÒ ¶§¸¶´Ù 'Key'paramter°¡ÀÖ´Â URL·Î ¸®µð·º¼ÇµË´Ï´Ù. ...¿¡ ÀϺΠÀÇÁö ÀÌÀ¯·ÎÀÌ ¸Å°³ º¯¼ö¸¦ Á¦°Å ÇÒ ¼ö ÀÖÀ¸¹Ç·Î Settings.py ¿¡ÀÌ ÇàÀ» Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. TEQUILA_CLEAN_URL = true Ŭ¸®´× µÈ ÁÖ¼Ò¿¡ ¸®µð·º¼ÇÀ» ¸¸µé°í Ãß°¡ ÆäÀÌÁö È÷Æ®¸¦ Ãß°¡ÇÏ¸é ±âº»ÀûÀ¸·Î °ªÀº FALSELOGIN / LOGOUT LINKSIFÀÔ´Ï´Ù. »ç¿ëÀÚ°¡ ¼º°øÀûÀ¸·Î ±â·Ï / ·Î±× ¾Æ¿ô ÇÑ ÈÄ Æ¯Á¤ ÆäÀÌÁö·Î ¸®µð·º¼ÇµÇµµ·ÏÇÏ·Á¸é ±âº» Django ÀÎÁõ ¹é¿£µå¿Í °°ÀÌ ·Î±×ÀÎ URL¿¡ '´ÙÀ½'¸Å°³ º¯¼ö¸¦ Ãß°¡ÇؾßÇÕ´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ·Î±×ÀÎ redirect-URL¿¡ ´ëÇÑ Django µµ¿ò¸»À» ÂüÁ¶ÇϽʽÿÀ. ellp ¹× ContributingFeelÀº ³ª¿¡°Ô ¿¬¶ô ÇÒ ¼ö ÀÖ½À´Ï´Ù (Julien delasoie EPFL ch) Module.productÀÇ È¨ÆäÀÌÁö¿Í ÇÔ²² »ç¿ëÇÒ ¼öÀÖ´Â Áú¹®À̳ª ¿ì·Á »çÇ×


Django-tequila. °ü·Ã ¼ÒÇÁÆ®¿þ¾î