Re: Cannot install channels

2017-02-09 Thread Robin Lery
Yes. That might have been the problem. Thank you once again!

On Fri, Feb 10, 2017 at 12:43 PM, Andrew Godwin  wrote:

> I'm afraid I can't help without looking at the machine directly - I would
> suspect that either it had a version of Twisted pre-installed on the system
> that it was happy with (the more recent releases increased the Twisted
> version requirement), or the version of Twisted it downloaded did not
> require compilation.
>
> Andrew
>
> On Thu, Feb 9, 2017 at 11:10 PM, Robin Lery  wrote:
>
>> Yes that was it. Thank you. Could you please help me understand why this
>> might have worked before in a earlier different virtual env in the same
>> vagrant machine?
>>
>> On Fri, Feb 10, 2017 at 12:28 PM, Andrew Godwin 
>> wrote:
>>
>>> You don't have the Python development headers installed for your system
>>> - you can tell this because of this line in the error:
>>>
>>> src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or
>>> directory
>>>
>>> If you install your distribution's python header package (e.g. on ubuntu
>>> it's python-dev) it should resolve the error.
>>>
>>> Andrew
>>>
>>> On Thu, Feb 9, 2017 at 10:51 PM, Robin Lery  wrote:
>>>
 Hi,

 I already had a django channels in my other virtual env. But since its
 an older version of channels (0.7.0) I am trying to install a new channel
 version into my project which is in a different virtual environment inside
 a a vagrant box.

 I created a new virtualenv

> $ mkvirtualenv newsapp
>

 Install django

> $ pip install django
>

 Install channels

> $ pip install -U channels
>

 Then I am getting error:

 Command "/home/vagrant/Envs/newsapp/bin/python -u -c "import
> setuptools, tokenize;__file__='/tmp/pip-bu
> ild-IrzQ_E/twisted/setup.py';f=getattr(tokenize, 'open',
> open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-ArjPse-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/vagrant/Envs/newsapp/include/site/python2.7/twisted" failed
> with error code 1 in /tmp/pip-build-IrzQ_E/twisted/


 Here is link for the full error
 
 Can you please help how to solve this issue?

 --
 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/ms
 gid/django-users/CA%2B4-nGpCy3g5KD9Q-UctFF3oKuVqtdfTjkW6XuTL
 BPiH%2BpyTsw%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 https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/django-users/CAFwN1urVA5dAAKX2M06Ftny8BE8e9uVWTXKr6LFs-5
>>> xVim6j-Q%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 https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/CA%2B4-nGpddiY2fxD7papAQEP42f%2B43ZYOuCpXj7
>> fjx_jCpzABXQ%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 

Re: Cannot install channels

2017-02-09 Thread Andrew Godwin
I'm afraid I can't help without looking at the machine directly - I would
suspect that either it had a version of Twisted pre-installed on the system
that it was happy with (the more recent releases increased the Twisted
version requirement), or the version of Twisted it downloaded did not
require compilation.

Andrew

On Thu, Feb 9, 2017 at 11:10 PM, Robin Lery  wrote:

> Yes that was it. Thank you. Could you please help me understand why this
> might have worked before in a earlier different virtual env in the same
> vagrant machine?
>
> On Fri, Feb 10, 2017 at 12:28 PM, Andrew Godwin 
> wrote:
>
>> You don't have the Python development headers installed for your system -
>> you can tell this because of this line in the error:
>>
>> src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or
>> directory
>>
>> If you install your distribution's python header package (e.g. on ubuntu
>> it's python-dev) it should resolve the error.
>>
>> Andrew
>>
>> On Thu, Feb 9, 2017 at 10:51 PM, Robin Lery  wrote:
>>
>>> Hi,
>>>
>>> I already had a django channels in my other virtual env. But since its
>>> an older version of channels (0.7.0) I am trying to install a new channel
>>> version into my project which is in a different virtual environment inside
>>> a a vagrant box.
>>>
>>> I created a new virtualenv
>>>
 $ mkvirtualenv newsapp

