Re: Django Admin Login

2021-11-09 Thread Aashish Kumar
Just make the path blank of admin.site.url in main urls.py file

On Tue, 9 Nov 2021 at 11:38 PM, webmbackslash 
wrote:

> Habdle it in urls.py file.
> But are you sure you want all your site viewed in admin mode?
>
> Il mar 9 nov 2021, 15:21 Abhi Sharma  ha scritto:
>
>> Hello,
>> We have a Django admin URL like https://abc.com/admin/, it's working
>> fine however we want to proxy with a domain for admin url like
>> https://abc.com/
>>
>> We want to remove */admin* from the URL.
>>
>>
>> Regards,
>> Abhishek
>>
> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/39bd9eb7-5002-4cc1-afd0-02eaa216da10n%40googlegroups.com
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANPmrzPGzuScdg_yLEr-Z3QcZW7gKJoRQx_ehvNp9fC47UuBYg%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACTAcrwQfc8a6Oyt_%3DbKUyh22%3DqPGPOSdjys2tHtgD%3D4T0EbFw%40mail.gmail.com.


Re: Django Admin Login

2021-11-09 Thread webmbackslash
Habdle it in urls.py file.
But are you sure you want all your site viewed in admin mode?

Il mar 9 nov 2021, 15:21 Abhi Sharma  ha scritto:

> Hello,
> We have a Django admin URL like https://abc.com/admin/, it's working fine
> however we want to proxy with a domain for admin url like https://abc.com/
>
> We want to remove */admin* from the URL.
>
>
> Regards,
> Abhishek
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/39bd9eb7-5002-4cc1-afd0-02eaa216da10n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANPmrzPGzuScdg_yLEr-Z3QcZW7gKJoRQx_ehvNp9fC47UuBYg%40mail.gmail.com.


Django Admin Login

2021-11-09 Thread Abhi Sharma
Hello,
We have a Django admin URL like https://abc.com/admin/, it's working fine 
however we want to proxy with a domain for admin url like https://abc.com/

We want to remove */admin* from the URL.


Regards,
Abhishek

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39bd9eb7-5002-4cc1-afd0-02eaa216da10n%40googlegroups.com.


Re: Django Admin Login will not Redirect following Authentication on Remote Host

2019-07-12 Thread Sidnei Pereira
Hahahaha I'm glad it helped! I will probably add this answer to your 
stackoverflow question. Maybe it will help someone else.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c8ba5cd8-5404-438a-93e3-6f928f408bf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Login - Redirecting back to login page

2014-06-24 Thread Aaron Reabow
also try: LOGIN_REDIRECT_URL

On Tuesday, 24 June 2014 16:55:21 UTC+2, Sergiy Khohlov wrote:
>
> Hello,
>
>  Could you please paste your LOGIN_URL  from your settings.py 
>
>
>
> Many thanks,
>
> Serge
>
>
> +380 636150445
> skype: skhohlov
>
>
> On Tue, Jun 24, 2014 at 5:40 PM, Діма Ревуцький  > wrote:
>
>> I had same problem 
>> In settings remove SESSION_COOKIE_DOMAIN or set correct domain
>>
>> понедельник, 6 июня 2011 г., 13:57:11 UTC+3 пользователь Aidan написал:
>>>
>>> I'm having trouble with the Django Admin. My login page appears ok at 
>>> http://127.0.0.1:8000/admin but when I try to login with a valid 
>>> username or password the page seems to refresh - it reappears with 
>>> text boxes empty. It doesn't display any errors on the page (logging 
>>> in with invalid username / password brings up all the red errors you'd 
>>> expect). 
>>>
>>> I'm not sure what's going on here. The console gives me the following: 
>>>
>>> (cache) C:\PythonProjects\CacheProject\cache>python manage.py 
>>> runserver 
>>> Validating models... 
>>>
>>> 0 errors found 
>>> Django version 1.3, using settings 'cache.settings' 
>>> Development server is running at http://127.0.0.1:8000/ 
>>> Quit the server with CTRL-BREAK. 
>>> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053 
>>> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0 
>>> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053 
>>>
>>> settings.py - 
>>> # 
>>> INSTALLED_APPS = ( 
>>> 'django.contrib.auth', 
>>> 'django.contrib.contenttypes', 
>>> 'django.contrib.sessions', 
>>> 'django.contrib.sites', 
>>> 'django.contrib.messages', 
>>> 'django.contrib.admin', 
>>> ) 
>>> # 
>>>
>>> urls.py - 
>>>
>>> from django.conf.urls.defaults import patterns, include, url 
>>>
>>> from django.contrib import admin 
>>> admin.autodiscover() 
>>>
>>> urlpatterns = patterns('', 
>>> (r'^admin/', include(admin.site.urls)), 
>>> ) 
>>>
>>> Any ideas?
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/739282ff-e00d-46ca-99dc-8bebdff27f6f%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0f12f7a9-f1d4-4faf-b29b-b322f68f006d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Login - Redirecting back to login page

2014-06-24 Thread Sergiy Khohlov
Hello,

 Could you please paste your LOGIN_URL  from your settings.py



Many thanks,

Serge


+380 636150445
skype: skhohlov


On Tue, Jun 24, 2014 at 5:40 PM, Діма Ревуцький  wrote:

