]> git.parisson.com Git - django-social-auth.git/commitdiff
Merge remote-tracking branch 'upstream/master'.
authorStas Kravets <krvss@mail.ru>
Tue, 16 Aug 2011 14:14:43 +0000 (18:14 +0400)
committerStas Kravets <krvss@mail.ru>
Tue, 16 Aug 2011 14:14:43 +0000 (18:14 +0400)
1  2 
example/app/views.py
example/settings.py
example/templates/done.html
example/templates/home.html
social_auth/backends/__init__.py

index 11d2b38a22f17b4d6e21585095181758b7082c61,c1046621bf3cfc564916f358bcf629832317b7fc..d44546d2e4a728114913fb3d90ddf1ce482f7e7c
@@@ -6,8 -6,8 +6,7 @@@ from django.template import RequestCont
  from django.shortcuts import render_to_response
  
  from social_auth import __version__ as version
- from social_auth.backends import BACKENDS, OpenIdAuth, BaseOAuth, BaseOAuth2
  
 -
  def home(request):
      """Home view, displays login mechanism"""
      if request.user.is_authenticated():
Simple merge
index a6e27c100bf80270f60723eaed0eaf6fa67f1f07,6b12fd974c265a8ce47a46ee255592d327f83910..04b7b949c2adb9547866be9827f5971aeeb1e96b
            <input type="submit" value="Login"/>
          </div>
        </form>
-     </li>
-     <li>
+       {% else %}
+         {% if name == "openid" %}
 +      <form action="{% url socialauth_associate_begin "yandex" %}" method="post">{% csrf_token %}
 +        <div>
 +          <label for="openid_ya_user">Yandex user
 +            {% if yandex %}(<span class="disconnect"><a href="{% url disconnect "yandex" %}">disconnect</a>)</span>{% endif %}
 +          </label>
 +          <input id="openid_ya_user" type="text" value="" name="openid_ya_user" />
 +          <input type="submit" value="Login"/>
 +        </div>
 +      </form>
 +    </li>
 +    <li>
-       <form action="{% url socialauth_associate_begin "openid" %}" method="post">{% csrf_token %}
-         <div>
-           <label for="openid_identifier">Other provider:</label>
-           <input id="openid_identifier" type="text" value="" name="openid_identifier" />
-           <input type="submit" />
-         </div>
-       </form>
+         <form action="{% url socialauth_associate_begin "openid" %}" method="post">{% csrf_token %}
+           <div>
+             <label for="openid_identifier">Other provider</label>
+             <input id="openid_identifier" type="text" value="" name="openid_identifier" />
+             <input type="submit" value="Login" />
+           </div>
+           <p class="helptext">Like your personal <a href="https://www.myopenid.com/" title="My OpenId">myopenid</a></p>
+         </form>
+         {% endif %}
+       {% endif %}
+     {% endif %}
      </li>
+   {% endfor %}
    </ul>
  </div>
  
index 5d3717e94596a95680f5ca52b43a04f4ce0019bc,1a39af4d174451fd76c850026717ee91e2afcbc9..c1abd7a3a09944431b782691a9e47021f59c8eca
            <input type="submit" value="Login"/>
          </div>
        </form>
+       {% else %}
+         {% if name == "openid" %}
+         <form action="{% url socialauth_begin "openid" %}" method="post">{% csrf_token %}
+           <div>
+             <label for="openid_identifier">Other provider</label>
+             <input id="openid_identifier" type="text" value="" name="openid_identifier" />
+             <input type="submit" value="Login" />
+           </div>
+           <p class="helptext">Like your personal <a href="https://www.myopenid.com/" title="My OpenId">myopenid</a></p>
+         </form>
+         {% endif %}
+       {% endif %}
+     {% endif %}
      </li>
-     <li>
-       <form action="{% url socialauth_begin "yandex" %}" method="post">{% csrf_token %}
-         <div>
-           <label for="openid_ya_user">Yandex user(optional):</label>
-           <input id="openid_ya_user" type="text" value="" name="openid_ya_user" />
-           <input type="submit" value="Login"/>
-         </div>
-       </form>
-     </li>
-       <li><a rel="nofollow" href="{% url socialauth_begin "socialauth_begin" %}">Yandex OpenID 2.0</a></li>
-     <li>
-     <form action="{% url socialauth_begin "openid" %}" method="post">{% csrf_token %}
-         <div>
-           <label for="openid_identifier">Other provider</label>
-           <input id="openid_identifier" type="text" value="" name="openid_identifier" />
-           <input type="submit" value="Login" />
-         </div>
-         <p class="helptext">Like your personal <a href="https://www.myopenid.com/" title="My OpenId">myopenid</a></p>
-       </form>
-     </li>
+   {% endfor %}
    </ul>
  </div>
 +
 +<div>
 +  <h3>Login using other authentication systems:</h3>
 +      <ul>
 +              <li><a rel="nofollow" href="{% url socialauth_begin "vkontakte" %}">VKontakte OpenAPI</a></li>
 +      </ul>
 +</div>
  {% endblock %}
Simple merge