>>>
>>> Install django
>>>
 $ pip install django

>>>
>>> Install channels
>>>
 $ pip install -U channels

>>>
>>> Then I am getting error:
>>>
>>> Command "/home/vagrant/Envs/newsapp/bin/python -u -c "import
 setuptools, tokenize;__file__='/tmp/pip-bu
 ild-IrzQ_E/twisted/setup.py';f=getattr(tokenize, 'open',
 open)(__file__);code=f.read().replace('\r\n',
 '\n');f.close();exec(compile(code, __file__, 'exec'))" install
 --record /tmp/pip-ArjPse-record/install-record.txt
 --single-version-externally-managed --compile --install-headers
 /home/vagrant/Envs/newsapp/include/site/python2.7/twisted" failed with
 error code 1 in /tmp/pip-build-IrzQ_E/twisted/
>>>
>>>
>>> Here is link for the full error
>>> 
>>> Can you please help how to solve this issue?
>>>
>>> --
>>> 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/ms
>>> gid/django-users/CA%2B4-nGpCy3g5KD9Q-UctFF3oKuVqtdfTjkW6XuTL
>>> BPiH%2BpyTsw%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 https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/CAFwN1urVA5dAAKX2M06Ftny8BE8e9uVWTXKr6LFs-
>> 5xVim6j-Q%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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CA%2B4-nGpddiY2fxD7papAQEP42f%
> 2B43ZYOuCpXj7fjx_jCpzABXQ%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
h

Re: Cannot install channels

2017-02-09 Thread Robin Lery
Yes that was it. Thank you. Could you please help me understand why this
might have worked before in a earlier different virtual env in the same
vagrant machine?

On Fri, Feb 10, 2017 at 12:28 PM, Andrew Godwin  wrote:

