how to get get-pip.py

2015-06-02 Thread Steve Burrus
how do I get get-pip.py?

 

-- 
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/74aa072c-181d-42c6-81ac-92029d305356%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


GET

2020-06-11 Thread Bootleg Chef
Hi! I have a model - class Criteria(models.Model) - with 37 fields that are 
populated with data I scrubbed from the internet. I have a form - class 
FormName(forms.ModelForm) - that has each of the same fields as the model. 
I need someone to point me to documentation that explains how to create an 
html file and views.py that will help filter data in the model based on the 
user's preferences/inputs for each of the 37 unique fields in the model. 

Most of the tutorials for views on the web are for POST and not many are 
for GET. I don't need the code, just point me to where the documentation is 
so I can read about it.

Thank you in advance!

-- 
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/eab5b6ef-5977-4fc9-99b3-8a9526df3ee9o%40googlegroups.com.


Re: how to get get-pip.py

2015-06-02 Thread Vijay Khemlani
https://pip.pypa.io/en/latest/installing.html

On Tue, Jun 2, 2015 at 7:37 PM, Steve Burrus 
wrote:

> how do I get get-pip.py?
>
>
>
> --
> 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/74aa072c-181d-42c6-81ac-92029d305356%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/74aa072c-181d-42c6-81ac-92029d305356%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CALn3ei1AXJrrHcRf4Pd-ec_o32aZLfNAh1qDVR6SLWYmedjDzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread DHaval Joshi


python get-pip.py install



On Wednesday, June 3, 2015 at 4:31:47 AM UTC+5:30, Steve Burrus wrote:
>
> how do I get get-pip.py?
>
>  
>

-- 
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/f00d91ca-807c-42b5-a75d-76a71404481b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread Steve Burrus
well I am ab;e to install pip okay BUT there must be a config. error 
because all that I get when I t ry to run pip is this :

"C:\Users\SteveB\Desktop>pip
'pip' is not recognized as an internal or external command, operable 
program or batch file."

Now what is wrong anyway? [I have set the environment variables the right 
way for Python I believe]
  


On Tuesday, June 2, 2015 at 6:01:47 PM UTC-5, Steve Burrus wrote:
>
> how do I get get-pip.py?
>
>  
>

-- 
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/aaacb0a7-daba-4c15-9855-6703a1e64592%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread Steve Burrus
well I am still waiting for an answer to my earlier post about pip and
apparently not configuring it right.

On Wed, Jun 3, 2015 at 11:13 AM, Steve Burrus 
wrote:

> well I am ab;e to install pip okay BUT there must be a config. error
> because all that I get when I t ry to run pip is this :
>
> "C:\Users\SteveB\Desktop>pip
> 'pip' is not recognized as an internal or external command, operable
> program or batch file."
>
> Now what is wrong anyway? [I have set the environment variables the right
> way for Python I believe]
>
>
>
> On Tuesday, June 2, 2015 at 6:01:47 PM UTC-5, Steve Burrus wrote:
>>
>> how do I get get-pip.py?
>>
>>
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/tKJTNAq4sS4/unsubscribe.
> To unsubscribe from this group and all its topics, 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/aaacb0a7-daba-4c15-9855-6703a1e64592%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/aaacb0a7-daba-4c15-9855-6703a1e64592%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CABcoaSAXEciVaE9Fv5RxbHgpRq1Q388txFZKMbeDk%3DkuJ_-CDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread Mike Dewhirst

On 4/06/2015 8:42 AM, Steve Burrus wrote:

well I am still waiting for an answer to my earlier post about pip and
apparently not configuring it right.Â


Have you looked at the pip website? Maybe there is a user support 
mailing list for pip.


But in any case, perhaps you should use Python >= 3.4 because it has pip 
built in.


Good luck

Mike



On Wed, Jun 3, 2015 at 11:13 AM, Steve Burrus mailto:steveburru...@gmail.com>> wrote:

well I am ab;e to install pip okay BUT there must be a config. error
because all that I get when I t ry to run pip is this :

"C:\Users\SteveB\Desktop>pip
'pip' is not recognized as an internal or external command, operable
program or batch file."

Now what is wrong anyway? [I have set the environment variables the
right way for Python I believe]
 Â


On Tuesday, June 2, 2015 at 6:01:47 PM UTC-5, Steve Burrus wrote:

how do I get get-pip.py?

Â

--
You received this message because you are subscribed to a topic in
the Google Groups "Django users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/django-users/tKJTNAq4sS4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
django-users+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto: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/aaacb0a7-daba-4c15-9855-6703a1e64592%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/aaacb0a7-daba-4c15-9855-6703a1e64592%40googlegroups.com?utm_medium=email&utm_source=footer>.
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto: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/CABcoaSAXEciVaE9Fv5RxbHgpRq1Q388txFZKMbeDk%3DkuJ_-CDw%40mail.gmail.com
<https://groups.google.com/d/msgid/django-users/CABcoaSAXEciVaE9Fv5RxbHgpRq1Q388txFZKMbeDk%3DkuJ_-CDw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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/556FA40E.4060406%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread Steve Burrus
*"you should use Python >= 3.4" I rerpeatedly use version 3.5 of Python! I
have looked at many of these tutorial videos, via youtube, on how to set up
Django but I still get that error msg. when I try to type in "pip" after I
think I haVE successfully installed it!*


*
 Steve B. *


*On Wed, Jun 3, 2015 at 8:04 PM, Mike Dewhirst > wrote:*
>
>
> *On 4/06/2015 8:42 AM, Steve Burrus wrote: *
>>
>>
>>
>> * well I am still waiting for an answer to my earlier post about pip and
>> apparently not configuring it right. *
>
>
>
>
>
>
>
>
>
>
> * Have you looked at the pip website? Maybe there is a user support
> mailing list for pip. But in any case, perhaps you should use Python >= 3.4
> because it has pip built in. Good luck Mike *
>>
>>
>>
>
>

-- 
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/CABcoaSCRByxHr%2B6ZXOKo4PRRPcYCvpWA7H_UkcTBPhgtTrFZ8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread Mike Dewhirst

Sorry Steve

I didn't realise you needed help to get Django installed. You said you 
were having a problem with pip.


Generally the best way to get help is to explain exactly what you have 
done and detail the error messages generated. Putting your message in 
bold doesn't help.


I just checked my sent messages and see that I replied to you a couple 
of days ago at which time you said you had Django working.


I can understand that you are having problems in a Windows environment 
because I am forced to use it myself and I too have to cope with its 
idiosyncrasies. I didn't know there is a Windows version 10 and I see 
from Tuesday's post you say it is a beta version.


If you have no other choice of platform you should expect a beta version 
of any operating system to have problems which the supplier really wants 
to hear about so they can sort it out. So, to help Microsoft out I 
suggest the following:


1. Uninstall Django and Python

2. Install Python 3.4 for Windows (3.5 is quite new) exactly as 
described on the Python website.


3. Fully document any errors encountered

4. Report such errors to Microsoft if any

5. If there were no errors installing Python 3.4 and you are able to get 
a non-Supervisor command prompt running, then install Django like this:


C:\users\steve\pip install django

6. If you encounter any problems at all you must let Microsoft know 
because they will want to fix it.


Mike





On 4/06/2015 11:16 AM, Steve Burrus wrote:

*"you should use Python >= 3.4" I rerpeatedly use version 3.5 of Python!
I have looked at many of these tutorial videos, via youtube, on how to
set up Django but I_still _get that error msg. when I try to type in
"pip" after I think I haVE successfully installed it!*
*
*
*Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â
                                           Steve B.Â
*
*
*
*On Wed, Jun 3, 2015 at 8:04 PM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote:
*

*On 4/06/2015 8:42 AM, Steve Burrus wrote:
*

*well I am still waiting for an answer to my earlier post about
pip and
apparently not configuring it right.Â
*

*
Have you looked at the pip website? Maybe there is a user support
mailing list for pip.

But in any case, perhaps you should use Python >= 3.4 because it has
pip built in.

Good luck

Mike

*

*Â
*

--
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto: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/CABcoaSCRByxHr%2B6ZXOKo4PRRPcYCvpWA7H_UkcTBPhgtTrFZ8Q%40mail.gmail.com
<https://groups.google.com/d/msgid/django-users/CABcoaSCRByxHr%2B6ZXOKo4PRRPcYCvpWA7H_UkcTBPhgtTrFZ8Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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/556FB242.7000400%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-03 Thread Steve Burrus
*Well Mikea I hardly did it the first time that I  tried but I was able to
get Python 3.4 installed ! And I also got that ez-setup installed okay. But
where do I go from here to get pip going okay?  incidentally I tried doing
step 5 "C:\users\steve\pip install django" but that didn't work! There must
be another path to the django install.*

*
 Steve Burrus  *


*On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst > wrote:*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Sorry Steve I didn't realise you needed help to get Django installed. You
> said you were having a problem with pip. Generally the best way to get help
> is to explain exactly what you have done and detail the error messages
> generated. Putting your message in bold doesn't help. I just checked my
> sent messages and see that I replied to you a couple of days ago at which
> time you said you had Django working. I can understand that you are having
> problems in a Windows environment because I am forced to use it myself and
> I too have to cope with its idiosyncrasies. I didn't know there is a
> Windows version 10 and I see from Tuesday's post you say it is a beta
> version. If you have no other choice of platform you should expect a beta
> version of any operating system to have problems which the supplier really
> wants to hear about so they can sort it out. So, to help Microsoft out I
> suggest the following: 1. Uninstall Django and Python 2. Install Python 3.4
> for Windows (3.5 is quite new) exactly as described on the Python website.
> 3. Fully document any errors encountered 4. Report such errors to Microsoft
> if any 5. If there were no errors installing Python 3.4 and you are able to
> get a non-Supervisor command prompt running, then install Django like this:
> C:\users\steve\pip install django 6. If you encounter any problems at all
> you must let Microsoft know because they will want to fix it. Mike On
> 4/06/2015 11:16 AM, Steve Burrus wrote: *
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> * *"you should use Python >= 3.4" I rerpeatedly use version 3.5 of
>> Python! I have looked at many of these tutorial videos, via youtube, on how
>> to set up Django but I_still _get that error msg. when I try to type in
>> "pip" after I think I haVE successfully installed it!* * * *Â  Â  Â  Â  Â
>> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Â  Â  Â  Â  Â  Â
>>                                Steve B. * * * *On Wed, Jun
>> 3, 2015 at 8:04 PM, Mike Dewhirst >  <mailto:mi...@dewhirst.com.au
>> >> wrote: * *On 4/06/2015 8:42 AM, Steve Burrus
>> wrote: * *well I am still waiting for an answer to my earlier
>> post about pip and apparently not configuring it right.Â
>>   * * Have you looked at the pip website? Maybe there is a user
>> support mailing list for pip. But in any case, perhaps you should
>> use Python >= 3.4 because it has pip built in. Good luck Mike
>>   * *Â * -- 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
>> 
>> <mailto:django-users+unsubscr...@googlegroups.com
>> >. To post to this group, send
>> email to django-users@googlegroups.com 
>> <mailto:django-users@googlegroups.com >.
>> Visit this group at http://groups.google.com/group/django-users
>> <http://groups.google.com/group/django-users>. To view this discussion on
>> the web visit
>> https://groups.google.com/d/msgid/django-users/CABcoaSCRByxHr%2B6ZXOKo4PRRPcYCvpWA7H_UkcTBPhgtTrFZ8Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CABcoaSCRByxHr%2B6ZXOKo4PRRPcYCvpWA7H_UkcTBPhgtTrFZ8Q%40mail.gmail.com>
>> <https://groups.google.com/d/msgid/django-users/CABcoaSCRByxHr%2B6ZXOKo4PRRPcYCvpWA7H_UkcTBPhgtTrFZ8Q%40mail.gmail.com?utm_medium=email&utm_source=footer
>> <https://groups.google.com/d/msgid/django-users/CABcoaSCRByxHr%2B6ZXOKo

Re: how to get get-pip.py

2015-06-04 Thread DHaval Joshi
try this

sudo apt-get install python-pip


On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus 
wrote:

> *Well Mikea I hardly did it the first time that I  tried but I was able to
> get Python 3.4 installed ! And I also got that ez-setup installed okay. But
> where do I go from here to get pip going okay?  incidentally I tried doing
> step 5 "C:\users\steve\pip install django" but that didn't work! There must
> be another path to the django install.*
>
> *
>  Steve Burrus  *
>
>
> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst  > wrote:*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Sorry Steve I didn't realise you needed help to get Django installed.
>> You said you were having a problem with pip. Generally the best way to get
>> help is to explain exactly what you have done and detail the error messages
>> generated. Putting your message in bold doesn't help. I just checked my
>> sent messages and see that I replied to you a couple of days ago at which
>> time you said you had Django working. I can understand that you are having
>> problems in a Windows environment because I am forced to use it myself and
>> I too have to cope with its idiosyncrasies. I didn't know there is a
>> Windows version 10 and I see from Tuesday's post you say it is a beta
>> version. If you have no other choice of platform you should expect a beta
>> version of any operating system to have problems which the supplier really
>> wants to hear about so they can sort it out. So, to help Microsoft out I
>> suggest the following: 1. Uninstall Django and Python 2. Install Python 3.4
>> for Windows (3.5 is quite new) exactly as described on the Python website.
>> 3. Fully document any errors encountered 4. Report such errors to Microsoft
>> if any 5. If there were no errors installing Python 3.4 and you are able to
>> get a non-Supervisor command prompt running, then install Django like this:
>> C:\users\steve\pip install django 6. If you encounter any problems at all
>> you must let Microsoft know because they will want to fix it. Mike On
>> 4/06/2015 11:16 AM, Steve Burrus wrote: *
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> * *"you should use Python >= 3.4" I rerpeatedly use version 3.5 of
>>> Python! I have looked at many of these tutorial videos, via youtube, on how
>>> to set up Django but I_still _get that error msg. when I try to type in
>>> "pip" after I think I haVE successfully installed it!* * * *Â  Â  Â  Â  Â
>>> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Â  Â  Â  Â  Â  Â
>>>                                Steve B. * * * *On Wed, Jun
>>> 3, 2015 at 8:04 PM, Mike Dewhirst >>  <mailto:mi...@dewhirst.com.au
>>> >> wrote: * *On 4/06/2015 8:42 AM, Steve Burrus
>>> wrote: * *well I am still waiting for an answer to my earlier
>>> post about pip and apparently not configuring it right.Â
>>>   * * Have you looked at the pip website? Maybe there is a user
>>> support mailing list for pip. But in any case, perhaps you should
>>> use Python >= 3.4 because it has pip built in. Good luck Mike
>>>   * *Â * -- 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
>>> 
>>> <mailto:django-users+unsubscr...@googlegroups.com
>>> >. To post to this group, send
>>> email to django-users@googlegroups.com 
>>> <mailto:django-users@googlegroups.com >.
>>> Visit this group at http://gr