> I had same problem
> In settings remove SESSION_COOKIE_DOMAIN or set correct domain
>
> понедельник, 6 июня 2011 г., 13:57:11 UTC+3 пользователь Aidan написал:
>>
>> I'm having trouble with the Django Admin. My login page appears ok at
>> http://127.0.0.1:8000/admin but when I try to login with a valid
>> username or password the page seems to refresh - it reappears with
>> text boxes empty. It doesn't display any errors on the page (logging
>> in with invalid username / password brings up all the red errors you'd
>> expect).
>>
>> I'm not sure what's going on here. The console gives me the following:
>>
>> (cache) C:\PythonProjects\CacheProject\cache>python manage.py
>> runserver
>> Validating models...
>>
>> 0 errors found
>> Django version 1.3, using settings 'cache.settings'
>> Development server is running at http://127.0.0.1:8000/
>> Quit the server with CTRL-BREAK.
>> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053
>> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0
>> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053
>>
>> settings.py -
>> #
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.sites',
>> 'django.contrib.messages',
>> 'django.contrib.admin',
>> )
>> #
>>
>> urls.py -
>>
>> from django.conf.urls.defaults import patterns, include, url
>>
>> from django.contrib import admin
>> admin.autodiscover()
>>
>> urlpatterns = patterns('',
>> (r'^admin/', include(admin.site.urls)),
>> )
>>
>> Any ideas?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/739282ff-e00d-46ca-99dc-8bebdff27f6f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJPKeEi_bZRMe_YTPbigu8VNXH%2BDxGF3bVyZdk9piPjk5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Login - Redirecting back to login page

2014-06-24 Thread Діма Ревуцький
I had same problem 
In settings remove SESSION_COOKIE_DOMAIN or set correct domain

понедельник, 6 июня 2011 г., 13:57:11 UTC+3 пользователь Aidan написал:
>
> I'm having trouble with the Django Admin. My login page appears ok at 
> http://127.0.0.1:8000/admin but when I try to login with a valid 
> username or password the page seems to refresh - it reappears with 
> text boxes empty. It doesn't display any errors on the page (logging 
> in with invalid username / password brings up all the red errors you'd 
> expect). 
>
> I'm not sure what's going on here. The console gives me the following: 
>
> (cache) C:\PythonProjects\CacheProject\cache>python manage.py 
> runserver 
> Validating models... 
>
> 0 errors found 
> Django version 1.3, using settings 'cache.settings' 
> Development server is running at http://127.0.0.1:8000/ 
> Quit the server with CTRL-BREAK. 
> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053 
> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0 
> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053 
>
> settings.py - 
> # 
> INSTALLED_APPS = ( 
> 'django.contrib.auth', 
> 'django.contrib.contenttypes', 
> 'django.contrib.sessions', 
> 'django.contrib.sites', 
> 'django.contrib.messages', 
> 'django.contrib.admin', 
> ) 
> # 
>
> urls.py - 
>
> from django.conf.urls.defaults import patterns, include, url 
>
> from django.contrib import admin 
> admin.autodiscover() 
>
> urlpatterns = patterns('', 
> (r'^admin/', include(admin.site.urls)), 
> ) 
>
> Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/739282ff-e00d-46ca-99dc-8bebdff27f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread 7equivalents
Thank you so much! You really helped me. I went back and checked the source 
code sent to my browser and did indeed see, name = "this_is_the_login_form'.
I was using the "ID" rather than the "name". My weakness in html kicked me 
this time, thanks for lending a hand!






>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread Kelvin Wong
I've used Requests in the past.

All I did was load the page in Chrome and then I looked at what was being 
sent and compared it to what your script was sending. When I added the 
missing key it worked.

Trial and error. :)

K



On Wednesday, August 21, 2013 8:48:16 AM UTC-7, 7equiv...@gmail.com wrote:
>
> How did you know that that was the name of the form? When I went to 
> django.contrib.auth.forms, it seemed the form name was AuthenticationForm, 
> and when I used view source in a browser it looked like the form was named 
> login-form. How could one know the form was named 'this_is_the_login_form'?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread 7equivalents
Thankyou Wongo Bongo! Your solution was spot on correct. It came down to 
one line of code that I modified that was the problem.

login_data = {'username':'jim', 'password':'beam', 
'this_is_the_login_form':'1', 'csrfmiddlewaretoken':csrftoken}

You gave me the correct line, however the, 'this_is_the_login_form':'1' I 
thought you were giving me a generic form name to be replaced with my form 
name, however 'this_is_the_login_form' is the correct form name.

This is where my inexperince has shown through. How did you know that that 
was the name of the form? When I went to django.contrib.auth.forms, it 
seemed the form name was AuthenticationForm, and when I used view source in 
a browser it looked like the form was named login-form. How could one know 
the form was named 'this_is_the_login_form'?



On Monday, August 19, 2013 12:13:21 AM UTC-4, WongoBongo wrote:
>
> You were missing a key. The following works on my machine.
>
> K
>
> ---
>
>
> import requests
> login_url = "http://192.168.0.21/admin/login/;
>
>
> client = requests.session()
> client.get(login_url)
>
>
> csrftoken = client.cookies['csrftoken']
>
>
> login_data = {'username':'jim', 'password':'beam', 
> 'this_is_the_login_form':'1', 'csrfmiddlewaretoken':csrftoken}
>
>
> r = client.post(login_url, data=login_data)
>
>
> target_url = "http://192.168.0.21/admin/auth/user/;
> t = client.get(target_url)
>
>
> 'Select user to change' in t.text # True 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread 7equivalents
Still trying to solve this. I cant seem to find anything by googling.

I did read this. 
https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.login

However, when I'm doing this from the shell, I'm not sure what to use as 
request in the Login(request,user) function.

Also when I look at the contrib.auth forms. it appears the form is name 
AuthenticationForm. But when I open the actual admin login page with my 
browser and view source it appears to be called login-form.

I would thing trying to login as a user from the shell would be a common 
occurrence, but I cant figure out how.




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-20 Thread 7equivalents
I feel as if I'm getting closer, yet haven't successfully  logged in yet. I 
have added in the missing key. I went to the django.contrib.auth.forms to 
find the name of the form that gets submitted in the login page. It seems 
to be called AuthenticationForm.

import requests
login_url = "http://192.168.0.21/admin/login/;


client = requests.session()
client.get(login_url)


csrftoken = client.cookies['csrftoken']


login_data = {'username':'jim', 'password':'beam', 
'AuthenticationForm':'1', 'csrfmiddlewaretoken':csrftoken}


r = client.post(login_url, data=login_data)


Basically after I do this from the python shell, I use another machine to 
log into the admin page and look at user logins, and the user is not logged 
in. Not sure how to proceed.