> You don't have the Python development headers installed for your system -
> you can tell this because of this line in the error:
>
> src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or
> directory
>
> If you install your distribution's python header package (e.g. on ubuntu
> it's python-dev) it should resolve the error.
>
> Andrew
>
> On Thu, Feb 9, 2017 at 10:51 PM, Robin Lery  wrote:
>
>> Hi,
>>
>> I already had a django channels in my other virtual env. But since its an
>> older version of channels (0.7.0) I am trying to install a new channel
>> version into my project which is in a different virtual environment inside
>> a a vagrant box.
>>
>> I created a new virtualenv
>>
>>> $ mkvirtualenv newsapp
>>>
>>
>> Install django
>>
>>> $ pip install django
>>>
>>
>> Install channels
>>
>>> $ pip install -U channels
>>>
>>
>> Then I am getting error:
>>
>> Command "/home/vagrant/Envs/newsapp/bin/python -u -c "import setuptools,
>>> tokenize;__file__='/tmp/pip-build-IrzQ_E/twisted/setup.py';f=getattr(tokenize,
>>> 'open', open)(__file__);code=f.read().replace('\r\n',
>>> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
>>> /tmp/pip-ArjPse-record/install-record.txt 
>>> --single-version-externally-managed
>>> --compile --install-headers 
>>> /home/vagrant/Envs/newsapp/include/site/python2.7/twisted"
>>> failed with error code 1 in /tmp/pip-build-IrzQ_E/twisted/
>>
>>
>> Here is link for the full error
>> 
>> Can you please help how to solve this issue?
>>
>> --
>> 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/ms
>> gid/django-users/CA%2B4-nGpCy3g5KD9Q-UctFF3oKuVqtdfTjkW6XuTL
>> BPiH%2BpyTsw%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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAFwN1urVA5dAAKX2M06Ftny8BE8e9
> uVWTXKr6LFs-5xVim6j-Q%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B4-nGpddiY2fxD7papAQEP42f%2B43ZYOuCpXj7fjx_jCpzABXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot install channels

2017-02-09 Thread Andrew Godwin
You don't have the Python development headers installed for your system -
you can tell this because of this line in the error:

src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or
directory

If you install your distribution's python header package (e.g. on ubuntu
it's python-dev) it should resolve the error.

Andrew

On Thu, Feb 9, 2017 at 10:51 PM, Robin Lery  wrote:

> Hi,
>
> I already had a django channels in my other virtual env. But since its an
> older version of channels (0.7.0) I am trying to install a new channel
> version into my project which is in a different virtual environment inside
> a a vagrant box.
>
> I created a new virtualenv
>
>> $ mkvirtualenv newsapp
>>
>
> Install django
>
>> $ pip install django
>>
>
> Install channels
>
>> $ pip install -U channels
>>
>
> Then I am getting error:
>
> Command "/home/vagrant/Envs/newsapp/bin/python -u -c "import setuptools,
>> tokenize;__file__='/tmp/pip-build-IrzQ_E/twisted/setup.py';f=getattr(tokenize,
>> 'open', open)(__file__);code=f.read().replace('\r\n',
>> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
>> /tmp/pip-ArjPse-record/install-record.txt --single-version-externally-managed
>> --compile --install-headers /home/vagrant/Envs/newsapp/
>> include/site/python2.7/twisted" failed with error code 1 in
>> /tmp/pip-build-IrzQ_E/twisted/
>
>
> Here is link for the full error
> 
> Can you please help how to solve this issue?
>
> --
> 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/CA%2B4-nGpCy3g5KD9Q-UctFF3oKuVqtdfTjkW6XuTLBPiH%
> 2BpyTsw%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFwN1urVA5dAAKX2M06Ftny8BE8e9uVWTXKr6LFs-5xVim6j-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Cannot install channels

2017-02-09 Thread Robin Lery
Hi,

I already had a django channels in my other virtual env. But since its an
older version of channels (0.7.0) I am trying to install a new channel
version into my project which is in a different virtual environment inside
a a vagrant box.

I created a new virtualenv

> $ mkvirtualenv newsapp
>

Install django

> $ pip install django
>

Install channels

> $ pip install -U channels
>

Then I am getting error:

Command "/home/vagrant/Envs/newsapp/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-IrzQ_E/twisted/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> /tmp/pip-ArjPse-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/vagrant/Envs/newsapp/include/site/python2.7/twisted" failed with
> error code 1 in /tmp/pip-build-IrzQ_E/twisted/


Here is link for the full error

Can you please help how to solve this issue?

-- 
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/CA%2B4-nGpCy3g5KD9Q-UctFF3oKuVqtdfTjkW6XuTLBPiH%2BpyTsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-09 Thread Brady Lee
 The "polls_choice" table in database file db.sqlite3 has no records, so no 
radio buttons show up.
I manually added 2 records to the "polls_choice" table, then I have the 
radio buttons showed up.


On Tuesday, February 7, 2017 at 6:17:58 PM UTC+8, ludovic coues wrote:
>
> Have you added some choices to the "What's up?" question ? 
>
> What you see is that question.choice_set.all is empty. 
> The following snippet will give you some output: 
>
> {% for choice in question.choice_set.all %} 
>  value="{{ choice.id }}" /> 
> {{ choice.choice_text 
> }} 
> {% empty %} 
> Sorry, no available choices. 
> {% endfor %} 
>
> 2017-02-07 10:12 GMT+01:00 Brady Lee >: 
> > Same issue here, no radio buttons show up. 
> > 
> > ubuntu 16.04.1 LTS 
> > python 3.5.2 
> > django 1.10.5 
> > 
> > I've tried  {{ question|pprint }} and {{ question.choice_set.all|pprint 
> }} 
> > for debugging, got: 
> > 
> >   
> > 
> > Now trying to figure out where the problem is. 
> > 
> > 
> > On Thursday, October 20, 2016 at 11:52:59 PM UTC+8, Othniel Ayinzat 
> wrote: 
> >> 
> >> Hi guys, 
> >>  I have been following the django tutorials up to part 4 on the polls 
> >> application. My details template only displays the vote submit button 
> but 
> >> the radio buttons for making choices won't show. I have been battling 
> with 
> >> this for some hours now and i need help or some pointers. Thanks. Below 
> are 
> >> the code snippets for the polls app. 
> >> 
> >> polls/templates/polls/detail.html 
> >> --- 
> >> {{ question.question_text }} 
> >> {% if error_message %}{{ error_message }}{% 
> endif 
> >> %} 
> >>  
> >> {% csrf_token %} 
> >> {% for choice in question.choice_set.all %} 
> >>  >> value="{{ choice.id }}" /> 
> >> {{ choice.choice_text 
> >> }} 
> >> {% endfor %} 
> >>  
> >>  
> >> 
> >> polls/templates/polls/index.html 
> >> --- 
> >> 
> >> {% if latest_question_list %} 
> >>  
> >> {% for question in latest_question_list %} 
> >> {{ 
> >> question.question_text }} 
> >> {% endfor %} 
> >>  
> >> {% else %} 
> >> No polls are available. 
> >> {% endif %} 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to django-users...@googlegroups.com . 
> > To post to this group, send email to django...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/8a5fe550-62bf-42e5-8dfa-0b3fc8d5d4cf%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
>
> Cordialement, Coues Ludovic 
> +336 148 743 42 
>