Re: how to get get-pip.py

2015-06-04 Thread Steve Burrus
*I am sorry Dhavi but your command didmn't work! Now I don't think you know
 that I am on a Windows system and that "sudo" command do esn't work on
windows. Any other ideas for me? *


*On Thu, Jun 4, 2015 at 3:04 AM, DHaval Joshi > wrote:*
>
>
>
> *try this sudo apt-get install python-pip*
>
>
>
> *On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus  > wrote:*
>
>> *Well Mikea I hardly did it the first time that I  tried but I was able
>> to get Python 3.4 installed ! And I also got that ez-setup installed okay.
>> But where do I go from here to get pip going okay?  incidentally I tried
>> doing step 5 "C:\users\steve\pip install django" but that didn't work!
>> There must be another path to the django install.*
>>
>> *
>>Steve Burrus  *
>>
>>
>> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst > > wrote:*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *Sorry Steve I didn't realise you needed help to get Django installed.
>>> You said you were having a problem with pip. Generally the best way to get
>>> help is to explain exactly what you have done and detail the error messages
>>> generated. Putting your message in bold doesn't help. I just checked my
>>> sent messages and see that I replied to you a couple of days ago at which
>>> time you said you had Django working. I can understand that you are having
>>> problems in a Windows environment because I am forced to use it myself and
>>> I too have to cope with its idiosyncrasies. I didn't know there is a
>>> Windows version 10 and I see from Tuesday's post you say it is a beta
>>> version. If you have no other choice of platform you should expect a beta
>>> version of any operating system to have problems which the supplier really
>>> wants to hear about so they can sort it out. So, to help Microsoft out I
>>> suggest the following: 1. Uninstall Django and Python 2. Install Python 3.4
>>> for Windows (3.5 is quite new) exactly as described on the Python website.
>>> 3. Fully document any errors encountered 4. Report such errors to Microsoft
>>> if any 5. If there were no errors installing Python 3.4 and you are able to
>>> get a non-Supervisor command prompt running, then install Django like this:
>>> C:\users\steve\pip install django 6. If you encounter any problems at all
>>> you must let Microsoft know because they will want to fix it. Mike On
>>> 4/06/2015 11:16 AM, Steve Burrus wrote: *
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> * *"you should use Python >= 3.4" I rerpeatedly use version 3.5 of
>>>> Python! I have looked at many of these tutorial videos, via youtube, on how
>>>> to set up Django but I_still _get that error msg. when I try to type in
>>>> "pip" after I think I haVE successfully installed it!* * * *Â  Â  Â  Â  Â
>>>> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Â  Â  Â  Â  Â  Â
>>>>                                Steve B. * * * *On Wed, Jun
>>>> 3, 2015 at 8:04 PM, Mike Dewhirst >>>  <mailto:mi...@dewhirst.com.au
>>>> >> wrote: * *On 4/06/2015 8:42 AM, Steve Burrus
>>>> wrote: * *well I am still waiting for an answer to my earlier
>>>> post about pip and apparently not configuring it right.Â
>>>>  

Re: how to get get-pip.py

2015-06-04 Thread Michael Manfre
"sudo apt-get install ..." is a command that works on Ubuntu and a few 
other flavors of linux. It does not work on Windows.

Which version of Python did you install? If it's Python 3.4 or newer, pip 
is bundled. Python 3.4 is installed to "C:\Python34\" as the default. To 
use pip, you would execute "C:\Python34\python -m pip install PACKAGE_NAME" 
without the surrounding quotes. 
To avoid having to type the full path all the time, you will need to add it 
to your path. Please read 
https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables

If you are using a version of Python earlier than 3.4, follow the 
instructions found at https://pip.pypa.io/en/latest/installing.html

Regards,
Michael Manfre

On Thursday, June 4, 2015 at 1:33:47 PM UTC-4, Steve Burrus wrote:
>
> *I am sorry Dhavi but your command didmn't work! Now I don't think you 
> know  that I am on a Windows system and that "sudo" command do esn't work 
> on windows. Any other ideas for me? *
>
>
> *On Thu, Jun 4, 2015 at 3:04 AM, DHaval Joshi  > wrote:*
>>
>>
>>
>> *try this sudo apt-get install python-pip*
>>
>>
>>
>> *On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus > > wrote:*
>>
>>> *Well Mikea I hardly did it the first time that I  tried but I was able 
>>> to get Python 3.4 installed ! And I also got that ez-setup installed okay. 
>>> But where do I go from here to get pip going okay?  incidentally I tried 
>>> doing step 5 "C:\users\steve\pip install django" but that didn't work! 
>>> There must be another path to the django install.*
>>>
>>> *
>>>Steve Burrus  *
>>>
>>>
>>> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst >> > wrote:*
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *Sorry Steve I didn't realise you needed help to get Django installed. 
>>>> You said you were having a problem with pip. Generally the best way to get 
>>>> help is to explain exactly what you have done and detail the error 
>>>> messages 
>>>> generated. Putting your message in bold doesn't help. I just checked my 
>>>> sent messages and see that I replied to you a couple of days ago at which 
>>>> time you said you had Django working. I can understand that you are having 
>>>> problems in a Windows environment because I am forced to use it myself and 
>>>> I too have to cope with its idiosyncrasies. I didn't know there is a 
>>>> Windows version 10 and I see from Tuesday's post you say it is a beta 
>>>> version. If you have no other choice of platform you should expect a beta 
>>>> version of any operating system to have problems which the supplier really 
>>>> wants to hear about so they can sort it out. So, to help Microsoft out I 
>>>> suggest the following: 1. Uninstall Django and Python 2. Install Python 
>>>> 3.4 
>>>> for Windows (3.5 is quite new) exactly as described on the Python website. 
>>>> 3. Fully document any errors encountered 4. Report such errors to 
>>>> Microsoft 
>>>> if any 5. If there were no errors installing Python 3.4 and you are able 
>>>> to 
>>>> get a non-Supervisor command prompt running, then install Django like 
>>>> this: 
>>>> C:\users\steve\pip install django 6. If you encounter any problems at all 
>>>> you must let Microsoft know because they will want to fix it. Mike On 
>>>> 4/06/2015 11:16 AM, Steve Burrus wrote: *
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>

Re: how to get get-pip.py

2015-06-04 Thread Steve Burrus
*"Which version of Python did you install?" well up until last nite I was
using some flavor of Python 3.5. But someone suggested that I get the 3.4
version of it so I did. I have all of the environment varianbles set
correctly. I did the ez_install.py thing right. And you would think that I
could easily do the "pip install django" ri ght but it fails.*


*On Thu, Jun 4, 2015 at 1:37 PM, Michael Manfre > wrote:*
>
> *"sudo apt-get install ..." is a command that works on Ubuntu and a few
> other flavors of linux. It does not work on Windows.*
>
>
> *Which version of Python did you install? If it's Python 3.4 or newer, pip
> is bundled. Python 3.4 is installed to "C:\Python34\" as the default. To
> use pip, you would execute "C:\Python34\python -m pip install PACKAGE_NAME"
> without the surrounding quotes. *
> *To avoid having to type the full path all the time, you will need to add
> it to your path. Please read
> https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables
> <https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables>*
>
>
> *If you are using a version of Python earlier than 3.4, follow the
> instructions found at https://pip.pypa.io/en/latest/installing.html
> <https://pip.pypa.io/en/latest/installing.html>*
>
> *Regards,*
>
>
> *Michael ManfreOn Thursday, June 4, 2015 at 1:33:47 PM UTC-4, Steve Burrus
> wrote:*
>>
>> *I am sorry Dhavi but your command didmn't work! Now I don't think you
>> know  that I am on a Windows system and that "sudo" command do esn't work
>> on windows. Any other ideas for me? *
>>
>>
>> *On Thu, Jun 4, 2015 at 3:04 AM, DHaval Joshi  wrote:*
>>>
>>>
>>>
>>> *try this sudo apt-get install python-pip*
>>>
>>>
>>>
>>> *On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus 
>>> wrote:*
>>>
>>>> *Well Mikea I hardly did it the first time that I  tried but I was able
>>>> to get Python 3.4 installed ! And I also got that ez-setup installed okay.
>>>> But where do I go from here to get pip going okay?  incidentally I tried
>>>> doing step 5 "C:\users\steve\pip install django" but that didn't work!
>>>> There must be another path to the django install.*
>>>>
>>>> *
>>>>  Steve Burrus  *
>>>>
>>>>
>>>> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst 
>>>> wrote:*
>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *Sorry Steve I didn't realise you needed help to get Django installed.
>>>>> You said you were having a problem with pip. Generally the best way to get
>>>>> help is to explain exactly what you have done and detail the error 
>>>>> messages
>>>>> generated. Putting your message in bold doesn't help. I just checked my
>>>>> sent messages and see that I replied to you a couple of days ago at which
>>>>> time you said you had Django working. I can understand that you are having
>>>>> problems in a Windows environment because I am forced to use it myself and
>>>>> I too have to cope with its idiosyncrasies. I didn't know there is a
>>>>> Windows version 10 and I see from Tuesday's post you say it is a beta
>>>>> version. If you have no other choice of platform you should expect a beta
>>>>> version of any operating system to have problems which the supplier really
>>>>> wants to hear about so they can sort it out. So, to help Microsoft out I
>>>>> suggest the following: 1. Uninstall Django and Python 2. Install Python 
>>>>> 3.4
>>>>> for Windows (3.5 is quite new) exactly as described on the Python website.
>>>>> 3. Fully document any errors encountered 4. Report such errors to 
>>>>> Microsoft
&

Re: how to get get-pip.py

2015-06-04 Thread memilanuk

On 06/04/2015 11:53 AM, Steve Burrus wrote:

*"Which version of Python did you install?" well up until last nite I
was using some flavor of Python 3.5. But someone suggested that I get
the 3.4 version of it so I did. I have _all _of the environment
varianbles set correctly. I did the ez_install.py thing right. And you
would think that I could easily do the "pip install django" ri ght but
it fails.



An observation... why are you trying to use python 3.5?  You do realize 
that its not been fully released yet... right?


If you don't know that, or don't know that pip comes already installed 
in python 3.4.x and later, or how to set your PATH... you really, really 
don't need to be running a beta or release candidate version of python. 
 For anything.


Stick with the latest released version, which is currently 3.4.3 - and 
comes with pip already installed.  There are seven 'options' to the 
install, six of which are done for you by default.  The last - 'Add 
python.exe to your PATH' - should make 'pip' work straight from the 
command line.  Uninstall, re-install, check that option and move on.  I 
just did it in a Windows 7 VM - works fine.


A side note... lay off the large bold font - it makes your posts to the 
list somewhat obnoxious to read.  And try trimming your replies - and/or 
not top-posting.



Monte



--
Shiny!  Let's be bad guys.

Reach me @ memilanuk (at) gmail dot 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 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/mkqbu5%24m8t%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread Steve Burrus
sorry monte for the "inane" quesation but which Path should I use in Env.
Variables, the one in "Users" or the one below in "System", to set the
correct path with Python? I have seen conflicting tutorials which have said
to use one or the other.


  Steve

On Thu, Jun 4, 2015 at 3:20 PM, memilanuk  wrote:

> On 06/04/2015 11:53 AM, Steve Burrus wrote:
>
>> *"Which version of Python did you install?" well up until last nite I
>> was using some flavor of Python 3.5. But someone suggested that I get
>> the 3.4 version of it so I did. I have _all _of the environment
>> varianbles set correctly. I did the ez_install.py thing right. And you
>> would think that I could easily do the "pip install django" ri ght but
>> it fails.
>>
> An observation... why are you trying to use python 3.5?  You do realize
> that its not been fully released yet... right?
> If you don't know that, or don't know that pip comes already installed in
> python 3.4.x and later, or how to set your PATH... you really, really don't
> need to be running a beta or release candidate version of python.  For
> anything.
>
> Stick with the latest released version, which is currently 3.4.3 - and
> comes with pip already installed.  There are seven 'options' to the
> install, six of which are done for you by default.  The last - 'Add
> python.exe to your PATH' - should make 'pip' work straight from the command
> line.  Uninstall, re-install, check that option and move on.  I just did it
> in a Windows 7 VM - works fine.
>
> A side note... lay off the large bold font - it makes your posts to the
> list somewhat obnoxious to read.  And try trimming your replies - and/or
> not top-posting.
>
>
> Monte
>
>
>
>

