I need to handle a call to the root url for a site more elegantly than my
current.
At the moment I have:
#urls.py
(r'^$', 'myproj.myapp.views.root'),
#and
(r'^admin/', include(admin.site.urls)),
#views.py
def root(request):
"""Handle a call to the / (root) URL address"""
retu
Hi,
> However, when I alter the root() function to:
>
> def root(request):
> return render_to_response('admin/login.html', None)
>
> This causes a loop condition i.e. displays the page OK, but trying to login
> just redisplays the page... any ideas how to make this work as intended?
>
On Wed, Feb 2, 2011 at 5:24 AM, Derek wrote:
> I need to handle a call to the root url for a site more elegantly than my
> current.
>
> At the moment I have:
>
> #urls.py
> (r'^$', 'myproj.myapp.views.root'),
> #and
> (r'^admin/', include(admin.site.urls)),
>
> #views.py
> def root(re
Tracey
Thanks - that is a neat idea... but I only need it for that one page.
I want the rest of the (protected) admin pages to work as normal.
Derek
On Feb 2, 2:02 pm, Karen Tracey wrote:
> On Wed, Feb 2, 2011 at 5:24 AM, Derek wrote:
> > I need to handle a call to the root url for a site more
I am not sure I understand your reply. I don't want a @login_required
check for the root view - its just a simple HTML page for users to
login.
On Feb 2, 12:37 pm, Xavier Ordoquy wrote:
> Hi,
>
> > However, when I alter the root() function to:
>
> > def root(request):
> > return render_to_re
On Wed, Feb 2, 2011 at 2:12 PM, Derek wrote:
> Tracey
>
> Thanks - that is a neat idea... but I only need it for that one page.
> I want the rest of the (protected) admin pages to work as normal.
>
> Derek
>
You probably need to re-state your problem, as it is unclear what
result you want to happ
Tom
Restated thusly:
1. I want the "/" to display the login form (and not append 'admin/' to the
visible URL)
2. I want the login form (which I have coded) to work as normal
3. I want the rest of admin to work with the 'admin/' portion (prepended as
normal)
I am not sure how else to describe this
Hi Derek,
When people log in, what do you want to happen? Do you want them to
reach the admin interface or some other page?
-- Casey
On 02/02/2011 09:35 AM, Derek wrote:
Tom
Restated thusly:
1. I want the "/" to display the login form (and not append 'admin/' to
the visible URL)
2. I want
On Wed, Feb 2, 2011 at 2:35 PM, Derek wrote:
> Tom
> Restated thusly:
> 1. I want the "/" to display the login form (and not append 'admin/' to the
> visible URL)
> 2. I want the login form (which I have coded) to work as normal
> 3. I want the rest of admin to work with the 'admin/' portion (prep
Thanks Tom - I will try that and report back.
(Sidebar: usually when people report issues here, the first response is
"show me the code". I thought I would start with the code ... and the
response has been "tell me the requirements" ... so it goes, I guess!)
On 2 February 2011 16:51, Tom Evans
On Wed, Feb 2, 2011 at 3:08 PM, Derek wrote:
> Thanks Tom - I will try that and report back.
> (Sidebar: usually when people report issues here, the first response is
> "show me the code". I thought I would start with the code ... and the
> response has been "tell me the requirements" ... so it g
11 matches
Mail list logo