-- 
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/5ab09a09-69a6-41f5-85eb-791d514b6350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How install Django in PyCharm Community edition?

2017-02-09 Thread SÅ‚awomir Gontarek
How install Django in PyCharm Community edition?

-- 
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/075e44bf-f5c4-4af3-b341-b4e83c1388b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to configure client side SSL trusted CA certificate ?

2017-02-09 Thread Gang Yang
Hi, Panjah,

Appreciate your help. I've tried all those options, but none worked. It 
turned out that the init script in init.d for the server (written by a 
different party) is using "su -" to start a new login shell clearing all 
env vars. Whatever that was set in the init script and /etc/default/... 
were thrown away. I had to export the REQUESTS_CA_BUNDLE in "-c". But now 
it works. The bottom line is REQUESTS_CA_BUNDLE env var is the way to go if 
you can't use the "verify" parameter in requests.get() code.

Thanks again.
Gang

On Wednesday, February 8, 2017 at 10:03:04 PM UTC-5, Pankaj Singh wrote:

> Hi,
>
> You can put export commands in you daemon script. Look at this 
> stackoverflow answers:
> 1. http://stackoverflow.com/a/3865077/353550
> 2. http://stackoverflow.com/a/27718602/353550
>
> You can also find different ways to set environment variables for 
> supervisord, uwsgi, apache mod_wsgi by Google Search 
> 
> .
>
> I hope it helps solve your problem.
>
> On Thu, Feb 9, 2017 at 3:07 AM, Gang Yang 
> > wrote:
>
>> Hi, Pankaj,
>>
>> Thanks for the reply. The REQUESTS_CA_BUNDLE env var worked as long as I 
>> start the server manually. But I don't seem to be able to "export" this env 
>> var into the server daemon process, which is started from /etc/init.d. I'll 
>> keep digging on the daemon env var.
>>
>> Gang
>>
>> On Wednesday, February 8, 2017 at 5:08:44 AM UTC-5, Pankaj Singh wrote:
>>
>>> Hi,
>>>
>>> My question is where does SSL client code get the trusted CA 
 certificates from, from Django, Python or the underlying OS?
>>>
>>>
>>> As per official documentation of requests 
>>>  
>>> library:
>>>
>>> By default, Requests bundles a set of root CAs that it trusts, sourced 
 from the Mozilla trust store. However, these are only updated once for 
 each 
 Requests version. This means that if you pin a Requests version your 
 certificates can become extremely out of date.

>>>  
>>>
>>> From Requests version 2.4.0 onwards, Requests will attempt to use 
 certificates from certifi if it is present on the system. This allows for 
 users to update their trusted certificates without having to change the 
 code that runs on their system.