-- 
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/CABcoaSChDncjUf18-AHdFT9cUjK1FVDVqYNFQNMmQFtSUN4ZuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread Alon Nisser
1. Please, This is an open source community, with people answering 
questions here on their free time (no one here is getting payed to answer). 
 so no need for the BOLD Frustrated type.

2. Specifying you are on windows from the beginning would help, Lots of us 
are using different flavors of windows.

3. The error you are getting is proving that the path etc isn't set up 
correctly to support python install , shoot up a terminal and type python 
and hit enter - do you get a running python interpreter or the same error 
as pip? are the folders where python.exe and pip.exe are added to your 
windows path? (you can check where the binaries are with your favorite file 
explorer tool)  if not , you should add them. if they are did you add them 
to the path while the terminal you are using now was already active? if so 
you should try from another terminal ('cmd') instance

4. A final advice on python environments - make it a habit to use 
virtualenv (pip install virtualenv) and don't use global installs of 
packages

Good luck!

On Thursday, June 4, 2015 at 9:53:36 PM UTC+3, Steve Burrus wrote:
>
>
> *"Which version of Python did you install?" well up until last nite I was 
> using some flavor of Python 3.5. But someone suggested that I get the 3.4 
> version of it so I did. I have all of the environment varianbles set 
> correctly. I did the ez_install.py thing right. And you would think that I 
> could easily do the "pip install django" ri ght but it fails.*
>
>
> *On Thu, Jun 4, 2015 at 1:37 PM, Michael Manfre  > wrote:*
>>
>> *"sudo apt-get install ..." is a command that works on Ubuntu and a few 
>> other flavors of linux. It does not work on Windows.*
>>
>>
>> *Which version of Python did you install? If it's Python 3.4 or newer, 
>> pip is bundled. Python 3.4 is installed to "C:\Python34\" as the 
>> default. To use pip, you would execute "C:\Python34\python -m pip install 
>> PACKAGE_NAME" without the surrounding quotes. *
>> *To avoid having to type the full path all the time, you will need to add 
>> it to your path. Please read 
>> https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables
>>  
>> <https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables>*
>>
>>
>> *If you are using a version of Python earlier than 3.4, follow the 
>> instructions found at https://pip.pypa.io/en/latest/installing.html 
>> <https://pip.pypa.io/en/latest/installing.html>*
>>
>> *Regards,*
>>
>>
>> *Michael ManfreOn Thursday, June 4, 2015 at 1:33:47 PM UTC-4, Steve 
>> Burrus wrote:*
>>>
>>> *I am sorry Dhavi but your command didmn't work! Now I don't think you 
>>> know  that I am on a Windows system and that "sudo" command do esn't work 
>>> on windows. Any other ideas for me? *
>>>
>>>
>>> *On Thu, Jun 4, 2015 at 3:04 AM, DHaval Joshi  
>>> wrote:*
>>>>
>>>>
>>>>
>>>> *try this sudo apt-get install python-pip*
>>>>
>>>>
>>>>
>>>> *On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus  
>>>> wrote:*
>>>>
>>>>> *Well Mikea I hardly did it the first time that I  tried but I was 
>>>>> able to get Python 3.4 installed ! And I also got that ez-setup installed 
>>>>> okay. But where do I go from here to get pip going okay?  incidentally I 
>>>>> tried doing step 5 "C:\users\steve\pip install django" but that didn't 
>>>>> work! There must be another path to the django install.*
>>>>>
>>>>> *      
>>>>>  Steve Burrus  *
>>>>>
>>>>>
>>>>> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst  
>>>>> wrote:*
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>

Re: how to get get-pip.py

2015-06-04 Thread memilanuk

On 06/04/2015 01:43 PM, Steve Burrus wrote:

but which Path should I use in Env. Variables, the one in "Users" or the one below in 
"System", to set
the correct path with Python? I have seen conflicting tutorials which have said 
to use one or the other.



Like I said... the simplest way to get it right would be to uninstall, 
and let the installer do it for you.


Otherwise... I've always used the System path, and it looks like the 
Python 3.4.3 installer used the same approach: it pre-pended 
'C:\Python34\;C:\Python34\Scripts;' (without the quotes) to the System path.



--
Shiny!  Let's be bad guys.

Reach me @ memilanuk (at) gmail dot 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 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/mkqeae%24sb4%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread Steve Burrus
it seems like I haVE also seen someone say I should put, into the System
path, the Python Lib\site-packages\django\bin or sometjhing like that.

On Thu, Jun 4, 2015 at 4:01 PM, memilanuk  wrote:

> On 06/04/2015 01:43 PM, Steve Burrus wrote:
>
>> but which Path should I use in Env. Variables, the one in "Users" or the
>> one below in "System", to set
>> the correct path with Python? I have seen conflicting tutorials which
>> have said to use one or the other.
>>
>>
> Like I said... the simplest way to get it right would be to uninstall, and
> let the installer do it for you.
>
> Otherwise... I've always used the System path, and it looks like the
> Python 3.4.3 installer used the same approach: it pre-pended
> 'C:\Python34\;C:\Python34\Scripts;' (without the quotes) to the System path.
>
>
> --
> Shiny!  Let's be bad guys.
>
> Reach me @ memilanuk (at) gmail dot com
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/tKJTNAq4sS4/unsubscribe.
> To unsubscribe from this group and all its topics, 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/mkqeae%24sb4%241%40ger.gmane.org
> .
>
> 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/CABcoaSA%2BjeTf2%2BiCCEo-U%3DGgDoieLCwibyN2cmVcTuOQcQdd7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread memilanuk

On 06/04/2015 02:42 PM, Steve Burrus wrote:

it seems like I haVE also seen someone say I should put, into the System
path, the Python Lib\site-packages\django\bin or sometjhing like that.



I think I'd just worry about getting python/pip working from the command 
line first, then virtualenv/virtualenvwrapper, then worry about django.


From inside a virtualenv, the django manage.py commands work just fine, 
without any additional diddling with the system path.


--
Shiny!  Let's be bad guys.

Reach me @ memilanuk (at) gmail dot 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 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/mkqiab%24r5s%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread Steve Burrus
when I try to run Python it comes for me normally! [ No problem ] I not
heard yet about a pip.exe file. Just where is that contained in the Python
ins tallation anyway? I  will try that "pip install virtualenv" soon.

On Thu, Jun 4, 2015 at 3:52 PM, Alon Nisser  wrote:

> 1. Please, This is an open source community, with people answering
> questions here on their free time (no one here is getting payed to answer).
>  so no need for the BOLD Frustrated type.
>
> 2. Specifying you are on windows from the beginning would help, Lots of us
> are using different flavors of windows.
>
> 3. The error you are getting is proving that the path etc isn't set up
> correctly to support python install , shoot up a terminal and type python
> and hit enter - do you get a running python interpreter or the same error
> as pip? are the folders where python.exe and pip.exe are added to your
> windows path? (you can check where the binaries are with your favorite file
> explorer tool)  if not , you should add them. if they are did you add them
> to the path while the terminal you are using now was already active? if so
> you should try from another terminal ('cmd') instance
>
> 4. A final advice on python environments - make it a habit to use
> virtualenv (pip install virtualenv) and don't use global installs of
> packages
>
> Good luck!
>
> On Thursday, June 4, 2015 at 9:53:36 PM UTC+3, Steve Burrus wrote:
>>
>>
>> *"Which version of Python did you install?" well up until last nite I was
>> using some flavor of Python 3.5. But someone suggested that I get the 3.4
>> version of it so I did. I have all of the environment varianbles set
>> correctly. I did the ez_install.py thing right. And you would think that I
>> could easily do the "pip install django" ri ght but it fails.*
>>
>>
>> *On Thu, Jun 4, 2015 at 1:37 PM, Michael Manfre  wrote:*
>>
>>> *"sudo apt-get install ..." is a command that works on Ubuntu and a few
>>> other flavors of linux. It does not work on Windows.*
>>>
>>>
>>> *Which version of Python did you install? If it's Python 3.4 or newer,
>>> pip is bundled. Python 3.4 is installed to "C:\Python34\" as the
>>> default. To use pip, you would execute "C:\Python34\python -m pip install
>>> PACKAGE_NAME" without the surrounding quotes. *
>>> *To avoid having to type the full path all the time, you will need to
>>> add it to your path. Please read
>>> https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables
>>> <https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables>*
>>>
>>>
>>> *If you are using a version of Python earlier than 3.4, follow the
>>> instructions found at https://pip.pypa.io/en/latest/installing.html
>>> <https://pip.pypa.io/en/latest/installing.html>*
>>>
>>> *Regards,*
>>>
>>>
>>> *Michael ManfreOn Thursday, June 4, 2015 at 1:33:47 PM UTC-4, Steve
>>> Burrus wrote:*
>>>>
>>>> *I am sorry Dhavi but your command didmn't work! Now I don't think you
>>>> know  that I am on a Windows system and that "sudo" command do esn't work
>>>> on windows. Any other ideas for me? *
>>>>
>>>>
>>>> *On Thu, Jun 4, 2015 at 3:04 AM, DHaval Joshi 
>>>> wrote:*
>>>>>
>>>>>
>>>>>
>>>>> *try this sudo apt-get install python-pip*
>>>>>
>>>>>
>>>>>
>>>>> *On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus 
>>>>> wrote:*
>>>>>
>>>>>> *Well Mikea I hardly did it the first time that I  tried but I was
>>>>>> able to get Python 3.4 installed ! And I also got that ez-setup installed
>>>>>> okay. But where do I go from here to get pip going okay?  incidentally I
>>>>>> tried doing step 5 "C:\users\steve\pip install django" but that didn't
>>>>>> work! There must be another path to the django install.*
>>>>>>
>>>>>> *
>>>>>>Steve Burrus  *
>>>>>>
>>>>>>
>>>>>> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst
>>>>>>  wrote:*
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>

Re: how to get get-pip.py

2015-06-04 Thread Michael Manfre
On Thu, Jun 4, 2015 at 7:15 PM, Steve Burrus 
wrote:

> when I try to run Python it comes for me normally! [ No problem ] I not
> heard yet about a pip.exe file. Just where is that contained in the Python
> ins tallation anyway? I  will try that "pip install virtualenv" soon.
>

C:\Python34\Scripts\pip.exe

I recommend adding C:\Python34\Scripts to your path right after the
C:\Python34 folder (each path should be separated by a semicolon)

Regards,
Michael Manfre

-- 
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/CAGdCwBuCETybj7AQ0U%3D_0SgHf_ah7CymZpBegnFF3gLdivJkYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread Steve Burrus
*well I mdid exactly what you instructed but it still didn't work! Here is
the error mesg. that I got : "*
*c:\Users\SteveB\Desktop>pip install virtualenv *
*Fatal error in launcher: Job information querying failed".*


*On Thu, Jun 4, 2015 at 8:00 PM, Michael Manfre > wrote:*
>
>
>
>
>
> *On Thu, Jun 4, 2015 at 7:15 PM, Steve Burrus  > wrote:when I try to run Python it comes for me
> normally! [ No problem ] I not heard yet about a pip.exe file. Just where
> is that contained in the Python ins tallation anyway? I  will try that "pip
> install virtualenv" soon.*
> *C:\Python34\Scripts\pip.exe*
>
> *I recommend adding C:\Python34\Scripts to your path right after the
> C:\Python34 folder (each path should be separated by a semicolon)*
>
> *Regards,*
> *Michael Manfre*
>
>
>
>
>
>
>
> * -- You received this message because you are subscribed to a topic in
> the Google Groups "Django users" group. To unsubscribe from this topic,
> visit
> https://groups.google.com/d/topic/django-users/tKJTNAq4sS4/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/CAGdCwBuCETybj7AQ0U%3D_0SgHf_ah7CymZpBegnFF3gLdivJkYQ%40mail.gmail.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/CABcoaSBzQoVr_8Bv%3D5HCiAHg3kz8b0X9M720TN_3OG1eCanNEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread memilanuk

Stop.

Uninstall python (whatever version(s) you have).

Re-install python (3.4.3), but this time when you get to the screen 
telling you what all is going to be installed, scroll down and enable 
the last item "Add python.exe to the PATH".


Python commands (including pip) should work from the command line with 
no problem.  I did *exactly* this as a test this afternoon, and told you 
so earlier. Quit flailing about and start over.




--
Shiny!  Let's be bad guys.

Reach me @ memilanuk (at) gmail dot 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 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/mkr52g%24bu6%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
Okay Monte I will certsainly "man up" and start over and try to do what you 
said. Incidentally I have done the "Add python.exe to the PATH" thing that 
you suggested but it still failed! I have done all of the configuration the 
right way but I still simply cannot type "pip" [into the command line] and 
get all of the pip commands.

On Thursday, June 4, 2015 at 10:30:36 PM UTC-5, Monte Milanuk wrote:
>
> Stop. 
>
> Uninstall python (whatever version(s) you have). 
>
> Re-install python (3.4.3), but this time when you get to the screen 
> telling you what all is going to be installed, scroll down and enable 
> the last item "Add python.exe to the PATH". 
>
> Python commands (including pip) should work from the command line with 
> no problem.  I did *exactly* this as a test this afternoon, and told you 
> so earlier. Quit flailing about and start over. 
>
>
>
>
>

-- 
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/efc089d1-6e9c-48a8-a7c3-4cca3bdbec32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
well moknte I got good/bad news for you! The GOOD news is that I finally
got pip installed successfully but the BAD news is that I wasn't able to
upgrade pip. Here is the resulting error when I tried to do that :

"C:\Users\SteveB>pip install --upgrade pip
You are using pip version 6.0.8, however version 7.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip from
https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
  Using cached pip-7.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 6.0.8
Uninstalling pip-6.0.8:
  Successfully uninstalled pip-6.0.8
  Exception:
  Traceback (most recent call last):
