0

I am a newbie in Django. Basically what I am looking for is - I want users to click on a link and login into the admin site. Can the parameters be passed in the URL itself ? Please help.

1
  • 1
    What you trying to do is insecure. You should avoid logging users this way. Anyway, here is reversing admin urls Commented Mar 8, 2013 at 13:39

2 Answers 2

1

You can write your own view on your website that will:

Sign up to request clarification or add additional context in comments.

1 Comment

Clearly the way to go! Thank you okm / Patrice.
0

Register Your admin panel with django . https://docs.djangoproject.com/en/1.3/intro/tutorial02/#activate-the-admin-site

Change your urls.py like

from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'mysite.views.home', name='home'), # url(r'^mysite/', include('mysite.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), ) 

Give the href as <a href = "www.yoursitename.com/admin/">Click</a>

You are done

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.