On Monday, August 19, 2013 12:13:21 AM UTC-4, WongoBongo wrote:
>
> You were missing a key. The following works on my machine.
>
> K
>
> ---
>
>
> import requests
> login_url = "http://192.168.0.21/admin/login/;
>
>
> client = requests.session()
> client.get(login_url)
>
>
> csrftoken = client.cookies['csrftoken']
>
>
> login_data = {'username':'jim', 'password':'beam', 
> 'this_is_the_login_form':'1', 'csrfmiddlewaretoken':csrftoken}
>
>
> r = client.post(login_url, data=login_data)
>
>
> target_url = "http://192.168.0.21/admin/auth/user/;
> t = client.get(target_url)
>
>
> 'Select user to change' in t.text # True 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread Kelvin Wong
You were missing a key. The following works on my machine.

K

---


import requests
login_url = "http://192.168.0.21/admin/login/;


client = requests.session()
client.get(login_url)


csrftoken = client.cookies['csrftoken']


login_data = {'username':'jim', 'password':'beam', 
'this_is_the_login_form':'1', 'csrfmiddlewaretoken':csrftoken}


r = client.post(login_url, data=login_data)


target_url = "http://192.168.0.21/admin/auth/user/;
t = client.get(target_url)


'Select user to change' in t.text # True 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread 7equivalents
Ok, I've gotten further. I have confirmed the problem was related to the 
csrf token. This is my new code:


client = requests.session()
# Retrieve the CSRF token first
client.get(URL)  # sets the cookie
csrftoken = client.cookies['csrftoken']