File "C:\Python34\lib\shutil.py", line 371, in _rmtree_unsafe
os.unlink(fullname)
  PermissionError: [WinError 5] Access is denied:
'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in
main
  return PREVIOUS_BUILD_DIR_ERROR
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 347,
in run
  if os.path.islink(target_item_dir):
File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 560, in
install
  self.successfully_downloaded.append(req_to_install)
File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 680,
in commit_uninstall
File "C:\Python34\lib\site-packages\pip\req\req_uninstall.py", line
153, in commit
  rmtree(self.save_dir)
File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line 49,
in wrapped_f
  return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line 212,
in call
  raise attempt.get()
File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line 247,
in get
  six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Python34\lib\site-packages\pip\_vendor\six.py", line 659, in
reraise
  raise value
File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line 200,
in call
  attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 61, in
rmtree
  try:
File "C:\Python34\lib\shutil.py", line 478, in rmtree
  return _rmtree_unsafe(path, onerror)
File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
  _rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
  _rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 373, in _rmtree_unsafe
  onerror(os.unlink, fullname, sys.exc_info())
File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 73, in
rmtree_errorhandler
  raise
  PermissionError: [WinError 5] Access is denied:
'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
"

Now what's wrong?

On Fri, Jun 5, 2015 at 10:51 AM, Steve Burrus 
wrote:

> Okay Monte I will certsainly "man up" and start over and try to do what
> you said. Incidentally I have done the "Add python.exe to the PATH" thing
> that you suggested but it still failed! I have done all of the
> configuration the right way but I still simply cannot type "pip" [into the
> command line] and get all of the pip commands.
>
> On Thursday, June 4, 2015 at 10:30:36 PM UTC-5, Monte Milanuk wrote:
>>
>> Stop.
>>
>> Uninstall python (whatever version(s) you have).
>>
>> Re-install python (3.4.3), but this time when you get to the screen
>> telling you what all is going to be installed, scroll down and enable
>> the last item "Add python.exe to the PATH".
>>
>> Python commands (including pip) should work from the command line with
>> no problem.  I did *exactly* this as a test this afternoon, and told you
>> so earlier. Quit flailing about and start over.
>>
>>
>>
>>
>>

-- 
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/CABcoaSATZOdDeEpuK0ghOH%2BgPR4BtH%3DVOuQqwqktF2TdVd_XWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-05 Thread Gergely Polonkai
Hello,