>>>  
>>>
>>> For the sake of security we recommend upgrading certifi frequently!
>>>
>>>
>>> You can read more about certifi on it's official docs page 
>>> .
>>>
>>> What configuration do I need in order for the SSL client to conduct the 
 SSL handshake successfully?
>>>
>>>
>>> You can set REQUESTS_CA_BUNDLE 
>>> 
>>>  environment 
>>> variable pointing to .cert file and it will pick it from there.
>>>
>>> If you have just one `.crt` file which is self signed then you can do 
>>> following
>>>
>>> export REQUESTS_CA_BUNDLE='~/Download/bar.example.com.cert'
>>>
>>>
>>> But if you have multiple certificates which are self signed then you can 
>>> put them in a folder and set the folder path in environment variable. In 
>>> case of a folder, make sure to run c_rehash 
>>>  command for 
>>> folder.
>>>
>>> mkdir -p /tmp/custom-certs
>>> cp ~/Download/foo.example.com.cert /tmp/custom-certs
>>> cp ~/Download/bar.example.com.cert /tmp/custom-certsexport 
>>> REQUESTS_CA_BUNDLE='/tmp/custom-certs'
>>>
>>>
>>> Relevant source code in requests library: 
>>> https://github.com/kennethreitz/requests/blob/v2.13.0/requests/sessions.py#L658-L662
>>>
>>>
>>> On Tue, Feb 7, 2017 at 10:30 PM, Gang Yang  wrote:
>>>
 Hi,

 I'm pretty new to Django and encountered some client side SSL issue. 
 I'm trying to use django-cas-ng (CAS client) to do CAS authentication and 
 the CAS server is using a self-signed server certificate. After obtaining 
 the service ticket (ST), django-cas-ng tried to verify the ST by calling 
 requests.get(...) and failed with CERTIFICATE_VERIFY_FAILED error. 
 Following some suggestions on the internet, I've tried to modify 
 django-cas-ng's code to call requests.get(..) with verify parameter, such 
 as requests.get(..., verify=False) and requests.get(..., verify="CAS 
 server 
 cert"). Both workarounds worked, but I can't change third-party package 
 code. I also tried to add the CAS server cert to the underlying OS 
 (Windows 
 2008 and CentOS 6.7), but it did not help.

 My question is where does SSL client code get the trusted CA 
 certificates from, from Django, Python or the underlying OS? What 
 configuration do I need in order for the SSL client to conduct the SSL 
 handshake successfully?

 Appreciate any help!

 Gang

 -- 
 You received this message because y

Re: Django Subdomains

2017-02-09 Thread Omar Sarmiento Rolo
I have been able to download the project yet because of my internet
conecction, I will, and after I write about it, thanks

2017-02-09 17:14 GMT+01:00 Uri Even-Chen :

> in Speedy Net we have a subdomain for each language, you can see how it
> works. Only the domain (speedy.net) is defined in the database, any
> subdomain redirects to one of the defined subdomains. You can check your
> database for username and display data according to the user when the
> subdomain is a username on your system (or any subdomain you define per
> user).
>
> https://github.com/urievenchen/speedy-net
>
>
> *Uri Even-Chen*
> [image: photo] Phone: +972-54-3995700
> Email: u...@speedy.net
> Website: http://www.speedysoftware.com/uri/en/
> 
> 
>   
> 
>
> On Thu, Feb 9, 2017 at 5:43 PM, Omar Sarmiento Rolo  > wrote:
>
>> Hi, I need to make in my web dinamic subdomain, a subdomain for each
>> user, but I have no idea how make it
>>
>> I am using the Site Framework but it does work for subdomain, just
>> Domain, at least for me!, I am using Django 1.10 in Windows 7, I have been
>> seing the django-subdomains but it does work for Django 1.10, some idea? I
>> dont know what to do, grettings
>>
>> --
>> 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/ms
>> gid/django-users/eb2ae5f6-ca34-415c-8e6f-a7e094d080db%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/CAMQ2MsEy9QyN5vh43i44g3WUOzkz-
> K3nFcSBdjhiFeaHtZbreA%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOw1d1exy1FxieWu24b3nVSghTKcGyVOc0g1KU9HsNBOWA56EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Subdomains

2017-02-09 Thread Uri Even-Chen
in Speedy Net we have a subdomain for each language, you can see how it
works. Only the domain (speedy.net) is defined in the database, any
subdomain redirects to one of the defined subdomains. You can check your
database for username and display data according to the user when the
subdomain is a username on your system (or any subdomain you define per
user).

https://github.com/urievenchen/speedy-net


*Uri Even-Chen*
[image: photo] Phone: +972-54-3995700
Email: u...@speedy.net
Website: http://www.speedysoftware.com/uri/en/
  
    


On Thu, Feb 9, 2017 at 5:43 PM, Omar Sarmiento Rolo 
wrote:

> Hi, I need to make in my web dinamic subdomain, a subdomain for each user,
> but I have no idea how make it
>
> I am using the Site Framework but it does work for subdomain, just Domain,
> at least for me!, I am using Django 1.10 in Windows 7, I have been seing
> the django-subdomains but it does work for Django 1.10, some idea? I dont
> know what to do, grettings
>
> --
> 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/eb2ae5f6-ca34-415c-8e6f-a7e094d080db%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/CAMQ2MsEy9QyN5vh43i44g3WUOzkz-K3nFcSBdjhiFeaHtZbreA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Subdomains

2017-02-09 Thread Omar Sarmiento Rolo
Hi, I need to make in my web dinamic subdomain, a subdomain for each user, 
but I have no idea how make it

I am using the Site Framework but it does work for subdomain, just Domain, 
at least for me!, I am using Django 1.10 in Windows 7, I have been seing 
the django-subdomains but it does work for Django 1.10, some idea? I dont 
know what to do, grettings

-- 
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/eb2ae5f6-ca34-415c-8e6f-a7e094d080db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: No installed app with label 'province'.

2017-02-09 Thread Florian Schweikert
On 09/02/17 14:01, Gerald Brown wrote:
> Because of this problem I am NOT able to proceed with my project so any
> and all help will be appreciated.

Maybe somebody could help you if you provide more information about what
you are doing.

Following information could give some starting points for investigating
the problem:
* What does you INSTALLED_APPS look like?
* The code of your ModelAdmin wogether with where you trying to register
it. (including imports)
* Are your models working correctly? Did creating migrations and
applying them work?

--
regards,
Florian

-- 
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/ef15bc9b-d61a-1c13-a394-ff4f1a5fd86d%40ist-total.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: No installed app with label 'province'.

2017-02-09 Thread Gerald Brown


On Wednesday, February 8, 2017 at 7:09:12 AM UTC+8, Gerald Brown wrote:
>
> I have just started an app on Ubuntu 16.04 Server using Python 3.5 and 
> Django 1.10.5.
>
> When I do "@admin.register(Province)" in my admin.py file I get the error 
> that is the subject of this post.
>
> Of course there is NO app with label of 'province' as that is the label of 
> a 'Model'.
>
> Why is Django trying to register an app instead of the Model?
>
> Thanks,
>
> Gerald
>
> I am still not able to solve this problem.  I tried deleting Django 1.10.5 
> and installing 1.8.17 & also 1.11a1 all with the same results.  I have 
> studied several tutorials which all same to use the same code "from .models 
> import ModelName, then admin.site.register(ModelName)" When I do that and 
> restart the server and go to 127.0.0.1/admin/ in my browser it gives me the 
> error: "LookupError at /admin/ 
>
> No installed app with label 'visits'." 
>
>  If I comment out  the statement "admin.site.register(ModelName", restart 
the server and then open the browser it brings up the screen to log-in if I 
am currently not logged-in, otherwise it brings up the admin page, of 
course with out the models.

Because of this problem I am NOT able to proceed with my project so any and 
all help will be appreciated.

Thanks  

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