login_data = dict(Username='jim', Password='beam, csrfmiddlewaretoken=csrftoken)
r = client.post(URL, data=login_data)

Now, I get a 200 for the status code, but it still doesn't actually 
login..

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread 7equivalents
Ok, I've gotten further. I have confirmed the problem was related to the 
csrf token. This is my new code:


client = requests.session()
# Retrieve the CSRF token first
client.get(URL)  # sets the cookie
csrftoken = client.cookies['csrftoken']

login_data = dict(Username='jim', Password='beam, csrfmiddlewaretoken=csrftoken)
r = client.post(URL, data=login_data)

Now, I get a 200 for the status code, but it still doesn't actually 
login..



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread 7equivalents
Well this is where I'm at. I have used the requests package  to try and 
request the Django Admin login page and submit the username and password. 
However, when I do this I get a 403 error. I have tried to turn off the 
dependency for csrf tokens in the login view by using the csrf_exempt,but 
this gave me a 500 error. So I need to break this down to learn whats going 
on. So here is the code I'm typing into the python prompt:

import rquests

url = "http://192.168.0.21/admin/login/;
payload = {'Username':'jimmy', 'Password':'Beam'}
r = requests.post(url, payload)


I get a 403.

My questions are:
(1) Is the the code above the correct way to fill in and submit the django user 
login form?
(2) What should I do next to troubleshoot the problem?


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-14 Thread Elena Williams
Have you explored the packages "selenium" or "sikuli" these are both great
fun for front-end testing.

You could intercept the RFID tag using python and feed it through one of
the above tools, or something like this perhaps (if I've understood what
you're trying to do correctly).

Elena :)


On 14 August 2013 13:23, <7equivale...@gmail.com> wrote:

> Here is what I'm doing. I have written a script the runs and monitors a
> serial connection for incoming data. The data comes from an RFID tag
> reader. I have that working. What I'd like to do is use this rfid tag
> number to fill in the password feild and  submit the django Admin login form.
> I'm still a novice and Any advise is appreciated... Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a script to fill in django admin login form and submit?

2013-08-14 Thread Kelvin Wong
https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.login

K


On Tuesday, August 13, 2013 10:23:48 PM UTC-7, 7equiv...@gmail.com wrote:
>
> Here is what I'm doing. I have written a script the runs and monitors a 
> serial connection for incoming data. The data comes from an RFID tag 
> reader. I have that working. What I'd like to do is use this rfid tag 
> number to fill in the password feild and  submit the django Admin login form. 
> I'm still a novice and Any advise is appreciated... Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




How do I create a script to fill in django admin login form and submit?

2013-08-13 Thread 7equivalents
Here is what I'm doing. I have written a script the runs and monitors a 
serial connection for incoming data. The data comes from an RFID tag 
reader. I have that working. What I'd like to do is use this rfid tag 
number to fill in the password feild and  submit the django Admin login form. 
I'm still a novice and Any advise is appreciated... Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




django-admin login doubt

2012-03-24 Thread dummyman dummyman
Hi,

Is there a way to prevent django asking username and password from
127.0.0.1:8000/admin or any other form in admin ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin login

2012-03-15 Thread dummyman dummyman
yes its the same username and passwd for database are also same

On Thu, Mar 15, 2012 at 10:10 PM, Joel Goldstick
wrote:

> On Thu, Mar 15, 2012 at 7:40 AM, dummyman dummyman 
> wrote:
> > Hi
> > Still its not working :( getting the same error
> > On Thu, Mar 15, 2012 at 12:59 PM, vikalp sahni 
> > wrote:
> >>
> >> ITS in settigns.py file.
> >>
> >> if its not there just write.g
> >>
> >> SESSION_COOKIE_DOMAIN = "localhost" and then try.
> >>
> >> Regards,
> >> //Vikalp
> >>
> >>
> >> On Wed, Mar 14, 2012 at 11:48 PM, dummyman dummyman  >
> >> wrote:
> >>>
> >>> Wer is the SESSION_COOKIE_DOMAIN ?
> >>>
> >>>
> >>> On Wed, Mar 14, 2012 at 11:32 PM, dummyman dummyman <
> tempo...@gmail.com>
> >>> wrote:
> 
>  hi
> 
>  i got this error msg
> 
>  Please enter a correct username and password. Note that both fields
> are
>  case-sensitive.
> 
> 
>  On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni  >
>  wrote:
> >
> > Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py
> > file.
> >
> > Also, is there any error message which is displayed on top of login
> > form when you try to login?
> >
> > Regards,
> > //Vikalp
> >
> >
> > On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman
> >  wrote:
> >>
> >> hi ..
> >>
> >> I created a superuser but still getting the same error
> >>
> >> @vikalp: But it works for other projects with the same superuser
> name
> >> and password
> >>
> >>
> >> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii <
> denis.da...@gmail.com>
> >> wrote:
> >>>
> >>> Try to create your superuser again:
> >>>
> >>> ./manage.py createsuperuser
> >>>
> >>>
> >>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni <
> vikalpsa...@gmail.com>
> >>> wrote:
> 
>  You have to check your
> 
>  SESSION_COOKIE_DOMAIN in settings file if i.e pointing to
>  "localhost" (if not cookies will not properly set and hence login
> will not
>  be allowed)
> 
>  the best would be to use some host entry like example.com127.0.0.1
>  and then use that in SESSION_COOKIE_DOMAIN and for accessing
> project on
>  browser.
> 
>  Regards,
>  //Vikalp
> 
> 
>  On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman
>   wrote:
> >
> >
> > Hi,
> > I created a new project in django
> >
> > 1.I created a new database
> > 2. I created a new user
> > 3.python manage syncdb
> > 4.python manae.py runserver
> >
> > when i visit localhost:8080/admin -> it asks for username n
> passwd.
> > but the login fails inspite of entering correct one
> >
> > But it works for a different project
> >
> > --
> > You received this message because you are subscribed to the
> Google
> > Groups "Django users" group.
> > To post to this group, send email to
> django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> 
> 
>  --
>  You received this message because you are subscribed to the Google
>  Groups "Django users" group.
>  To post to this group, send email to
> django-users@googlegroups.com.
>  To unsubscribe from this group, send email to
>  django-users+unsubscr...@googlegroups.com.
>  For more options, visit this group at
>  http://groups.google.com/group/django-users?hl=en.
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> This e-mail and any file transmitted with it is intended only for
> the
> >>> person or entity to which is addressed and may contain information
> that is
> >>> privileged, confidential or otherwise protected from disclosure.
> Copying,
> >>> dissemination or use of this e-mail or the information herein by
> anyone
> >>> other than the intended recipient is prohibited. If you are not
> the intended
> >>> recipient, please notify the sender immediately by return e-mail,
> delete
> >>> this communication and destroy all copies.
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Django users" group.
> >>> To post to this group, send email to django-users@googlegroups.com
> .
> >>> To unsubscribe from this group, send email to
> >>> django-users+unsubscr...@googlegroups.com.
> >>> For more options, visit this group at
> >>> 

Re: django admin login

2012-03-15 Thread Joel Goldstick
On Thu, Mar 15, 2012 at 7:40 AM, dummyman dummyman  wrote:
> Hi
> Still its not working :( getting the same error
> On Thu, Mar 15, 2012 at 12:59 PM, vikalp sahni 
> wrote:
>>
>> ITS in settigns.py file.
>>
>> if its not there just write.g
>>
>> SESSION_COOKIE_DOMAIN = "localhost" and then try.
>>
>> Regards,
>> //Vikalp
>>
>>
>> On Wed, Mar 14, 2012 at 11:48 PM, dummyman dummyman 
>> wrote:
>>>
>>> Wer is the SESSION_COOKIE_DOMAIN ?
>>>
>>>
>>> On Wed, Mar 14, 2012 at 11:32 PM, dummyman dummyman 
>>> wrote:

 hi

 i got this error msg

 Please enter a correct username and password. Note that both fields are
 case-sensitive.


 On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni 
 wrote:
>
> Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py
> file.
>
> Also, is there any error message which is displayed on top of login
> form when you try to login?
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman
>  wrote:
>>
>> hi ..
>>
>> I created a superuser but still getting the same error
>>
>> @vikalp: But it works for other projects with the same superuser name
>> and password
>>
>>
>> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii 
>> wrote:
>>>
>>> Try to create your superuser again:
>>>
>>> ./manage.py createsuperuser
>>>
>>>
>>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni 
>>> wrote:

 You have to check your

 SESSION_COOKIE_DOMAIN in settings file if i.e pointing to
 "localhost" (if not cookies will not properly set and hence login will 
 not
 be allowed)

 the best would be to use some host entry like example.com 127.0.0.1
 and then use that in SESSION_COOKIE_DOMAIN and for accessing project on
 browser.

 Regards,
 //Vikalp


 On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman
  wrote:
>
>
> Hi,
> I created a new project in django
>
> 1.I created a new database
> 2. I created a new user
> 3.python manage syncdb
> 4.python manae.py runserver
>
> when i visit localhost:8080/admin -> it asks for username n passwd.
> but the login fails inspite of entering correct one
>
> But it works for a different project
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.


 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>>
>>>
>>> --
>>> This e-mail and any file transmitted with it is intended only for the
>>> person or entity to which is addressed and may contain information that 
>>> is
>>> privileged, confidential or otherwise protected from disclosure. 
>>> Copying,
>>> dissemination or use of this e-mail or the information herein by anyone
>>> other than the intended recipient is prohibited. If you are not the 
>>> intended
>>> recipient, please notify the sender immediately by return e-mail, delete
>>> this communication and destroy all copies.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> 

Re: django admin login

2012-03-15 Thread dummyman dummyman
Hi
Still its not working :( getting the same error
On Thu, Mar 15, 2012 at 12:59 PM, vikalp sahni wrote:

> ITS in settigns.py file.
>
> if its not there just write.g
>
> SESSION_COOKIE_DOMAIN = "localhost" and then try.
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 11:48 PM, dummyman dummyman wrote:
>
>> Wer is the SESSION_COOKIE_DOMAIN ?
>>
>>
>> On Wed, Mar 14, 2012 at 11:32 PM, dummyman dummyman 
>> wrote:
>>
>>> hi
>>>
>>> i got this error msg
>>>
>>> Please enter a correct username and password. Note that both fields are
>>> case-sensitive.
>>>
>>>
>>> On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni wrote:
>>>
 Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py
 file.

 Also, is there any error message which is displayed on top of login
 form when you try to login?

 Regards,
 //Vikalp


 On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman  wrote:

> hi ..
>
> I created a superuser but still getting the same error
>
> @vikalp: But it works for other projects with the same superuser name
> and password
>
>
> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii 
> wrote:
>
>> Try to create your superuser again:
>>
>> ./manage.py createsuperuser
>>
>>
>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni 
>> wrote:
>>
>>> You have to check your
>>>
>>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to
>>> "localhost" (if not cookies will not properly set and hence login will 
>>> not
>>> be allowed)
>>>
>>> the best would be to use some host entry like example.com 127.0.0.1
>>> and then use that in SESSION_COOKIE_DOMAIN and for accessing project on
>>> browser.
>>>
>>> Regards,
>>> //Vikalp
>>>
>>>
>>> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman <
>>> tempo...@gmail.com> wrote:
>>>

 Hi,
 I created a new project in django

 1.I created a new database
 2. I created a new user
 3.python manage syncdb
 4.python manae.py runserver

 when i visit localhost:8080/admin -> it asks for username n passwd.
 but the login fails inspite of entering correct one

 But it works for a different project

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> --
>> This e-mail and any file transmitted with it is intended only for the
>> person or entity to which is addressed and may contain information that 
>> is
>> privileged, confidential or otherwise protected from disclosure. Copying,
>> dissemination or use of this e-mail or the information herein by anyone
>> other than the intended recipient is prohibited. If you are not the
>> intended recipient, please notify the sender immediately by return 
>> e-mail,
>> delete this communication and destroy all copies.
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this 

Re: django admin login

2012-03-15 Thread vikalp sahni
ITS in settigns.py file.

if its not there just write.

SESSION_COOKIE_DOMAIN = "localhost" and then try.

Regards,
//Vikalp

On Wed, Mar 14, 2012 at 11:48 PM, dummyman dummyman wrote:

> Wer is the SESSION_COOKIE_DOMAIN ?
>
>
> On Wed, Mar 14, 2012 at 11:32 PM, dummyman dummyman wrote:
>
>> hi
>>
>> i got this error msg
>>
>> Please enter a correct username and password. Note that both fields are
>> case-sensitive.
>>
>>
>> On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni wrote:
>>
>>> Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py
>>> file.
>>>
>>> Also, is there any error message which is displayed on top of login form
>>> when you try to login?
>>>
>>> Regards,
>>> //Vikalp
>>>
>>>
>>> On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman 
>>> wrote:
>>>
 hi ..

 I created a superuser but still getting the same error

 @vikalp: But it works for other projects with the same superuser name
 and password


 On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii wrote:

> Try to create your superuser again:
>
> ./manage.py createsuperuser
>
>
> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni 
> wrote:
>
>> You have to check your
>>
>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost"
>> (if not cookies will not properly set and hence login will not be 
>> allowed)
>>
>> the best would be to use some host entry like example.com 127.0.0.1
>> and then use that in SESSION_COOKIE_DOMAIN and for accessing project on
>> browser.
>>
>> Regards,
>> //Vikalp
>>
>>
>> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman <
>> tempo...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>> I created a new project in django
>>>
>>> 1.I created a new database
>>> 2. I created a new user
>>> 3.python manage syncdb
>>> 4.python manae.py runserver
>>>
>>> when i visit localhost:8080/admin -> it asks for username n passwd.
>>> but the login fails inspite of entering correct one
>>>
>>> But it works for a different project
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> This e-mail and any file transmitted with it is intended only for the
> person or entity to which is addressed and may contain information that is
> privileged, confidential or otherwise protected from disclosure. Copying,
> dissemination or use of this e-mail or the information herein by anyone
> other than the intended recipient is prohibited. If you are not the
> intended recipient, please notify the sender immediately by return e-mail,
> delete this communication and destroy all copies.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email 

Re: django admin login

2012-03-14 Thread dummyman dummyman
Wer is the SESSION_COOKIE_DOMAIN ?

On Wed, Mar 14, 2012 at 11:32 PM, dummyman dummyman wrote:

> hi
>
> i got this error msg
>
> Please enter a correct username and password. Note that both fields are
> case-sensitive.
>
>
> On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni wrote:
>
>> Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py
>> file.
>>
>> Also, is there any error message which is displayed on top of login form
>> when you try to login?
>>
>> Regards,
>> //Vikalp
>>
>>
>> On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman 
>> wrote:
>>
>>> hi ..
>>>
>>> I created a superuser but still getting the same error
>>>
>>> @vikalp: But it works for other projects with the same superuser name
>>> and password
>>>
>>>
>>> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii wrote:
>>>
 Try to create your superuser again:

 ./manage.py createsuperuser


 On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:

> You have to check your
>
> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost"
> (if not cookies will not properly set and hence login will not be allowed)
>
> the best would be to use some host entry like example.com 127.0.0.1
> and then use that in SESSION_COOKIE_DOMAIN and for accessing project on
> browser.
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman <
> tempo...@gmail.com> wrote:
>
>>
>> Hi,
>> I created a new project in django
>>
>> 1.I created a new database
>> 2. I created a new user
>> 3.python manage syncdb
>> 4.python manae.py runserver
>>
>> when i visit localhost:8080/admin -> it asks for username n passwd.
>> but the login fails inspite of entering correct one
>>
>> But it works for a different project
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



 --
 This e-mail and any file transmitted with it is intended only for the
 person or entity to which is addressed and may contain information that is
 privileged, confidential or otherwise protected from disclosure. Copying,
 dissemination or use of this e-mail or the information herein by anyone
 other than the intended recipient is prohibited. If you are not the
 intended recipient, please notify the sender immediately by return e-mail,
 delete this communication and destroy all copies.

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin login

2012-03-14 Thread dummyman dummyman
hi

i got this error msg

Please enter a correct username and password. Note that both fields are
case-sensitive.

On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni wrote:

> Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py file.
>
> Also, is there any error message which is displayed on top of login form
> when you try to login?
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman wrote:
>
>> hi ..
>>
>> I created a superuser but still getting the same error
>>
>> @vikalp: But it works for other projects with the same superuser name and
>> password
>>
>>
>> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii wrote:
>>
>>> Try to create your superuser again:
>>>
>>> ./manage.py createsuperuser
>>>
>>>
>>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:
>>>
 You have to check your

 SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost"
 (if not cookies will not properly set and hence login will not be allowed)

 the best would be to use some host entry like example.com 127.0.0.1
 and then use that in SESSION_COOKIE_DOMAIN and for accessing project on
 browser.

 Regards,
 //Vikalp


 On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman  wrote:

>
> Hi,
> I created a new project in django
>
> 1.I created a new database
> 2. I created a new user
> 3.python manage syncdb
> 4.python manae.py runserver
>
> when i visit localhost:8080/admin -> it asks for username n passwd.
> but the login fails inspite of entering correct one
>
> But it works for a different project
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>
>>>
>>> --
>>> This e-mail and any file transmitted with it is intended only for the
>>> person or entity to which is addressed and may contain information that is
>>> privileged, confidential or otherwise protected from disclosure. Copying,
>>> dissemination or use of this e-mail or the information herein by anyone
>>> other than the intended recipient is prohibited. If you are not the
>>> intended recipient, please notify the sender immediately by return e-mail,
>>> delete this communication and destroy all copies.
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin login

2012-03-14 Thread vikalp sahni
Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py file.

Also, is there any error message which is displayed on top of login form
when you try to login?

Regards,
//Vikalp

On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman wrote:

> hi ..
>
> I created a superuser but still getting the same error
>
> @vikalp: But it works for other projects with the same superuser name and
> password
>
>
> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii wrote:
>
>> Try to create your superuser again:
>>
>> ./manage.py createsuperuser
>>
>>
>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:
>>
>>> You have to check your
>>>
>>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost"
>>> (if not cookies will not properly set and hence login will not be allowed)
>>>
>>> the best would be to use some host entry like example.com 127.0.0.1 and
>>> then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.
>>>
>>> Regards,
>>> //Vikalp
>>>
>>>
>>> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman 
>>> wrote:
>>>

 Hi,
 I created a new project in django

 1.I created a new database
 2. I created a new user
 3.python manage syncdb
 4.python manae.py runserver

 when i visit localhost:8080/admin -> it asks for username n passwd. but
 the login fails inspite of entering correct one

 But it works for a different project

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> --
>> This e-mail and any file transmitted with it is intended only for the
>> person or entity to which is addressed and may contain information that is
>> privileged, confidential or otherwise protected from disclosure. Copying,
>> dissemination or use of this e-mail or the information herein by anyone
>> other than the intended recipient is prohibited. If you are not the
>> intended recipient, please notify the sender immediately by return e-mail,
>> delete this communication and destroy all copies.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin login

2012-03-14 Thread dummyman dummyman
hi ..

I created a superuser but still getting the same error

@vikalp: But it works for other projects with the same superuser name and
password

On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii  wrote:

> Try to create your superuser again:
>
> ./manage.py createsuperuser
>
>
> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:
>
>> You have to check your
>>
>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if
>> not cookies will not properly set and hence login will not be allowed)
>>
>> the best would be to use some host entry like example.com 127.0.0.1 and
>> then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.
>>
>> Regards,
>> //Vikalp
>>
>>
>> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman 
>> wrote:
>>
>>>
>>> Hi,
>>> I created a new project in django
>>>
>>> 1.I created a new database
>>> 2. I created a new user
>>> 3.python manage syncdb
>>> 4.python manae.py runserver
>>>
>>> when i visit localhost:8080/admin -> it asks for username n passwd. but
>>> the login fails inspite of entering correct one
>>>
>>> But it works for a different project
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> This e-mail and any file transmitted with it is intended only for the
> person or entity to which is addressed and may contain information that is
> privileged, confidential or otherwise protected from disclosure. Copying,
> dissemination or use of this e-mail or the information herein by anyone
> other than the intended recipient is prohibited. If you are not the
> intended recipient, please notify the sender immediately by return e-mail,
> delete this communication and destroy all copies.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin login

2012-03-14 Thread Denis Darii
Try to create your superuser again:

./manage.py createsuperuser


On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni  wrote:

> You have to check your
>
> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if
> not cookies will not properly set and hence login will not be allowed)
>
> the best would be to use some host entry like example.com 127.0.0.1 and
> then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman wrote:
>
>>
>> Hi,
>> I created a new project in django
>>
>> 1.I created a new database
>> 2. I created a new user
>> 3.python manage syncdb
>> 4.python manae.py runserver
>>
>> when i visit localhost:8080/admin -> it asks for username n passwd. but
>> the login fails inspite of entering correct one
>>
>> But it works for a different project
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
This e-mail and any file transmitted with it is intended only for the
person or entity to which is addressed and may contain information that is
privileged, confidential or otherwise protected from disclosure. Copying,
dissemination or use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please notify the sender immediately by return e-mail,
delete this communication and destroy all copies.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin login

2012-03-14 Thread vikalp sahni
You have to check your

SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if
not cookies will not properly set and hence login will not be allowed)

the best would be to use some host entry like example.com 127.0.0.1 and
then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.

Regards,
//Vikalp


On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman wrote:

>
> Hi,
> I created a new project in django
>
> 1.I created a new database
> 2. I created a new user
> 3.python manage syncdb
> 4.python manae.py runserver
>
> when i visit localhost:8080/admin -> it asks for username n passwd. but
> the login fails inspite of entering correct one
>
> But it works for a different project
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django admin login

2012-03-14 Thread dummyman dummyman
Hi,
I created a new project in django

1.I created a new database
2. I created a new user
3.python manage syncdb
4.python manae.py runserver

when i visit localhost:8080/admin -> it asks for username n passwd. but the
login fails inspite of entering correct one

But it works for a different project

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Admin Login - Redirecting back to login page

2011-06-06 Thread Aidan
Have commented out the 'SESSION_COOKIE_SECURE' and
'SESSION_EXPIRE_AT_BROWSER_CLOSE' from the settings.py file.

This has fixed the problem and I can now log in to admin.

On Jun 6, 1:33 pm, Aidan  wrote:
> Thanks for the input.
>
> I've tried deleting all .pyc files and still get the same issue.
>
> Also checked the cookies - I've got one sessionid and one csrftoken,
> so that doesn't look like the issue.
>
> I've tried using the chrome javascript debugger to look for 404's and
> haven't found any.
>
> I haven't deleted the database yet as there's data used (by South), to
> do migrations on the tables underneath my models. I don't want to have
> to recreate it all.
>
> On Jun 6, 12:19 pm, Karen Tracey  wrote:
>
>
>
>
>
>
>
> > On Mon, Jun 6, 2011 at 6:57 AM, Aidan  wrote:
> > > I'm having trouble with the Django Admin. My login page appears ok at
> > >http://127.0.0.1:8000/adminbutwhen I try to login with a valid
> > > username or password the page seems to refresh - it reappears with
> > > text boxes empty. It doesn't display any errors on the page (logging
> > > in with invalid username / password brings up all the red errors you'd
> > > expect).
>
> > I have seen this (though not with admin -- with a custom site login form)
> > when somehow two sessionid cookies have been set. Using the browser tools to
> > delete the sessionid cookies and try again allows login. I don't believe
> > we've tracked down yet how the multiple sessionid cookies are getting set.
>
> > Karen
> > --http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Admin Login - Redirecting back to login page

2011-06-06 Thread Aidan
Thanks for the input.

I've tried deleting all .pyc files and still get the same issue.

Also checked the cookies - I've got one sessionid and one csrftoken,
so that doesn't look like the issue.

I've tried using the chrome javascript debugger to look for 404's and
haven't found any.

I haven't deleted the database yet as there's data used (by South), to
do migrations on the tables underneath my models. I don't want to have
to recreate it all.

On Jun 6, 12:19 pm, Karen Tracey  wrote:
> On Mon, Jun 6, 2011 at 6:57 AM, Aidan  wrote:
> > I'm having trouble with the Django Admin. My login page appears ok at
> >http://127.0.0.1:8000/adminbut when I try to login with a valid
> > username or password the page seems to refresh - it reappears with
> > text boxes empty. It doesn't display any errors on the page (logging
> > in with invalid username / password brings up all the red errors you'd
> > expect).
>
> I have seen this (though not with admin -- with a custom site login form)
> when somehow two sessionid cookies have been set. Using the browser tools to
> delete the sessionid cookies and try again allows login. I don't believe
> we've tracked down yet how the multiple sessionid cookies are getting set.
>
> Karen
> --http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Admin Login - Redirecting back to login page