it seems that the user running pip doesn’t have write access to the temp
directory. You should check the permissions of
C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see in
the PermissionError line (just change the double backslashes (\\) to single
ones (\).

Is it possible that you run pip with a user other than the one you used to
install Python?

Best,
Gergely

2015-06-05 18:41 GMT+02:00 Steve Burrus :

> well moknte I got good/bad news for you! The GOOD news is that I finally
> got pip installed successfully but the BAD news is that I wasn't able to
> upgrade pip. Here is the resulting error when I tried to do that :
>
> "C:\Users\SteveB>pip install --upgrade pip
> You are using pip version 6.0.8, however version 7.0.3 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
> Collecting pip from
> https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
>   Using cached pip-7.0.3-py2.py3-none-any.whl
> Installing collected packages: pip
>   Found existing installation: pip 6.0.8
> Uninstalling pip-6.0.8:
>   Successfully uninstalled pip-6.0.8
>   Exception:
>   Traceback (most recent call last):
> File "C:\Python34\lib\shutil.py", line 371, in _rmtree_unsafe
> os.unlink(fullname)
>   PermissionError: [WinError 5] Access is denied:
> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>
>   During handling of the above exception, another exception occurred:
>
>   Traceback (most recent call last):
> File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in
> main
>   return PREVIOUS_BUILD_DIR_ERROR
> File "C:\Python34\lib\site-packages\pip\commands\install.py", line
> 347, in run
>   if os.path.islink(target_item_dir):
> File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 560, in
> install
>   self.successfully_downloaded.append(req_to_install)
> File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 680,
> in commit_uninstall
> File "C:\Python34\lib\site-packages\pip\req\req_uninstall.py", line
> 153, in commit
>   rmtree(self.save_dir)
> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line 49,
> in wrapped_f
>   return Retrying(*dargs, **dkw).call(f, *args, **kw)
> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
> 212, in call
>   raise attempt.get()
> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
> 247, in get
>   six.reraise(self.value[0], self.value[1], self.value[2])
> File "C:\Python34\lib\site-packages\pip\_vendor\six.py", line 659, in
> reraise
>   raise value
> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
> 200, in call
>   attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 61,
> in rmtree
>   try:
> File "C:\Python34\lib\shutil.py", line 478, in rmtree
>   return _rmtree_unsafe(path, onerror)
> File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
>   _rmtree_unsafe(fullname, onerror)
> File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
>   _rmtree_unsafe(fullname, onerror)
> File "C:\Python34\lib\shutil.py", line 373, in _rmtree_unsafe
>   onerror(os.unlink, fullname, sys.exc_info())
> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 73,
> in rmtree_errorhandler
>   raise
>   PermissionError: [WinError 5] Access is denied:
> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>  "
>
> Now what's wrong?
>
> On Fri, Jun 5, 2015 at 10:51 AM, Steve Burrus 
> wrote:
>
>> Okay Monte I will certsainly "man up" and start over and try to do what
>> you said. Incidentally I have done the "Add python.exe to the PATH" thing
>> that you suggested but it still failed! I have done all of the
>> configuration the right way but I still simply cannot type "pip" [into the
>> command line] and get all of the pip commands.
>>
>> On Thursday, June 4, 2015 at 10:30:36 PM UTC-5, Monte Milanuk wrote:
>>>
>>> Stop.
>>>
>>> Uninstall python (whatever version(s) you have).
>>>
>>> Re-install python (3.4.3), but this time when you get to the screen
>>> telling you what all is going to b

Re: how to get get-pip.py

2015-06-05 Thread DHaval Joshi
sry dear i don't know about windows installation.

On Fri, Jun 5, 2015 at 10:20 PM, Gergely Polonkai 
wrote:

> Hello,
>
> it seems that the user running pip doesn’t have write access to the temp
> directory. You should check the permissions of
> C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see in
> the PermissionError line (just change the double backslashes (\\) to single
> ones (\).
>
> Is it possible that you run pip with a user other than the one you used to
> install Python?
>
> Best,
> Gergely
>
> 2015-06-05 18:41 GMT+02:00 Steve Burrus :
>
>> well moknte I got good/bad news for you! The GOOD news is that I finally
>> got pip installed successfully but the BAD news is that I wasn't able to
>> upgrade pip. Here is the resulting error when I tried to do that :
>>
>> "C:\Users\SteveB>pip install --upgrade pip
>> You are using pip version 6.0.8, however version 7.0.3 is available.
>> You should consider upgrading via the 'pip install --upgrade pip' command.
>> Collecting pip from
>> https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
>>   Using cached pip-7.0.3-py2.py3-none-any.whl
>> Installing collected packages: pip
>>   Found existing installation: pip 6.0.8
>> Uninstalling pip-6.0.8:
>>   Successfully uninstalled pip-6.0.8
>>   Exception:
>>   Traceback (most recent call last):
>> File "C:\Python34\lib\shutil.py", line 371, in _rmtree_unsafe
>> os.unlink(fullname)
>>   PermissionError: [WinError 5] Access is denied:
>> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>>
>>   During handling of the above exception, another exception occurred:
>>
>>   Traceback (most recent call last):
>> File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in
>> main
>>   return PREVIOUS_BUILD_DIR_ERROR
>> File "C:\Python34\lib\site-packages\pip\commands\install.py", line
>> 347, in run
>>   if os.path.islink(target_item_dir):
>> File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 560, in
>> install
>>   self.successfully_downloaded.append(req_to_install)
>> File "C:\Python34\lib\site-packages\pip\req\req_install.py", line
>> 680, in commit_uninstall
>> File "C:\Python34\lib\site-packages\pip\req\req_uninstall.py", line
>> 153, in commit
>>   rmtree(self.save_dir)
>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>> 49, in wrapped_f
>>   return Retrying(*dargs, **dkw).call(f, *args, **kw)
>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>> 212, in call
>>   raise attempt.get()
>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>> 247, in get
>>   six.reraise(self.value[0], self.value[1], self.value[2])
>> File "C:\Python34\lib\site-packages\pip\_vendor\six.py", line 659, in
>> reraise
>>   raise value
>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>> 200, in call
>>   attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
>> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 61,
>> in rmtree
>>   try:
>> File "C:\Python34\lib\shutil.py", line 478, in rmtree
>>   return _rmtree_unsafe(path, onerror)
>> File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
>>   _rmtree_unsafe(fullname, onerror)
>> File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
>>   _rmtree_unsafe(fullname, onerror)
>> File "C:\Python34\lib\shutil.py", line 373, in _rmtree_unsafe
>>   onerror(os.unlink, fullname, sys.exc_info())
>> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 73,
>> in rmtree_errorhandler
>>   raise
>>   PermissionError: [WinError 5] Access is denied:
>> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>>  "
>>
>> Now what's wrong?
>>
>> On Fri, Jun 5, 2015 at 10:51 AM, Steve Burrus 
>> wrote:
>>
>>> Okay Monte I will certsainly "man up" and start over and try to do what
>>> you said. Incidentally I have done the "Add python.exe to the PATH" thing
>>> that you suggested but it still faile

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
well tqhat's okay. I was absolutely struggling to get pip installed
correctly for quite a long time! I need to see more videos on how to start
to work with Django. You have any tips about t hat?

On Fri, Jun 5, 2015 at 12:43 PM, DHaval Joshi  wrote:

> sry dear i don't know about windows installation.
>
> On Fri, Jun 5, 2015 at 10:20 PM, Gergely Polonkai 
> wrote:
>
>> Hello,
>>
>> it seems that the user running pip doesn’t have write access to the temp
>> directory. You should check the permissions of
>> C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see in
>> the PermissionError line (just change the double backslashes (\\) to single
>> ones (\).
>>
>> Is it possible that you run pip with a user other than the one you used
>> to install Python?
>>
>> Best,
>> Gergely
>>
>> 2015-06-05 18:41 GMT+02:00 Steve Burrus :
>>
>>> well moknte I got good/bad news for you! The GOOD news is that I finally
>>> got pip installed successfully but the BAD news is that I wasn't able to
>>> upgrade pip. Here is the resulting error when I tried to do that :
>>>
>>> "C:\Users\SteveB>pip install --upgrade pip
>>> You are using pip version 6.0.8, however version 7.0.3 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>> Collecting pip from
>>> https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
>>>   Using cached pip-7.0.3-py2.py3-none-any.whl
>>> Installing collected packages: pip
>>>   Found existing installation: pip 6.0.8
>>> Uninstalling pip-6.0.8:
>>>   Successfully uninstalled pip-6.0.8
>>>   Exception:
>>>   Traceback (most recent call last):
>>> File "C:\Python34\lib\shutil.py", line 371, in
>>> _rmtree_unsafe os.unlink(fullname)
>>>   PermissionError: [WinError 5] Access is denied:
>>> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>>>
>>>   During handling of the above exception, another exception occurred:
>>>
>>>   Traceback (most recent call last):
>>> File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232,
>>> in main
>>>   return PREVIOUS_BUILD_DIR_ERROR
>>> File "C:\Python34\lib\site-packages\pip\commands\install.py", line
>>> 347, in run
>>>   if os.path.islink(target_item_dir):
>>> File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 560,
>>> in install
>>>   self.successfully_downloaded.append(req_to_install)
>>> File "C:\Python34\lib\site-packages\pip\req\req_install.py", line
>>> 680, in commit_uninstall
>>> File "C:\Python34\lib\site-packages\pip\req\req_uninstall.py", line
>>> 153, in commit
>>>   rmtree(self.save_dir)
>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>> 49, in wrapped_f
>>>   return Retrying(*dargs, **dkw).call(f, *args, **kw)
>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>> 212, in call
>>>   raise attempt.get()
>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>> 247, in get
>>>   six.reraise(self.value[0], self.value[1], self.value[2])
>>> File "C:\Python34\lib\site-packages\pip\_vendor\six.py", line 659,
>>> in reraise
>>>   raise value
>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>> 200, in call
>>>   attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
>>> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 61,
>>> in rmtree
>>>   try:
>>> File "C:\Python34\lib\shutil.py", line 478, in rmtree
>>>   return _rmtree_unsafe(path, onerror)
>>> File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
>>>   _rmtree_unsafe(fullname, onerror)
>>> File "C:\Python34\lib\shutil.py", line 368, in _rmtree_unsafe
>>>   _rmtree_unsafe(fullname, onerror)
>>> File "C:\Python34\lib\shutil.py", line 373, in _rmtree_unsafe
>>>   onerror(os.unlink, fullname, sys.exc_info())
>>> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 73,
>

Re: how to get get-pip.py

2015-06-05 Thread Gergely Polonkai
It seems the very first thing you should do is make pip (and with that,
Python) work. For this, you may want to go to a Python related mailing
list, although I’m sure there are many overlapping between the Django list
and that one.

2015-06-05 20:05 GMT+02:00 Steve Burrus :

> well tqhat's okay. I was absolutely struggling to get pip installed
> correctly for quite a long time! I need to see more videos on how to start
> to work with Django. You have any tips about t hat?
>
> On Fri, Jun 5, 2015 at 12:43 PM, DHaval Joshi 
> wrote:
>
>> sry dear i don't know about windows installation.
>>
>> On Fri, Jun 5, 2015 at 10:20 PM, Gergely Polonkai 
>> wrote:
>>
>>> Hello,
>>>
>>> it seems that the user running pip doesn’t have write access to the temp
>>> directory. You should check the permissions of
>>> C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see in
>>> the PermissionError line (just change the double backslashes (\\) to single
>>> ones (\).
>>>
>>> Is it possible that you run pip with a user other than the one you used
>>> to install Python?
>>>
>>> Best,
>>> Gergely
>>>
>>> 2015-06-05 18:41 GMT+02:00 Steve Burrus :
>>>
>>>> well moknte I got good/bad news for you! The GOOD news is that I
>>>> finally got pip installed successfully but the BAD news is that I wasn't
>>>> able to upgrade pip. Here is the resulting error when I tried to do that :
>>>>
>>>> "C:\Users\SteveB>pip install --upgrade pip
>>>> You are using pip version 6.0.8, however version 7.0.3 is available.
>>>> You should consider upgrading via the 'pip install --upgrade pip'
>>>> command.
>>>> Collecting pip from
>>>> https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
>>>>   Using cached pip-7.0.3-py2.py3-none-any.whl
>>>> Installing collected packages: pip
>>>>   Found existing installation: pip 6.0.8
>>>> Uninstalling pip-6.0.8:
>>>>   Successfully uninstalled pip-6.0.8
>>>>   Exception:
>>>>   Traceback (most recent call last):
>>>> File "C:\Python34\lib\shutil.py", line 371, in
>>>> _rmtree_unsafe os.unlink(fullname)
>>>>   PermissionError: [WinError 5] Access is denied:
>>>> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>>>>
>>>>   During handling of the above exception, another exception occurred:
>>>>
>>>>   Traceback (most recent call last):
>>>> File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232,
>>>> in main
>>>>   return PREVIOUS_BUILD_DIR_ERROR
>>>> File "C:\Python34\lib\site-packages\pip\commands\install.py", line
>>>> 347, in run
>>>>   if os.path.islink(target_item_dir):
>>>> File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 560,
>>>> in install
>>>>   self.successfully_downloaded.append(req_to_install)
>>>> File "C:\Python34\lib\site-packages\pip\req\req_install.py", line
>>>> 680, in commit_uninstall
>>>> File "C:\Python34\lib\site-packages\pip\req\req_uninstall.py", line
>>>> 153, in commit
>>>>   rmtree(self.save_dir)
>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>> 49, in wrapped_f
>>>>   return Retrying(*dargs, **dkw).call(f, *args, **kw)
>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>> 212, in call
>>>>   raise attempt.get()
>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>> 247, in get
>>>>   six.reraise(self.value[0], self.value[1], self.value[2])
>>>> File "C:\Python34\lib\site-packages\pip\_vendor\six.py", line 659,
>>>> in reraise
>>>>   raise value
>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>> 200, in call
>>>>   attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
>>>> File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line
>>>> 61, in rmtree
>>>>   try:
>>>> File "C:\Python

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
oh I thought tha t I told you thsat I *was *able to make python/pip work!
It's just this little thing about not being able to upgrade pip which
bothers me, just a little bit. and I am not trying to run pip with any
other User other than myself.

On Fri, Jun 5, 2015 at 1:50 PM, Gergely Polonkai 
wrote:

> It seems the very first thing you should do is make pip (and with that,
> Python) work. For this, you may want to go to a Python related mailing
> list, although I’m sure there are many overlapping between the Django list
> and that one.
>
> 2015-06-05 20:05 GMT+02:00 Steve Burrus :
>
>> well tqhat's okay. I was absolutely struggling to get pip installed
>> correctly for quite a long time! I need to see more videos on how to start
>> to work with Django. You have any tips about t hat?
>>
>> On Fri, Jun 5, 2015 at 12:43 PM, DHaval Joshi 
>> wrote:
>>
>>> sry dear i don't know about windows installation.
>>>
>>> On Fri, Jun 5, 2015 at 10:20 PM, Gergely Polonkai 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> it seems that the user running pip doesn’t have write access to the
>>>> temp directory. You should check the permissions of
>>>> C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see in
>>>> the PermissionError line (just change the double backslashes (\\) to single
>>>> ones (\).
>>>>
>>>> Is it possible that you run pip with a user other than the one you used
>>>> to install Python?
>>>>
>>>> Best,
>>>> Gergely
>>>>
>>>> 2015-06-05 18:41 GMT+02:00 Steve Burrus :
>>>>
>>>>> well moknte I got good/bad news for you! The GOOD news is that I
>>>>> finally got pip installed successfully but the BAD news is that I wasn't
>>>>> able to upgrade pip. Here is the resulting error when I tried to do that :
>>>>>
>>>>> "C:\Users\SteveB>pip install --upgrade pip
>>>>> You are using pip version 6.0.8, however version 7.0.3 is available.
>>>>> You should consider upgrading via the 'pip install --upgrade pip'
>>>>> command.
>>>>> Collecting pip from
>>>>> https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
>>>>>   Using cached pip-7.0.3-py2.py3-none-any.whl
>>>>> Installing collected packages: pip
>>>>>   Found existing installation: pip 6.0.8
>>>>> Uninstalling pip-6.0.8:
>>>>>   Successfully uninstalled pip-6.0.8
>>>>>   Exception:
>>>>>   Traceback (most recent call last):
>>>>> File "C:\Python34\lib\shutil.py", line 371, in
>>>>> _rmtree_unsafe os.unlink(fullname)
>>>>>   PermissionError: [WinError 5] Access is denied:
>>>>> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>>>>>
>>>>>   During handling of the above exception, another exception occurred:
>>>>>
>>>>>   Traceback (most recent call last):
>>>>> File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232,
>>>>> in main
>>>>>   return PREVIOUS_BUILD_DIR_ERROR
>>>>> File "C:\Python34\lib\site-packages\pip\commands\install.py", line
>>>>> 347, in run
>>>>>   if os.path.islink(target_item_dir):
>>>>> File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 560,
>>>>> in install
>>>>>   self.successfully_downloaded.append(req_to_install)
>>>>> File "C:\Python34\lib\site-packages\pip\req\req_install.py", line
>>>>> 680, in commit_uninstall
>>>>> File "C:\Python34\lib\site-packages\pip\req\req_uninstall.py",
>>>>> line 153, in commit
>>>>>   rmtree(self.save_dir)
>>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>>> 49, in wrapped_f
>>>>>   return Retrying(*dargs, **dkw).call(f, *args, **kw)
>>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>>> 212, in call
>>>>>   raise attempt.get()
>>>>> File "C:\Python34\lib\site-packages\pip\_vendor\retrying.py", line
>>>>> 247, in get
>>>>>

Re: how to get get-pip.py

2015-06-05 Thread Gergely Polonkai
So it doesn’t work :) I’m not very familiar with Python on Windows (or
Windows, in general), but this really seems to be a problem related to this.

Have you also checked the permissions on the directory mentioned in the
PermissionDenied message?

2015-06-05 23:53 GMT+02:00 Steve Burrus :

> oh I thought tha t I told you thsat I *was *able to make python/pip work!
> It's just this little thing about not being able to upgrade pip which
> bothers me, just a little bit. and I am not trying to run pip with any
> other User other than myself.
>
> On Fri, Jun 5, 2015 at 1:50 PM, Gergely Polonkai 
> wrote:
>
>> It seems the very first thing you should do is make pip (and with that,
>> Python) work. For this, you may want to go to a Python related mailing
>> list, although I’m sure there are many overlapping between the Django list
>> and that one.
>>
>> 2015-06-05 20:05 GMT+02:00 Steve Burrus :
>>
>>> well tqhat's okay. I was absolutely struggling to get pip installed
>>> correctly for quite a long time! I need to see more videos on how to start
>>> to work with Django. You have any tips about t hat?
>>>
>>> On Fri, Jun 5, 2015 at 12:43 PM, DHaval Joshi 
>>> wrote:
>>>
>>>> sry dear i don't know about windows installation.
>>>>
>>>> On Fri, Jun 5, 2015 at 10:20 PM, Gergely Polonkai 
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> it seems that the user running pip doesn’t have write access to the
>>>>> temp directory. You should check the permissions of
>>>>> C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see 
>>>>> in
>>>>> the PermissionError line (just change the double backslashes (\\) to 
>>>>> single
>>>>> ones (\).
>>>>>
>>>>> Is it possible that you run pip with a user other than the one you
>>>>> used to install Python?
>>>>>
>>>>> Best,
>>>>> Gergely
>>>>>
>>>>> 2015-06-05 18:41 GMT+02:00 Steve Burrus :
>>>>>
>>>>>> well moknte I got good/bad news for you! The GOOD news is that I
>>>>>> finally got pip installed successfully but the BAD news is that I wasn't
>>>>>> able to upgrade pip. Here is the resulting error when I tried to do that 
>>>>>> :
>>>>>>
>>>>>> "C:\Users\SteveB>pip install --upgrade pip
>>>>>> You are using pip version 6.0.8, however version 7.0.3 is available.
>>>>>> You should consider upgrading via the 'pip install --upgrade pip'
>>>>>> command.
>>>>>> Collecting pip from
>>>>>> https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
>>>>>>   Using cached pip-7.0.3-py2.py3-none-any.whl
>>>>>> Installing collected packages: pip
>>>>>>   Found existing installation: pip 6.0.8
>>>>>> Uninstalling pip-6.0.8:
>>>>>>   Successfully uninstalled pip-6.0.8
>>>>>>   Exception:
>>>>>>   Traceback (most recent call last):
>>>>>> File "C:\Python34\lib\shutil.py", line 371, in
>>>>>> _rmtree_unsafe os.unlink(fullname)
>>>>>>   PermissionError: [WinError 5] Access is denied:
>>>>>> 'C:\\Users\\SteveB\\AppData\\Local\\Temp\\pip-xfly9791-uninstall\\python34\\scripts\\pip.exe'
>>>>>>
>>>>>>   During handling of the above exception, another exception occurred:
>>>>>>
>>>>>>   Traceback (most recent call last):
>>>>>> File "C:\Python34\lib\site-packages\pip\basecommand.py", line
>>>>>> 232, in main
>>>>>>   return PREVIOUS_BUILD_DIR_ERROR
>>>>>> File "C:\Python34\lib\site-packages\pip\commands\install.py",
>>>>>> line 347, in run
>>>>>>   if os.path.islink(target_item_dir):
>>>>>> File "C:\Python34\lib\site-packages\pip\req\req_set.py", line
>>>>>> 560, in install
>>>>>>   self.successfully_downloaded.append(req_to_install)
>>>>>> File "C:\Python34\lib\site-packages\pip\req\req_install.py", line
>>>>>> 680, in commit_uninstall
>>>>>> File "C:\Python34\li

Re: how to get get-pip.py

2015-06-05 Thread Russell Keith-Magee
On Fri, Jun 5, 2015 at 4:51 PM, Steve Burrus 
wrote:

> Okay Monte I will certsainly "man up" and start over and try to do what
> you said.
>

Hi Steve,

A quick aside: I'm sure you didn't intend any offence, but using language
like "man up" isn't something we support in the Django community. We aspire
to being an open and inclusive community; if you're participating in Django
community spaces, you're expected to adhere to the Django Community Code of
Conduct:

https://www.djangoproject.com/conduct/

There's nothing inherently masculine about software development.
Expressions of overt masculinity and "bro" culture don't improve the
clarity of your message, and are direct contradiction of our community
goals of inclusivity and diversity.

Please don't use turns of phrase like this in future.

Yours,
Russ Magee %-)

-- 
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/CAJxq84-Z84VEDnMiivHU5_uub70XmfAjbUKUnn_14pRqf2Td2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-05 Thread dvdhbs
Steve,

Try this at a command prompt:

py -3.4 -m pip install --upgrade pip

You can't upgrade pip using pip directly on Windows.

Best,
Dave

-- 
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/81822987-48c2-439d-bf68-cfe7cbd5a516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
*to everyone concerned : It's all goo d now! I  not only got pip installed
I also managed to upgrade it and got django going, and connected to the
Server, synched my new database. So  that is just about all the help which
I require for now.*


*On Fri, Jun 5, 2015 at 9:10 PM, dvdhbs > wrote:*
>
>
>
>
>
>
>
>
>
>
>
> *Steve,Try this at a command prompt:py -3.4 -m pip install --upgrade
> pipYou can't upgrade pip using pip directly on Windows.Best,Dave*
>
>
>
>
>
>
>
> * -- You received this message because you are subscribed to a topic in
> the Google Groups "Django users" group. To unsubscribe from this topic,
> visit
> https://groups.google.com/d/topic/django-users/tKJTNAq4sS4/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/81822987-48c2-439d-bf68-cfe7cbd5a516%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/CABcoaSC5TzZsmbOXLQ6b%2ByXGsqhW9J%3D%2B%3D%2BOAfwmTE3zMgp-unw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to get queryset from get method

2018-12-04 Thread Thiago Luiz Parolin
I have a class (Updateview) to handle file upload for a particular model.
In this class, I do some validation on the get method that uses a queryset.
In get_object and get_context_data I need to do the same query used in the
get method, how can I reuse the get method's queryset in another method of
the same class?
I do not know if I could explain it correctly, but thanks if anyone can
help me.

-- 
Thiago Luiz Parolin

-- 
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/CANbmKyvFhCuyDjENxn8YxBJz71rXK3AH%2Bh9W16EuNnBhRVRLOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Bulk get

2009-06-06 Thread Andrew Fong

Hi all,

I'm trying to figure out how to do this and can't seem to wrap my head
around it today. I have currently have a piece of code like this:

x = [MyModel.objects.get(pk=pk) for pk in model_pk_list]

I want to modify this such that ...
* Everything is done with one call to the DB instead len
(model_pk_list) calls
* x is lazily-evaluated (e.g. like a QuerySet object)
* The results come back in the same order as they are in model_pk_list

Is this possible? Thanks in advance!


-- Andrew
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



GET/POST

2011-05-23 Thread egilchri
I am really new to Django. I've set up an Apache server with
mod_wsgi,and Django, and I've hit what is probably a common
roadblock.

When I use "curl" to invoke a url using GET, it works just fine. But
when I invoke it using POST, I get a 403 error:

curl  http://web1.tunnlr.com:x/wsgi-scripts/index.json # works
fine, creates JSON
curl  -X POST http://web1.tunnlr.com:/wsgi-scripts/index.json #
produces a 403 error


I need to get this working because I am constructing an app that
returns JSON. However, this app is setup to invoked by an app engine
that will be POSTing to it. Right now, I see from that app engines
logs that it is getting back a 404, just like my "curl" test.

Can someone point me in the right direction? Thanks,

-- 
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.



How to get News by category? - GET method

2012-05-25 Thread enemybass
Hi. How to get News by category name? My try: http://dpaste.com/752094/
If I click category name in template, nothing happens -> in web
browser is url: http://127.0.0.1:8000/news/category?music

Thanks!

-- 
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.



"get next" and "get last" on any field?

2008-04-05 Thread SlowLearner

Hi, I am hoping there is a better solution to my problem than the one
I have come up with, or one built in to the django models.

I would like to include "get next" and "get last" buttons on my view.

The catch is that I want to do get next, get last on an integer field
(which is not a primary key but is unique, if that make a difference).

Searching in the group and googling the internet in general turns up a
few things but these are date based or quite old posts suggesting
creating managers etc.

My current solution is a brute force cycle over all the objects until
I find the object wanted, the previous and the next which is not ideal
but works.

I am currently using 0.96 but I am intending to download trunk in the
not too distant future as there is a templatetag application I want to
use which does not work under 0.96.

Thanks in advance.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to get queryset from get method

2018-12-04 Thread Gerson David Vizquel Alemán
Hello Thiago, review this link: http://ccbv.co.uk/

El martes, 4 de diciembre de 2018, 8:38:24 (UTC-4), thiago.parolin escribió:
>
> I have a class (Updateview) to handle file upload for a particular model. 
> In this class, I do some validation on the get method that uses a queryset. 
> In get_object and get_context_data I need to do the same query used in the 
> get method, how can I reuse the get method's queryset in another method of 
> the same class?
> I do not know if I could explain it correctly, but thanks if anyone can 
> help me.
>
> -- 
> Thiago Luiz Parolin
>
>

-- 
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/d8b0fe72-63ed-4713-ad12-f807402eed1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get queryset from get method

2018-12-05 Thread Thiago Luiz Parolin
Thanks!!
This site is awesome and will help me a lot 



> Em 4 de dez de 2018, às 16:05, Gerson David Vizquel Alemán 
>  escreveu:
> 
> Hello Thiago, review this link: http://ccbv.co.uk/
> 
> El martes, 4 de diciembre de 2018, 8:38:24 (UTC-4), thiago.parolin escribió:
>> 
>> I have a class (Updateview) to handle file upload for a particular model. In 
>> this class, I do some validation on the get method that uses a queryset. In 
>> get_object and get_context_data I need to do the same query used in the get 
>> method, how can I reuse the get method's queryset in another method of the 
>> same class?
>> I do not know if I could explain it correctly, but thanks if anyone can help 
>> me.
>> 
>> -- 
>> Thiago Luiz Parolin
>> 
> 
> -- 
> 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/d8b0fe72-63ed-4713-ad12-f807402eed1d%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CEBFE353-0C0C-464F-BB9B-A25CC47DEC93%40unesp.br.
For more options, visit https://groups.google.com/d/optout.


Re: How to get News by category? - GET method

2012-05-25 Thread Jonathan D. Baker
The query string parameters in your URL need to be in key=value format, such as 
http://127.0.0.1:8000/news/?category=music

Sent from my iPhone

On May 25, 2012, at 6:01 AM, enemybass  wrote:

> Hi. How to get News by category name? My try: http://dpaste.com/752094/
> If I click category name in template, nothing happens -> in web
> browser is url: http://127.0.0.1:8000/news/category?music
> 
> Thanks!
> 
> -- 
> 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: "get next" and "get last" on any field?

2008-04-05 Thread 1234
*get next* = Info.objects.filter(id__gt=newsid).order_by('id')[:1]

*get last* = Info.objects.filter(id__lt=newsid).order_by('id')[:1]



2008/4/5, SlowLearner <[EMAIL PROTECTED]>:
>
>
> Hi, I am hoping there is a better solution to my problem than the one
> I have come up with, or one built in to the django models.
>
> I would like to include "get next" and "get last" buttons on my view.
>
> The catch is that I want to do get next, get last on an integer field
> (which is not a primary key but is unique, if that make a difference).
>
> Searching in the group and googling the internet in general turns up a
> few things but these are date based or quite old posts suggesting
> creating managers etc.
>
> My current solution is a brute force cycle over all the objects until
> I find the object wanted, the previous and the next which is not ideal
> but works.
>
> I am currently using 0.96 but I am intending to download trunk in the
> not too distant future as there is a templatetag application I want to
> use which does not work under 0.96.
>
> Thanks in advance.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "get next" and "get last" on any field?

2008-04-07 Thread SlowLearner

Brilliant, thanks for that.

As an aside, if anyone ends up finding this thread looking for a
similar solution try looking here:
http://www.djangobook.com/en/1.0/appendixC/

There is lots of good stuff there.

I had looked in the djangobook but spent a lot of time reading the
model section thinking the answer would be there if anywhere. I
skimmed the database api stuff but obviously did not pay enough
attention!.

On Apr 5, 10:26 pm, 1234 <[EMAIL PROTECTED]> wrote:
> *get next* = Info.objects.filter(id__gt=newsid).order_by('id')[:1]
>
> *get last* = Info.objects.filter(id__lt=newsid).order_by('id')[:1]
>
> 2008/4/5, SlowLearner <[EMAIL PROTECTED]>:
>
>
>
> > Hi, I am hoping there is a better solution to my problem than the one
> > I have come up with, or one built in to the django models.
>
> > I would like to include "get next" and "get last" buttons on my view.
>
> > The catch is that I want to do get next, get last on an integer field
> > (which is not a primary key but is unique, if that make a difference).
>
> > Searching in the group and googling the internet in general turns up a
> > few things but these are date based or quite old posts suggesting
> > creating managers etc.
>
> > My current solution is a brute force cycle over all the objects until
> > I find the object wanted, the previous and the next which is not ideal
> > but works.
>
> > I am currently using 0.96 but I am intending to download trunk in the
> > not too distant future as there is a templatetag application I want to
> > use which does not work under 0.96.
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



More friends more money,get friends while get paid

2007-10-19 Thread my god

More friends more money,get friends while get paid
http://groups.google.com/group/all-good-things/web/get-friends-while-get-paid


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



More friends more money,get friends while get paid

2007-10-24 Thread jack

More friends more money,get friends while get paid
http://groups.google.com/group/all-good-things/web/get-friends-while-get-paid
Get 1 Million Guaranteed Real Visitors, FREE!
http://www.t2000ultra.com/?rid=12740


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Get model name

2008-12-25 Thread Kless

How to know the name of the model? i.e.

class Foo(models.Model):

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Get Request Url

2009-01-09 Thread burcu hamamcıoğlu
Hi everybody,

do you know how can i get request url in views.py.

My url pattern is like (r'^wp/rmain2\.aspx','DisplayPacketApplications2'),
But my link is like :
http://wap2.cepoyun.com/wp/rmain2.aspx?pid=194&w=280jhjh

when i use 'PATH_INFO' i olnly get 'wp/rmain2\.aspx' of the link. How can i
get the full link above ?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Get Current User

2009-03-09 Thread Adam Schmitz
Hey All,

I just setup my webapp to use the django user authentication and everything
works smoothly so far. The one thing I'm wondering is: after the user logs
in, how do you access the user object from another app?

The main thing I'm trying to accomplish is I want to save a model with one
of the fields being the current user that is logged in.

-- 
Adam

"Say what you mean and mean what you say. Because those that matter don't
mind and those that mind don't matter."
-Dr. Suess

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Get Users' Groups

2009-06-25 Thread Gil Sousa

Hi!

I searched on documentation but I didn't see anything related with
managing users' groups, I want to do something like a "staff page" and
for that I need to get a list of groups, I need to get the NAME of
each group and I need to get the list of members of each group. How
can I do this?

I am using the User and Group django Models.

Thanks!
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Get project name

2009-08-21 Thread Alessandro Ronchi

Is there any way to get the project name that's running in the code?

Now I use a manual setting: PROJECT_NAME = "ambiente"
but it should be useful to avoid that, because I'm working on an
external app and every new unuseful configuration simplify my life a
lot.

-- 
Alessandro Ronchi

SOASI
Sviluppo Software e Sistemi Open Source
http://www.soasi.com

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



get current URL

2009-09-13 Thread Shuge Lee

How to get current URL ?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



GET vs POST?

2009-03-14 Thread ihome

Hi,

I defined a form to load data from HttpRequest in views.py. For the
same function, sometimes, I need to pass a POST request while some
times I need to pass in a GET request.

For POST, I used

MyForm(request.POST)

to load the data and it works well.

For GET method, MyForm(request.POST) does not work. Does the form only
support the instantiation of POST data? Do I have to use
request.GET.get(field_name) to retrieve each parameter value in the
query string?

Thanks.
--~--~-~--~~~---~--~~
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: Bulk get

2009-06-06 Thread Michael
On Sat, Jun 6, 2009 at 10:55 AM, Andrew Fong  wrote:

>
> Hi all,
>
> I'm trying to figure out how to do this and can't seem to wrap my head
> around it today. I have currently have a piece of code like this:
>
> x = [MyModel.objects.get(pk=pk) for pk in model_pk_list]
>

x = MyModel.objects.filter(pk__in=model_pk_list)

Does this in one db call, returns a queryset so it is lazy. As for the
order, this will come back as the default ordering of the model. You can
change the ordering based on something else by using the .order_by on the
queryset. otherwise you would have to loop through it and create an ordered
list based on your arbitrary ordering.

Hope that helps,

Michael

--~--~-~--~~~---~--~~
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: Bulk get

2009-06-06 Thread Andrew Fong

Was hoping not to have to loop back through it -- but I guess I'll
just have to suck it up and do it. Thanks.

On Jun 6, 11:04 am, Michael  wrote:
> On Sat, Jun 6, 2009 at 10:55 AM, Andrew Fong  wrote:
>
> > Hi all,
>
> > I'm trying to figure out how to do this and can't seem to wrap my head
> > around it today. I have currently have a piece of code like this:
>
> > x = [MyModel.objects.get(pk=pk) for pk in model_pk_list]
>
> x = MyModel.objects.filter(pk__in=model_pk_list)
>
> Does this in one db call, returns a queryset so it is lazy. As for the
> order, this will come back as the default ordering of the model. You can
> change the ordering based on something else by using the .order_by on the
> queryset. otherwise you would have to loop through it and create an ordered
> list based on your arbitrary ordering.
>
> Hope that helps,
>
> Michael
--~--~-~--~~~---~--~~
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: Bulk get

2009-06-06 Thread Daniel Roseman



On Jun 6, 4:13 pm, Andrew Fong  wrote:
> Was hoping not to have to loop back through it -- but I guess I'll
> just have to suck it up and do it. Thanks.
>

If you've got the order already in model_pk_list, you can use the
order_by parameter to .extra() to get the results in that order
straight from the database.

x = MyModel.objects.filter(pk__in=model_pk_list).extra
(order_by=model_pk_list)

This works for MySQL at least, not sure about other backends.
--
DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



GET request breadcrumbs

2010-01-21 Thread Meenal
So far I have seem template inheritance  based examples for
breadcrumbs in django. However for a project I am working on that does
not quite work because all templates inherit from base.

For eg.

templates/base.html
 common/ a.html, b.html, c.html
 myapp/ m.html, n,.html, q.html

So a GET request  to a  gets the "Super" breadcrumb from base ,like
Home->a  and that to B gets Home ->b, but a GET request from a-> b
will still show Home->b , I would like it to be Home->a->b

I am thinking I might need to capture the browsing history for a
session ? Any ideas how to do this ?
Thanks
Meenal

-- 
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.




Re: GET/POST

2011-05-23 Thread Gabriel Gunderson
On Mon, May 23, 2011 at 8:04 PM, egilchri  wrote:
> I am really new to Django. I've set up an Apache server with
> mod_wsgi,and Django, and I've hit what is probably a common
> roadblock.

Welcome. Hope you enjoy your time spent with Django!



> When I use "curl" to invoke a url using GET, it works just fine. But
> when I invoke it using POST, I get a 403 error:
>
> curl  http://web1.tunnlr.com:x/wsgi-scripts/index.json # works
> fine, creates JSON
> curl  -X POST http://web1.tunnlr.com:/wsgi-scripts/index.json #
> produces a 403 error

403 is 'Forbidden' and I think it might have something to do with this:

http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#rejected-requests

It's a good thing :) It's trying to make the Internet a safer place
--starting with your site.



> I need to get this working because I am constructing an app that
> returns JSON. However, this app is setup to invoked by an app engine
> that will be POSTing to it. Right now, I see from that app engines
> logs that it is getting back a 404, just like my "curl" test.

Now, before you said 403... Did you really mean 404?  That would
change my reply.

Best,
Gabe

-- 
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: GET/POST

2011-05-23 Thread AJ
Just FYI:
403: http://en.wikipedia.org/wiki/HTTP_403
404: http://en.wikipedia.org/wiki/HTTP_404


On Mon, May 23, 2011 at 10:49 PM, Gabriel Gunderson  wrote:

> On Mon, May 23, 2011 at 8:04 PM, egilchri  wrote:
> > I am really new to Django. I've set up an Apache server with
> > mod_wsgi,and Django, and I've hit what is probably a common
> > roadblock.
>
> Welcome. Hope you enjoy your time spent with Django!
>
>
>
> > When I use "curl" to invoke a url using GET, it works just fine. But
> > when I invoke it using POST, I get a 403 error:
> >
> > curl  http://web1.tunnlr.com:x/wsgi-scripts/index.json # works
> > fine, creates JSON
> > curl  -X POST http://web1.tunnlr.com:/wsgi-scripts/index.json #
> > produces a 403 error
>
> 403 is 'Forbidden' and I think it might have something to do with this:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#rejected-requests
>
> It's a good thing :) It's trying to make the Internet a safer place
> --starting with your site.
>
>
>
> > I need to get this working because I am constructing an app that
> > returns JSON. However, this app is setup to invoked by an app engine
> > that will be POSTing to it. Right now, I see from that app engines
> > logs that it is getting back a 404, just like my "curl" test.
>
> Now, before you said 403... Did you really mean 404?  That would
> change my reply.
>
> Best,
> Gabe
>
> --
> 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.
>
>


-- 
AJ

-- 
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: GET/POST

2011-05-24 Thread Amit Sethi
I think this is csrfmiddleware issue . Just add {% csrf_token %} like this
 {% csrf_token %}


-- 
A-M-I-T S|S

-- 
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: GET/POST

2011-05-24 Thread egilchri
Thanks for those pointers. I think I'll have to try using something
like csrf_exempt().

The reason is, I'm working with an API (It's for a voice application),
and the API works as follows.
You create an app, that among other things, is able to take apart the
"session" data that is initially posted
to it.

The flow of control goes like this. :
  -User calls a certain number on the phone
- That number, being associated with your app, calls a POST request to
be issued to your app
- Your app can optionally unpack that session data, if it needs piecs
of it

So you see, the POST is coming from outside of my control. It is
coming from the app engine, which is a
third party known and trusted by me.I don't think I can impose any
restrictions on them, such as including a special token or cookie that
I designate.

But I guess that raises the issue of how am I protecting my app from
being maliiciously attacked by someone other than the third party app
engine I trust? Hmm, food for thought.

Ted Gilchrist

On May 23, 10:49 pm, Gabriel Gunderson  wrote:
> On Mon, May 23, 2011 at 8:04 PM,egilchri wrote:
> > I am really new to Django. I've set up an Apache server with
> > mod_wsgi,and Django, and I've hit what is probably a common
> > roadblock.
>
> Welcome. Hope you enjoy your time spent with Django!
>
> > When I use "curl" to invoke a url using GET, it works just fine. But
> > when I invoke it using POST, I get a 403 error:
>
> > curl  http://web1.tunnlr.com:x/wsgi-scripts/index.json# works
> > fine, creates JSON
> > curl  -X POSThttp://web1.tunnlr.com:/wsgi-scripts/index.json#
> > produces a 403 error
>
> 403 is 'Forbidden' and I think it might have something to do with this:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#rejected-requests
>
> It's a good thing :) It's trying to make the Internet a safer place
> --starting with your site.
>
> > I need to get this working because I am constructing an app that
> > returns JSON. However, this app is setup to invoked by an app engine
> > that will be POSTing to it. Right now, I see from that app engines
> > logs that it is getting back a 404, just like my "curl" test.
>
> Now, before you said 403... Did you really mean 404?  That would
> change my reply.
>
> Best,
> Gabe

-- 
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.



Get url parameters

2013-05-15 Thread Hélio Miranda
Hi

I need to get a parameter from the url and do not know how.
If my url looks like this: *
http://localhost:8080/test/view/20519364e38774a71190edb28c*
I did like this:  *url(r'^view/(?P\w+)', 'rest.views.view'),*
And everything ok.

Now I have a url like this: *http://localhost:8080/test/view/*
that the error looks like this: *
http://localhost:8080/test/view/%3CGridFSProxy:%20519364e38774a71190edb28c%3E
*

With a url so, how can I get only the number (*20519364e38774a71190edb28c*)?

Someone can help me?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Can't get MySQLdb

2014-06-09 Thread Alan Sawyer
Please excuse me if this is a dumb question, but I've been stuck on this 
for about 3 hours, and getting a bit frustrated
I am a noob to Django/Python.   I am trying to get this setup on Windows 7 
laptop.

I installed Python 3.4 but have also tried 3.3
I then installed Pip
I then installed Django 1.6.5 though have also tried 1.6

I also installed the MySQL/Python 1.2.2 connector, though I had to use the 
Generic .py version because the Windows one is not a zip like it states in 
the documentation, but an msi and it doesn't seem to work.

I generated an application, and changed the settings.py to point to my 
local MySQL server.

I can create a test.py that just connects to my database and that seems to 
work.

Now I already have quite a extensive database that I want to use in DJango, 
so I am trying
python manage.py inspectdb
but it is telling me that I don't have a module called mysqldb

I just want to get it going so I don't care if I have the latest versions 
of everything but I must be missing something in the instructions or 
something because I'm sure I'm not the only person in the world wanting to 
do this.

Thanks for any help anyone is willing to give.

A Sawyer

-- 
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/df9b452b-5767-4916-b7bc-861fe9e9438e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Get 1000 $ / day

2007-07-15 Thread newbar

Get 1000 $ / day

all BIG BIG business on the web !!


http://www.cash-dreams.biz


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Get path translated

2007-10-08 Thread cschand

Hi all
  Can I get the path of the redirected/translated page


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Get model's attributes

2007-10-09 Thread xunSir

class Address(models.Model):
  name = models.CharField('uname', maxlength=20, unique=True)
  mobile = models.CharField('umobile', maxlength=11)
  room = models.CharField('uroom', maxlength=10)

  class Admin:
list_display = ('name', 'mobile', 'room')
=========
objs = Address.objects.all()

How to get :
  1  ['name', 'mobile', 'room']
  2  ['uname', 'umobile', 'uroom']
  3  {'name':'uname', 'mobile':'umobile', 'room':'uroom'}

Address's attributes are unfixed.

"Class Amdin" let those come ture, but I am blind to see the English.

~~
Thanks.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Get domain name

2007-02-02 Thread evenrik

I have 2 domain names pointing to the same ip. I need to customize
some of the content depending on which domain is used. How do I know
in a view which one the user connected with?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



cannot get REQUEST_URI

2007-04-28 Thread omat * gezgin.com

I need to use the current request URI in a template. Thus, I am
passing the uri as a context variable, which is:

uri = request.META.get('REQUEST_URI') or request.META.get('PATH_INFO')

When I use this expression in the test server, which uses the
request.META.get('PATH_INFO'), everything is fine but at production
server (apache, mod_python) the value of
request.META.get('REQUEST_URI') is always '/' for any url like 'http://
domain.com/something/'

Thanks for any help...


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Get next object

2006-12-16 Thread [EMAIL PROTECTED]

Hey Everyone,

Wondering if anyone can help me out here. Is it possible to get the
next item in the database (not by date, but by ID). Obviously, I can't
just do this by saying current id +1 as the next item could have been
deleted.

Ideally, this should be a something which is fetched in the view so I
can just do {{ next_object.get_absolute_url }} in the template (and
obviously for previous too)

Any help much appreciated.

Cheers,
O


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



get files name

2022-08-27 Thread Hind Djebbar
how can i get the file names from data base to list them into droplist 
in models.py :
class FilesUpload(models.Model):
file = models.FileField(null=True, blank=True,upload_to="media/")
def filename(self):
name = os.path.basename(self.file.name)
return name

 in views.py :
def File_List(request):
List=FilesUpload.objects.all()
return render(request,"Espace_user\Espace_user.html",{'fichier':List})

in html file: 

  {% for f in fichier %} 
  {{ f.file.filename }}
  {% endfor %}  
   

-- 
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/d665f774-f7fd-4a26-af9f-c3f4bb12fe0cn%40googlegroups.com.


Unable to get an object value using get method in Django

2012-12-30 Thread coded kid
I want to get an object value from a model. After trying the get()
method, I've been unable to make it work.And I'm getting the below
error. I have a page that display the name of a place to users, so if
a user see a place he likes, he will go ahead and fill the form.And in
the form, I want to get the name of the place automatically from
another model, I don't want users to fill the name of the place. Below
are my codes

NameError at /welcome/

   global name 'name' is not defined

Models

 class Fin(models.Model):
  user=models.ForeignKey(User)
  name=models.CharField(max_length=100)

  def __unicode__(self):
  return self.user


 class Place(models.Model):
  user=models.ForeignKey(User)
  mall=models.ForeignKey(Fin)
  full_name=models.CharField(max_length=100)
  e_mail=models.EmailField(max_length=100)
  phone_no=models.CharField(max_length=100)
  pub_date=models.DateTimeField()

  def __unicode__(self):
  return self.full_name
  class Meta:
 ordering=['-pub_date']

  class PlaceForm(ModelForm):
   class Meta:
 model=Place
 fields=('full_name','e_mail','phone_no')
 exclude=('user','pub_date','mall')

Views:

   def place_me(request):
   if request.method=="POST":
  form=PlaceForm(request.POST)
  if form.is_valid():
 data=form.cleaned_data
 newbooks=Place(
 user=request.user,
 pub_date=datetime.datetime.now(),
 mall=Fin.objects.get(name),
 full_name=data['full_name'],
 e_mail=data['e_mail'],
 phone_no=data['phone_no'])
 newbooks.save()
 return HttpResponse('Thanks for choosing themall, we will
contact you as soon as possible.')
 else:
return HttpResponse('Some fields are not filled
correctly')
 else:
return render_to_response('buuk.html',
{'PlaceForm':PlaceForm},context_instance=RequestContext(request))

-- 
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.



Cannot get xml using xmlhttprequest GET from an external javascript document

2015-03-14 Thread Chen Kun
I tested the link and the link returns me a XML in the browser. In my 
external javascript document, I try to use get XMLhttprequest to get the 
document but it fails. The readystate=4 but status=0. Does anyone know the 
reason? 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/be244855-d1fb-4ccb-920c-3893d250abde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to get CURRVAL()

2008-09-19 Thread Merrick

I have a function in my model where I need the next sequence id from
postgresql so i can create an encoded value based off it. Any ideas on
how to do this?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



get children of children

2008-09-24 Thread Evgeny

Hi,
There's an object hierarchy: A references B, B references C.
"references" means foreign key.
Is there a nice Django way to select all C objects which are
grandchilds of given A with one query? Somethink like

select C.* from C
join B on B.id = C.id_b
join A on A.id = B.id_a
where A.id = 1

i.e. in Django terms get all C objects which are children of
A.objects.get(id=1).B_set.all()

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Get External IP Address

2008-10-17 Thread Ty

I'd like to grab the users external IP address. I'm using it for a
spam catching class that I'm porting over to Django/Python. Is this
possible?

This person outlines how to 'hack' it, but I'd rather not depend on an
external site.
http://dmiessler.com/blog/how-to-use-python-to-get-your-external-ip
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Get model name

2008-12-25 Thread Alex Koshelev
Foo._meta.object_name


On Thu, Dec 25, 2008 at 2:44 PM, Kless  wrote:

>
> How to know the name of the model? i.e.
>
> class Foo(models.Model):
>
> >
>

--~--~-~--~~~---~--~~
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: Get Request Url

2009-01-09 Thread bruno desthuilliers



On 9 jan, 17:06, "burcu hamamcıoğlu"  wrote:
> Hi everybody,
>
> do you know how can i get request url in views.py.
>
> My url pattern is like (r'^wp/rmain2\.aspx','DisplayPacketApplications2'),
> But my link is like :http://wap2.cepoyun.com/wp/rmain2.aspx?pid=194&w=280jhjh
>
> when i use 'PATH_INFO' i olnly get 'wp/rmain2\.aspx' of the link. How can i
> get the full link above ?

request.get_full_path() will give you the path + the querystring.

http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_full_path

But if what you want is to get the 'pid' and 'w' arguments of the
querystring, it might be simpler to use request.GET, ie:

def youview(request):
   pid = request.GET.get(pid)
   w = request.GET.get(w)
   # you code here

Have a look at the FineManuel(tm) for more about the HttpRequest
object:
http://docs.djangoproject.com/en/dev/ref/request-response/

--~--~-~--~~~---~--~~
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: Get Request Url

2009-01-11 Thread burcu hamamcıoğlu
Thanks Bruno request.get_full_path() is enough for me .

Best regards

09 Ocak 2009 Cuma 18:31 tarihinde bruno desthuilliers <
bruno.desthuilli...@gmail.com> yazdı:

>
>
>
> On 9 jan, 17:06, "burcu hamamcıoğlu"  wrote:
> > Hi everybody,
> >
> > do you know how can i get request url in views.py.
> >
> > My url pattern is like
> (r'^wp/rmain2\.aspx','DisplayPacketApplications2'),
> > But my link is like :
> http://wap2.cepoyun.com/wp/rmain2.aspx?pid=194&w=280jhjh
> >
> > when i use 'PATH_INFO' i olnly get 'wp/rmain2\.aspx' of the link. How can
> i
> > get the full link above ?
>
> request.get_full_path() will give you the path + the querystring.
>
>
> http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_full_path
>
> But if what you want is to get the 'pid' and 'w' arguments of the
> querystring, it might be simpler to use request.GET, ie:
>
> def youview(request):
>   pid = request.GET.get(pid)
>   w = request.GET.get(w)
>   # you code here
>
> Have a look at the FineManuel(tm) for more about the HttpRequest
> object:
> http://docs.djangoproject.com/en/dev/ref/request-response/
>
> >
>

--~--~-~--~~~---~--~~
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: Get Request Url

2009-01-11 Thread James Matthews
Thank You (I had the same question today)

2009/1/12 burcu hamamcıoğlu 

> Thanks Bruno request.get_full_path() is enough for me .
>
> Best regards
>
> 09 Ocak 2009 Cuma 18:31 tarihinde bruno desthuilliers <
> bruno.desthuilli...@gmail.com> yazdı:
>
>
>>
>>
>> On 9 jan, 17:06, "burcu hamamcıoğlu"  wrote:
>> > Hi everybody,
>> >
>> > do you know how can i get request url in views.py.
>> >
>> > My url pattern is like
>> (r'^wp/rmain2\.aspx','DisplayPacketApplications2'),
>> > But my link is like :
>> http://wap2.cepoyun.com/wp/rmain2.aspx?pid=194&w=280jhjh
>> >
>> > when i use 'PATH_INFO' i olnly get 'wp/rmain2\.aspx' of the link. How
>> can i
>> > get the full link above ?
>>
>> request.get_full_path() will give you the path + the querystring.
>>
>>
>> http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_full_path
>>
>> But if what you want is to get the 'pid' and 'w' arguments of the
>> querystring, it might be simpler to use request.GET, ie:
>>
>> def youview(request):
>>   pid = request.GET.get(pid)
>>   w = request.GET.get(w)
>>   # you code here
>>
>> Have a look at the FineManuel(tm) for more about the HttpRequest
>> object:
>> http://docs.djangoproject.com/en/dev/ref/request-response/
>> >>
>>


-- 
http://www.astorandblack.com/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



GET Requests and URLS

2009-01-30 Thread Alfonso

Hi,

I've got a simple form that acts as a filter to enable users to reach
listings in various countries and I've set up a view that either
redirects the user to the correct url or in the case of a query
present; diverts to a search url that processes via GET.  So the
problem I'm having is sending multi value list variables to the search
feature - I get this:

http://pitchup.queryclick.webfactional.com/activities/search/?q=horse%20riding&location=[u'ireland']

instead of

http://pitchup.queryclick.webfactional.com/activities/search/?q=horse%20riding&location=englandscotlandwales

In my view I have this:

def activities(request):
if request.method == 'POST':
query_string = request.POST["q"]
location_filter = request.POST.getlist("location")
activity_filter = request.POST.getlist("activity")
if query_string:
return 
HttpResponseRedirect('/activities/search/?q=%s&location=%s'
% (query_string, location_filter))
if location_filter == 'all':
return HttpResponseRedirect('/activities/')
else:
return HttpResponseRedirect('/activities/%s/%s' % 
(location_filter,
activity_filter))
else:
activity_list = Activity.objects.all().order_by('name')
context = {
'activity_list' : activity_list,
}
return render_to_response('activity/activity_list.html', context,
context_instance=RequestContext(request))

Anyone point out where I'm messing things up!?

Thanks
--~--~-~--~~~---~--~~
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 Get/POST problem

2009-02-03 Thread Aldo

Hi folks,

MY URL is x.y.z/list
It shows a list of objects. They have link buttons to delete/update
for each object.

When I click delete for an object I go to a URL via POST with the
object id in the url
This brings me to a "Are you sure you want to delete this object
page".
MY URL is x.y.z/list/3

I click submit and it deletes the object and brings me back to the URL
page at the top /list.

My problem is my delete function :

def delete(request,  id):
if request.method == 'POST':
if verify(id):
MyObject.objects.get(pk=id).delete()
#Go back to the list
return render_to_response('html/list.html',
{'objects':MyObjects.objects.all())
if request.method == 'GET':
if verify(id):
   return render_to_response('html/delete.html',
{'token':token, 'id':id})
return render_to_response('html/404.html')

Is there a neater way of doing this - rather than finding the request
type and behaving differently depending.

I am doing a similar thing for my update and it just seems off.

Please help.







--~--~-~--~~~---~--~~
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: Get Current User

2009-03-09 Thread Briel

You can get the current user through the request object: request.user.
If that fails, you need to have if you have AuthenticationMiddleware
installed probably.

~Briel

On 9 Mar., 17:48, Adam Schmitz  wrote:
> Hey All,
>
> I just setup my webapp to use the django user authentication and everything
> works smoothly so far. The one thing I'm wondering is: after the user logs
> in, how do you access the user object from another app?
>
> The main thing I'm trying to accomplish is I want to save a model with one
> of the fields being the current user that is logged in.
>
> --
> Adam
>
> "Say what you mean and mean what you say. Because those that matter don't
> mind and those that mind don't matter."
> -Dr. Suess
--~--~-~--~~~---~--~~
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: Get Current User

2009-03-09 Thread Rajesh D



On Mar 9, 12:48 pm, Adam Schmitz  wrote:
> Hey All,
>
> I just setup my webapp to use the django user authentication and everything
> works smoothly so far. The one thing I'm wondering is: after the user logs
> in, how do you access the user object from another app?
>
> The main thing I'm trying to accomplish is I want to save a model with one
> of the fields being the current user that is logged in.

http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-web-requests

-Rajesh D

--~--~-~--~~~---~--~~
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: Get Current User

2009-03-09 Thread Alex Gaynor
On Mon, Mar 9, 2009 at 12:03 PM, Rajesh D  wrote:

>
>
>
> On Mar 9, 12:48 pm, Adam Schmitz  wrote:
> > Hey All,
> >
> > I just setup my webapp to use the django user authentication and
> everything
> > works smoothly so far. The one thing I'm wondering is: after the user
> logs
> > in, how do you access the user object from another app?
> >
> > The main thing I'm trying to accomplish is I want to save a model with
> one
> > of the fields being the current user that is logged in.
>
>
> http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-web-requests
>
> -Rajesh D
>
> >
>
The important thing to remember is that you never have access to some global
user object, you need to pass it to wherever needs it.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~-~--~~~---~--~~
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: Get Users' Groups

2009-06-25 Thread Daniel Roseman

On Jun 25, 2:45 pm, Gil Sousa  wrote:
> Hi!
>
> I searched on documentation but I didn't see anything related with
> managing users' groups, I want to do something like a "staff page" and
> for that I need to get a list of groups, I need to get the NAME of
> each group and I need to get the list of members of each group. How
> can I do this?
>
> I am using the User and Group django Models.
>
> Thanks!

It's just a normal ManyToMany relationship between user and group. So
you can do:

{% for group in groups %}
{{ group.name }} - {{ group.user_set.all }}
{% endfor %}
--
DR.
--~--~-~--~~~---~--~~
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: Get Users' Groups

2009-06-29 Thread Gil Sousa

Thanks :)

And where can I see the whole Group Documentation? All the fields we
have available (and their names), etc...

On 25 Jun, 18:02, Daniel Roseman  wrote:
> On Jun 25, 2:45 pm, Gil Sousa  wrote:
>
> > Hi!
>
> > I searched on documentation but I didn't see anything related with
> > managing users' groups, I want to do something like a "staff page" and
> > for that I need to get a list of groups, I need to get the NAME of
> > each group and I need to get the list of members of each group. How
> > can I do this?
>
> > I am using the User and Group django Models.
>
> > Thanks!
>
> It's just a normal ManyToMany relationship between user and group. So
> you can do:
>
> {% for group in groups %}
>     {{ group.name }} - {{ group.user_set.all }}
> {% endfor %}
> --
> DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to get DATABASE_NAME

2009-08-16 Thread adelaide_mike

In my reporting function I need to have:

If DATABASE_NAME = x:
#do this
Else:
#do the other

How can I obtain that name, which is established in settings.py?

Mike
--~--~-~--~~~---~--~~
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: Get project name

2009-08-21 Thread Bill Freeman
Alessandro,

In settings.py:

import os.path
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
PROJECT_NAME = os.path.basename(PROJECT_ROOT)

Then, in modules where you need it:

from django.conf import settings

PROJECT_NAME = settings.PROJECT_NAME

Bill


On Fri, Aug 21, 2009 at 2:31 PM, Alessandro Ronchi <
alessandro.ron...@soasi.com> wrote:

>
> Is there any way to get the project name that's running in the code?
>
> Now I use a manual setting: PROJECT_NAME = "ambiente"
> but it should be useful to avoid that, because I'm working on an
> external app and every new unuseful configuration simplify my life a
> lot.
>
> --
> Alessandro Ronchi
>
> SOASI
> Sviluppo Software e Sistemi Open Source
> http://www.soasi.com
>
> >
>

--~--~-~--~~~---~--~~
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: get current URL

2009-09-13 Thread Gonzalo Delgado
El Sun, 13 Sep 2009 17:12:41 -0700 (PDT)
Shuge Lee  escribió:

> How to get current URL ?

http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.path

-- 
P.U. Gonzalo Delgado 
http://gonzalodelgado.com.ar/


pgpcJxfIZ1MCG.pgp
Description: PGP signature


Re: get current URL

2009-09-14 Thread Peter Bengtsson

Perhaps it's this you're looking for:
current_url = request.build_absolute_uri()

On 14 Sep, 01:12, Shuge Lee  wrote:
> How to get current URL ?
--~--~-~--~~~---~--~~
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: GET vs POST?

2009-03-14 Thread Alex Gaynor
On Sat, Mar 14, 2009 at 4:54 PM, ihome  wrote:

>
> Hi,
>
> I defined a form to load data from HttpRequest in views.py. For the
> same function, sometimes, I need to pass a POST request while some
> times I need to pass in a GET request.
>
> For POST, I used
>
> MyForm(request.POST)
>
> to load the data and it works well.
>
> For GET method, MyForm(request.POST) does not work. Does the form only
> support the instantiation of POST data? Do I have to use
> request.GET.get(field_name) to retrieve each parameter value in the
> query string?
>
> Thanks.
> >
>
You can instantiate a form with request.GET just the same as you can with
request.POST.  MyForm(request.GET) works just fine.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



persistent get url question

2009-03-26 Thread Timboy

I've created a calendar view and users can select multiple calendars
with checkboxes. It passes this: ?
calendars=CALNAME&calendars=CALNAME2&calendars=CALNAME2 to the url and
returns the proper events but when I change months it goes back to the
default calendar...

how can I make the selected calendars persistent?

I was searching for some sort of solution and ran across the following
link for 0.96. I'm hoping there is some sort of built in way. I would
think that this would be somewhat of a common need for sites.
http://www.djangosnippets.org/snippets/1175/

TIA
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Get ServerName in settings.py

2009-05-21 Thread Donn Ingle

Hi,
Given that my apache uses many VirtualHosts and within each a ServerName, 
how can I get that ServerName into a variable in my settings.py file?

I am using WSGI and mod_python. (different setups on dev vs. server)

The reason is that I need to be able to build the whole http://servername in 
functions all over the place, like the models and request context -- places 
where I *don't* have a request variable. All I have is access to 
settings.SOME_VAR -- hence I would like to get:

apache: ServerName ---> settings.py: SERVER_NAME

Any help/suggestions?

\d



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Can't get css working

2009-10-14 Thread David

Hello
I can't get my css working.
I read http://docs.djangoproject.com/en/dev/howto/static-files/ and
many stack overflow and group entries, and I think I have what
everybody hast that has it working, yet it doesn't work!

In settings.py:
MEDIA_ROOT ="/home/myhome/workspaces/django-project/media_site/"
MEDIA_URL = "/media_site/"
ADMIN_MEDIA_PREFIX = "/media/"

in the template base.html:

blabla



in urls.py:
patterns('',
 (r'^media_site/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
...
)

from the terminal:
david: media_site$ pwd
/home/myhome/workspaces/django-project/media_site
david: media_site$ ls
style.css


I use the development server. The server outputs:
[14/Oct/2009 16:27:41] "GET /media_site/style.css HTTP/1.1" 404 2118


Any idea where I did anything wrong? a typo somewhere?
Any help appreciated!

David

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Get name from request.path

2009-12-25 Thread kelvan . mailinglist

Hi,

I'm trying to get the url name of the request.path, resolve only shows if the 
url exists.
Is there a function that returns the name of the urlpath?

happy holidays,
florian


signature.asc
Description: OpenPGP digital signature


newline in GET data

2010-01-21 Thread Sumanth
Hi ,

I am having newlines in GET data , but when the data comes to server
newline chars are removed. Is that any way I can retain new line
chars ?

Thanks
Sumanth

-- 
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.



Re: GET request breadcrumbs

2010-01-22 Thread Andy Mikhailenko
I would suggest using django-navigation or a similar approach, that is
to bind breadcrumbs-related code to views instead of templates. Of
course you would still render the breadcrumbs in a template, but that
would be a single piece of code (I usually place it right in the
project's base.html) which deals with a list of "crumbs". The list is
generated with regard to current URL.

-- 
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.



Get pk before commit

2010-05-28 Thread TheIvIaxx
Hello, I am trying to figure out how to get a pk in the middle of a
transaction. I need to set a field in the model based on the
ID(default pk) to be given.  As far as a i know, this ID should be
allocated during the transaction.  So i would imagine it would do the
INSERT, then i could get the pk and do what i need to do, then proceed
with the commit.

Is this possible?

Thanks

-- 
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.



forms.ChoiceField get displayed value

2011-01-20 Thread Dan
If have a ChoiceField in a form (sometimes dynamically changed with
javascript) when getting the cleaned_data for that field it will
always return the value.

i.e:


Property1


self.cleaned_data.get('property') will always return '1'

How can i access the displayed value 'Property1' ?

Thanks

-Dan

-- 
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.



  1   2   3   4   5   6   7   8   9   10   >