2011-06-06 Thread Karen Tracey
On Mon, Jun 6, 2011 at 6:57 AM, Aidan  wrote:

> I'm having trouble with the Django Admin. My login page appears ok at
> http://127.0.0.1:8000/admin but when I try to login with a valid
> username or password the page seems to refresh - it reappears with
> text boxes empty. It doesn't display any errors on the page (logging
> in with invalid username / password brings up all the red errors you'd
> expect).
>

I have seen this (though not with admin -- with a custom site login form)
when somehow two sessionid cookies have been set. Using the browser tools to
delete the sessionid cookies and try again allows login. I don't believe
we've tracked down yet how the multiple sessionid cookies are getting set.

Karen
-- 
http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Admin Login - Redirecting back to login page

2011-06-06 Thread Martin
Oh and:

   - delete all *.pyc files from your project and restart the development
   server <-- this is a nice one that often solves mysterious problems that
   seem to be impossible and drive you insane

Best regards,
Martin

On Mon, Jun 6, 2011 at 7:13 PM, Martin wrote:

> I faced this a long time ago and it nearly drove me insane. Eventually I
> just started a new project from scratch and the problem disappeared.
>
> Wild guesses:
>
>
>- Open the JavaScript debug toolbar of Google Chrome (CTRL+SHIFT+J),
>then reload the site and see if there are any 404 errors (that means your
>static / media files are not served correctly)
>- Refresh your browers cache, restart the browser and try again
>- delete your database and run a fresh syncdb --all
>
> Best regards,
> Martin
>
> On Mon, Jun 6, 2011 at 6:57 PM, Aidan  wrote:
>
>> I'm having trouble with the Django Admin. My login page appears ok at
>> http://127.0.0.1:8000/admin but when I try to login with a valid
>> username or password the page seems to refresh - it reappears with
>> text boxes empty. It doesn't display any errors on the page (logging
>> in with invalid username / password brings up all the red errors you'd
>> expect).
>>
>> I'm not sure what's going on here. The console gives me the following:
>>
>> (cache) C:\PythonProjects\CacheProject\cache>python manage.py
>> runserver
>> Validating models...
>>
>> 0 errors found
>> Django version 1.3, using settings 'cache.settings'
>> Development server is running at http://127.0.0.1:8000/
>> Quit the server with CTRL-BREAK.
>> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053
>> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0
>> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053
>>
>> settings.py -
>> #
>> INSTALLED_APPS = (
>>'django.contrib.auth',
>>'django.contrib.contenttypes',
>>'django.contrib.sessions',
>>'django.contrib.sites',
>>'django.contrib.messages',
>>'django.contrib.admin',
>> )
>> #
>>
>> urls.py -
>>
>> from django.conf.urls.defaults import patterns, include, url
>>
>> from django.contrib import admin
>> admin.autodiscover()
>>
>> urlpatterns = patterns('',
>>(r'^admin/', include(admin.site.urls)),
>> )
>>
>> Any ideas?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Admin Login - Redirecting back to login page

2011-06-06 Thread Martin
I faced this a long time ago and it nearly drove me insane. Eventually I
just started a new project from scratch and the problem disappeared.

Wild guesses:


   - Open the JavaScript debug toolbar of Google Chrome (CTRL+SHIFT+J), then
   reload the site and see if there are any 404 errors (that means your static
   / media files are not served correctly)
   - Refresh your browers cache, restart the browser and try again
   - delete your database and run a fresh syncdb --all

Best regards,
Martin

On Mon, Jun 6, 2011 at 6:57 PM, Aidan  wrote:

> I'm having trouble with the Django Admin. My login page appears ok at
> http://127.0.0.1:8000/admin but when I try to login with a valid
> username or password the page seems to refresh - it reappears with
> text boxes empty. It doesn't display any errors on the page (logging
> in with invalid username / password brings up all the red errors you'd
> expect).
>
> I'm not sure what's going on here. The console gives me the following:
>
> (cache) C:\PythonProjects\CacheProject\cache>python manage.py
> runserver
> Validating models...
>
> 0 errors found
> Django version 1.3, using settings 'cache.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CTRL-BREAK.
> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053
> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0
> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053
>
> settings.py -
> #
> INSTALLED_APPS = (
>'django.contrib.auth',
>'django.contrib.contenttypes',
>'django.contrib.sessions',
>'django.contrib.sites',
>'django.contrib.messages',
>'django.contrib.admin',
> )
> #
>
> urls.py -
>
> from django.conf.urls.defaults import patterns, include, url
>
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
>(r'^admin/', include(admin.site.urls)),
> )
>
> Any ideas?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django Admin Login - Redirecting back to login page

2011-06-06 Thread Aidan
I'm having trouble with the Django Admin. My login page appears ok at
http://127.0.0.1:8000/admin but when I try to login with a valid
username or password the page seems to refresh - it reappears with
text boxes empty. It doesn't display any errors on the page (logging
in with invalid username / password brings up all the red errors you'd
expect).

I'm not sure what's going on here. The console gives me the following:

(cache) C:\PythonProjects\CacheProject\cache>python manage.py
runserver
Validating models...

0 errors found
Django version 1.3, using settings 'cache.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053
[06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0
[06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053

settings.py -
#
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
)
#

urls.py -

from django.conf.urls.defaults import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
)

Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django admin login failure

2010-01-29 Thread toinbis
Hi folks,

logging into django admin fails when 'log in' button is pressed first
time, but pressing "back" and "log in' again - logs the user in
successfully.

I am deploying Django app with zc.buildout here, with a setup similar
to what is described here 
http://www.meppum.com/2009/jan/17/installing-django-ubuntu-intrepid/.
Nginx (listening on 127.0.0.1:8003) is running beyond Apache(listening
on 127.0.0.1:8001), configurations of both servers are provided at the
end of the post. I'm accessing my django app as 127.0.0.1:8003.

So, 127.0.0.1:8003/admin/ opens django admin login form.
1)Entering username/pass, pressing "log in" redirects to 127.0.0.1/
admin, therefore ends up with nothing, as there is no server listening
on 80 port.
Browser sends:
POST /admin/ HTTP/1.1

Cookie: Kapow_Graphs=SUM%2C1%3ATBL%2C1%3ATER%2C1%3ATHR%2C1%3ARCR%2C1%3A
%23MEM%2C1%3AQR%2C1%3AER%2C1%3ARPCS%2C1;
sessionid=9b1b072a02f9ff3297442285729d5010

(sessionid value, at the time of pressing 'log in' matches the one
which is present in django db, in the 'session_key' column of the
single row in django_session table.

Nginx returns :
HTTP/1.x 302 FOUND

<..>
Set-Cookie: sessionid=5d2af76b5ea0b6f19d81e71690515d20; expires=Fri,
12-Feb-2010 21:35:59 GMT; Max-Age=1209600; Path=/

<..>

The old row in django_session is replaced with the new one, containing
the session from the Nginx returned 302 response.

2)Pressing browser's back , and 'log in' button once again  (or
pressing browser's 'back' and 'refresh') logs in succesfully into
127.0.0.1:8003/admin/.

It looks like that's a cookie-related issue, but, i guess, the root of
the problem might lie in the apache and/or nginx config as well.

Any ideas how to make the admin log-in form work immediately?

Cheers!

to


P.S.configs:
=
apache vhost configuration
===



Order deny,allow
Allow from all


WSGIDaemonProcess tsd user=www-data group=www-data threads=25
WSGIProcessGroup tsd

WSGIScriptAlias / /home/toinbis/Desktop/programming/project/
runtime/htdocs/django_wsgi/djproject.wsgi

LogLevel warn
ErrorLog  /home/toinbis/Desktop/programming/project/runtime/logs/
apache_tsd_error.log
CustomLog /home/toinbis/Desktop/programming/project/runtime/logs/
apache_tsd_access.log combined

ServerName localhost



===
nginx configuration
===

daemon off;
#user www-data;
worker_processes  2;

error_log  /home/toinbis/Desktop/programming/project/runtime/logs/
nginx_general_error.log;
pid/home/toinbis/Desktop/programming/project/runtime/var/pids/
nginx.pid;

events {
worker_connections  1024;
#server_names_hash_bucket_size: 128;
}

http {
include   /home/toinbis/Desktop/programming/project/runtime/
etc/nginx_conf/mime.types;
default_type  application/octet-stream;

access_log  /home/toinbis/Desktop/programming/project/runtime/logs/
nginx_access.log;
error_log   /home/toinbis/Desktop/programming/project/runtime/logs/
nginx_error.log;

sendfileon;
tcp_nopush on;

#keepalive_timeout  0;
keepalive_timeout  2;
tcp_nodelayon;

server_names_hash_bucket_size 128;
#server_name_hashes 128;
gzip  on;
gzip_comp_level 2;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; #iš ubuntu
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;


upstream backend {
  server 127.0.0.1:8001;
}

server {
listen   8003;
server_name localhost;

error_log /home/toinbis/Desktop/programming/project/
runtime/logs/project_nginx_error.log;
access_log /home/toinbis/Desktop/programming/project/
runtime/logs/project_nginx_access.log;


location / {
proxy_pass  http://backend/;
include /home/toinbis/Desktop/programming/
project/runtime/etc/nginx_conf/nginx_proxy_1.conf;
}

location  /media/ {
root /home/toinbis/Desktop/programming/project/
src/tsd/core/;
}
}

}


cheers,
to

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.