Re: Django-hotsauce 0.9.2 roadmap

2018-03-28 Thread Etienne Robillard

Sorry, I meant uWSGI 2.0.17 in my initial post.

Etienne


Le 2018-03-27 à 07:45, Etienne Robillard a écrit :

Hi,

I'm planning to release a new version of Django-hotsauce (0.9.2) but 
i'm short in ideas about extending the toolkit in new ways.


Here's what I got so far:

1. PyPy 5.10.0 support

2. uWSGI 0.2.16 support

I would like to know if supporting Django 2.0 is really a must. I was 
considering the possibility of sticking with Django 1.11 in the LTS 
(stable) branch and probably include experimental Django 2.0 support 
in the 0.9.2 release.


What do you think?

Etienne




--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/16ed2c0c-b4b9-ffa1-6058-6604c7755f5f%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce 0.9.2 roadmap

2018-03-27 Thread Etienne Robillard

Hi,

I'm planning to release a new version of Django-hotsauce (0.9.2) but i'm 
short in ideas about extending the toolkit in new ways.


Here's what I got so far:

1. PyPy 5.10.0 support

2. uWSGI 0.2.16 support

I would like to know if supporting Django 2.0 is really a must. I was 
considering the possibility of sticking with Django 1.11 in the LTS 
(stable) branch and probably include experimental Django 2.0 support in 
the 0.9.2 release.


What do you think?

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/7ef08558-4469-8f7d-8811-379f428c3906%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advertising a new Django open source project?

2018-03-25 Thread Etienne Robillard

Hi Simon,

You can also consider setting up a official website for your project.

Regards,

Etienne


Le 2018-03-24 à 15:13, 'Simon Connah' via Django users a écrit :

Hi,

First of all, I am sorry because I know that this is off-topic but I 
couldn't think of a better place to ask the question.


I'm in the process of developing a cross between a blog, a media 
gallery and some essential e-commerce features which is designed for 
end users rather than other Django developers (much like Wordpress is 
although I am not saying my project is going to be anything like 
Wordpress). I want to advertise the project so that other people can 
help with its development and offer ideas on features as well as use 
it if they want to.


I have no idea where to advertise my open source project? Is there a 
decent place to make people aware of what I am doing? I'm fine doing 
all the backend tasks, but it would be great to have some help on the 
frontend design aspects. I can handle the JavaScript as well. I'm just 
not so hot on CSS.


Any help is appreciated.

Simon.
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1400150805.2759758.1521918783407%40mail.yahoo.com 
<https://groups.google.com/d/msgid/django-users/1400150805.2759758.1521918783407%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/d9f5e8ef-826f-f5dc-1f4b-99e8f14fdb72%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Dealing with templates in an open source Django project?

2018-03-19 Thread Etienne Robillard

Hey man,

First of all you're definitely not stupid. :-)

Second, I think you're starting pretty well to understand what I'm 
trying to explain.


I do admit however that I haven't myself experimented with this type of 
functionality, but I really think it should be possible to define some 
specific Django models to let the user customize the look and feel of 
your interface via the admin site.


You could start progressively by letting the user choose from a list a 
custom CSS file to use for its blogging site.


Then you could perhaps let the user choose a specific header and footer 
for his theme.


There's no limit in what you can do.

Just let your imagination flows in and use your Django programming 
skills to let your users manage their blogging site the way they want.


You could even define some specific Javascript fields for allowing users 
to enable or disable some more advanced functionality...


Anyways, that's all I can think off right now...

Have fun,

Etienne


Le 2018-03-19 à 09:55, 'Simon Connah' via Django users a écrit :

Hi Etienne,

Thank you for your reply. I have to apologise because I think I am a 
bit stupid. I'm not sure what you mean.


I think I might understand what you mean to a degree, but I'm not sure 
how to go about it. In effect, I should layout a basic template for 
general use and then create admin views which allow users to customise 
the specifics of the templates. Is that what you meant?


If it is, then it is indeed an interesting idea I hadn't considered. 
I'm not entirely sure how I would go about doing that at the moment. 
I'd have to think.


If you meant something else, then please let me know if I have 
misunderstood what you mean.


Simon.
On Sunday, 18 March 2018, 23:39:47 GMT, Etienne Robillard 
 wrote:



Hi Simon,

I'll try to help you out with that.

Have you considered using Django models to allow end users to create, 
edit and customize templates within the Django admin?


This should be pretty easy to do.

All you need is to define some models for your customized templates 
and then the user can configure the styling within the Django admin.


HTH,

Etienne


Le 2018-03-18 à 18:21, 'Simon Connah' via Django users a écrit :

Hi,

First of all apologies for posting two messages to this list in a 
couple of days but I've just got back into Django after a rather long 
break, and it is taking me a little time to get back in the swing of 
things.


I'm in the process of making a simple blogging platform which I 
intend to release as an open source project. It is not designed to be 
a reusable app used by other Django. Instead, it is intended to be an 
all in one blogging solution for end users to install and use much 
like they do with something like Wordpress.


There is one major problem though that I don't know the answer. As I 
am building the blogging platform, I am of course writing my 
templates to make sure that everything is working correctly. But a 
side issue with that is that the templates now contain phrases 
related to the website I intend to create when the blogging platform 
is at a reasonable stage of development.


Now, when I open up the Git repository to the public, and people 
start using they are going to get the templates that I have already 
created. That will mean that they'll either need to go through them 
all individually (I doubt they will have heard of grep or similar 
tools) or just delete them all and start from scratch.


What I would like to see is people release their styles that can then 
be customised based on my model, form, view architecture and then 
they can do what they want with the templates. As long as I document 
the variables used in the templates that shouldn't cause too many 
problems.


In effect then I have two options. Distribute the code with my 
already existing templates or have a private repository with my 
templates and a public repository with no templates and documentation 
on how to create the templates and either make some styles myself or 
hope that someone else does.


Ideally, I'd like it to work a little bit like Wordpress where you 
can install a style very easily I'm just not sure how to go about 
doing that.


How would you go about this problem? I am both trying to make a 
blogging platform for my use while at the same time keeping it 
reasonably open so other people can use it as well. I'm probably 
missing something obvious here, but I'd appreciate some advice before 
I get too far into the project so any changes that need to be made 
will be smaller.


Thank you.

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

Re: Dealing with templates in an open source Django project?

2018-03-18 Thread Etienne Robillard

Hi Simon,

I'll try to help you out with that.

Have you considered using Django models to allow end users to create, 
edit and customize templates within the Django admin?


This should be pretty easy to do.

All you need is to define some models for your customized templates and 
then the user can configure the styling within the Django admin.


HTH,

Etienne


Le 2018-03-18 à 18:21, 'Simon Connah' via Django users a écrit :

Hi,

First of all apologies for posting two messages to this list in a 
couple of days but I've just got back into Django after a rather long 
break, and it is taking me a little time to get back in the swing of 
things.


I'm in the process of making a simple blogging platform which I intend 
to release as an open source project. It is not designed to be a 
reusable app used by other Django. Instead, it is intended to be an 
all in one blogging solution for end users to install and use much 
like they do with something like Wordpress.


There is one major problem though that I don't know the answer. As I 
am building the blogging platform, I am of course writing my templates 
to make sure that everything is working correctly. But a side issue 
with that is that the templates now contain phrases related to the 
website I intend to create when the blogging platform is at a 
reasonable stage of development.


Now, when I open up the Git repository to the public, and people start 
using they are going to get the templates that I have already created. 
That will mean that they'll either need to go through them all 
individually (I doubt they will have heard of grep or similar tools) 
or just delete them all and start from scratch.


What I would like to see is people release their styles that can then 
be customised based on my model, form, view architecture and then they 
can do what they want with the templates. As long as I document the 
variables used in the templates that shouldn't cause too many problems.


In effect then I have two options. Distribute the code with my already 
existing templates or have a private repository with my templates and 
a public repository with no templates and documentation on how to 
create the templates and either make some styles myself or hope that 
someone else does.


Ideally, I'd like it to work a little bit like Wordpress where you can 
install a style very easily I'm just not sure how to go about doing that.


How would you go about this problem? I am both trying to make a 
blogging platform for my use while at the same time keeping it 
reasonably open so other people can use it as well. I'm probably 
missing something obvious here, but I'd appreciate some advice before 
I get too far into the project so any changes that need to be made 
will be smaller.


Thank you.

Simon.
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1385218970.2358644.1521411671572%40mail.yahoo.com 
<https://groups.google.com/d/msgid/django-users/1385218970.2358644.1521411671572%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/cda864be-eb13-57ba-b79b-6fb1c5be2c7f%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: I NEED HELP PLEASE

2018-03-16 Thread Etienne Robillard

Hi Daniella,

Next time you want to ask us something, please drop the caps lock key.

Etienne


Le 2018-03-16 à 11:53, Daniella a écrit :
PLEASE I AM NEW TO DJANGO FRAME WORK. PLEASE CAN SOMEONE PUT ME 
THROUGH ON HOW TO GET STARTED, USING IT TO DEVELOP A WEBSITE AND WEB 
APPLICATION. THANKS IN ANTICIPATION

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e34ff9eb-f605-4b3a-a0a9-f319b4955183%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/e34ff9eb-f605-4b3a-a0a9-f319b4955183%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/84149222-e9c2-be50-3730-90901a9df965%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: import file from view.py

2018-03-14 Thread Etienne Robillard

show us some code man :-)

Etienne


Le 2018-03-13 à 21:06, sum abiut a écrit :
I have a conf file containing the parameter of 
hostmane,db,usernam,pass, db


i want to import that file from view.py and use parameter from the 
conf file to connect to a db.


i did something this from appname.conf import but it doesn't seem to 
work, appreciate any assistance.


cheers
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPCf-y5Og0o5yb_e%3D6ggLjS%2BOtDyZFUoqe_9KYZLbC1w72g7MA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAPCf-y5Og0o5yb_e%3D6ggLjS%2BOtDyZFUoqe_9KYZLbC1w72g7MA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/0adc8019-5003-ecf4-0ee7-24b8f6e4bc89%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Industrial Analytics

2018-02-25 Thread Etienne Robillard

Hi Raj,

Can you please give us a little background on what is industrial analytics?

Thank you,

Etienne


Le 2018-02-25 à 10:12, Raj a écrit :

Dear All,

Can we use  Django for  Industrial Analytics ? . Where data volume is 
huge & with frequency in Mill seconds.


Can someone name some examples of such industrial analytics 
application developed using Django.


Thanks,
Raj

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9ef756da-8b50-4575-9c54-17830f277b51%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/9ef756da-8b50-4575-9c54-17830f277b51%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/918cc308-ba6e-a71c-3a21-0da8f7840598%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce 0.9.1 release

2018-02-22 Thread Etienne Robillard

Hi everyone,

I'm glad to announce the release of Django-hotsauce 0.9.1: 
https://www.isotopesoftware.ca/pub/django-hotsauce/django-hotsauce-0.9.1.tar.gz


This is primarly a bugfix release for PyPy.

Users of django-hotsauce are encouraged to test this release (with PyPy 
or Python 3) and submit bug reports here: 
https://bitbucket.org/tkadm30/django-hotsauce/issues


For any questions or comments related to this project, please join the 
mailing list: https://groups.google.com/forum/#!forum/django-hotsauce



Best regards,

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/360afe69-123c-d87d-fbd2-99f8db26eb8a%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Initializing DateTimeField in django forms.

2018-02-19 Thread Etienne Robillard
en %}
Date:
    {{ form.date }}
    {{ form.username.label}}
    {{ form.username }}

    {{ form.mobilenos.label}}
    {{ form.mobilenos}}



|

I would like to initialize the *date *so that it is automatically
set to today's date when the page loads.
All suggestions are welcomed.

Regards,

Rajkumar


On Monday, February 19, 2018 at 7:52:05 PM UTC+5:30, prince gosavi wrote:

Hi,

I am building a simple django application for user feedback. And I
have created a form for that purpose.

Here is the snippet:
|
# my_app/forms.py

fromdjango importforms
importdatetime
classUserQueryForm(forms.Form):
    date =forms.DateField(initial=datetime.date.today)# need help
    username =forms.CharField(label='Username:',max_length=15)
    mobilenos =forms.CharField(max_length=10,label='Mobile Nos')

|

And here is my template:
|


    {% csrf_token %}
Date:
    {{ form.date }}
    {{ form.username.label}}
    {{ form.username }}

    {{ form.mobilenos.label}}
    {{ form.mobilenos}}



|

I would like to initialize the *date *so that it is automatically
set to today's date when the page loads.
All suggestions are welcomed.

Regards,

Rajkumar

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e4f14993-12fc-4314-b456-155dbd876772%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/e4f14993-12fc-4314-b456-155dbd876772%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/5608f3f8-abca-879c-08c1-e78b4f4b85ce%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Initializing DateTimeField in django forms.

2018-02-19 Thread Etienne Robillard

How does your view looks like?

Etienne


Le 2018-02-19 à 09:18, prince gosavi a écrit :

Hi,

I am building a simple django application for user feedback. And I 
have created a form for that purpose.


Here is the snippet:
|
# my_app/forms.py

fromdjango importforms
importdatetime
classUserQueryForm(forms.Form):
    date =forms.DateField(initial=datetime.date.today)# need help
    username =forms.CharField(label='Username:',max_length=15)
    mobilenos =forms.CharField(max_length=10,label='Mobile Nos')

|

And here is my template:
|


    {% csrf_token %}
Date:
    {{ form.date }}
    {{ form.username.label}}
    {{ form.username }}

    {{ form.mobilenos.label}}
    {{ form.mobilenos}}



|

I would like to initialize the *date *so that it is automatically set 
to today's date when the page loads.

All suggestions are welcomed.

Regards,

Rajkumar
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a5a9a34f-f21e-48fc-bc3c-7ec25c73b017%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/a5a9a34f-f21e-48fc-bc3c-7ec25c73b017%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f43e5240-32c4-59a3-7a5e-89129fc6a169%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I get a message from views.py ?

2018-02-19 Thread Etienne Robillard
Check this out: 
https://stackoverflow.com/questions/20306981/how-do-i-integrate-ajax-with-django-applications


Etienne


Le 2018-02-19 à 07:12, Mike Ru a écrit :
I don't get how to do it. I need to display a message "Hello world"  
using  framawork messages with Jquery/Ajax

I can do it without Jquery/Ajax but it's not good.
The user clicks the link and depending on a condition or to send him 
according to the reference or to display the message without rebooting 
the page.


Here is my code:
views.py
|
from django.shortcuts import render, HttpResponseRedirect
from django.contrib import messages

def foo(request):
    print('I am foo')
    spam = 0
    if spam != 10:
messages.info(request, 'Hellow world')
        return HttpResponseRedirect('/')
    return render(request, 'app/foo.html')

def index(request):
    return render(request, 'app/index.html')
|

index.html
|
<tt>src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js">

I'm index.html
    link
    

    {% for message in messages %}
        {{ message }}
    {% endfor %}
|

foo.html
|
 I am link.html
|

How can I do it with Jquery/Ajax? Help me, please!
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86dffe89-0338-475e-a196-d3cb18ff651c%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/86dffe89-0338-475e-a196-d3cb18ff651c%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f4228775-75d7-43a9-7953-c2ae3bddac56%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Stripe problem: InvalidRequestError: This customer has no attached payment source

2018-02-18 Thread Etienne Robillard
aiseerr
InvalidRequestError:Requestreq_o39ceLlhtpJmmr:Thiscustomer has 
noattached payment source

|


How do I attach a payment source to the customer? Since I'm testing, I 
use the testing credit card, which has the number `4242 4242 4242 4242`.

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8b0bdaf5-1daf-41bb-a09b-23b67c59559f%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/8b0bdaf5-1daf-41bb-a09b-23b67c59559f%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/7286c9a2-80d9-351a-f65e-18b50540e883%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error with django-admin.py

2018-02-17 Thread Etienne Robillard

Please send the actual traceback and error message.

Etienne

Le 2018-02-17 à 11:59, Tet Yeap a écrit :

Hi,

    I was trying to crate a django project using "django-admin.py 
startproject mysite". The a message showed up in notepad


"#!C:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\python.exe
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()

    I am using Django 2.0, Python 3.6. Both programs run on Windows 8.

    Do anyone know what is wrong? Tx.


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7eef68cc-5480-4a3a-b0b8-11a97044ca0d%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/7eef68cc-5480-4a3a-b0b8-11a97044ca0d%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/c2bb8c02-ea56-e083-af0e-a5d158ec582a%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Noob question: Is the User model compatible with subscription-style website?

2018-02-15 Thread Etienne Robillard



Le 2018-02-15 à 01:17, Tom Tanner a écrit :
I'm working on a Django-powered subscription website with a 
Django-powered CMS backend. Can the User model, or a derived class, be 
made to be compatible with this idea? In my case, I want to store a 
user's username, password, and subscription ID.

Yes.


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/da4f96f9-95cd-4b23-b4d2-842ef3649226%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/da4f96f9-95cd-4b23-b4d2-842ef3649226%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f774e048-7889-d2fe-5623-e545ad4b6ac7%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread Etienne Robillard
2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM

<https://groups.google.com/d/msgid/django-users/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.


For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA6wQLJCkd0B-0ep8jrUFk1QUp%3D_jQ_AuundhzBMwOSYf7h4fg%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAA6wQLJCkd0B-0ep8jrUFk1QUp%3D_jQ_AuundhzBMwOSYf7h4fg%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 
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/AM5P193MB008390FC972C3F8D22B625968CF50%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM 
<https://groups.google.com/d/msgid/django-users/AM5P193MB008390FC972C3F8D22B625968CF50%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/ed7db509-0af4-6092-a8f9-c604287b15f6%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce 1.0 commercial edition looking for beta testers!

2018-02-13 Thread Etienne Robillard

Hello everyone,

Django-hotsauce 1.0 commercial edition (LTS) is now available for 
preorder :)


Checkout: https://www.livestore.ca/product/django-hotsauce/

I'm also looking for expert Django and Python programmers to test and 
review the design and API of Django-hotsauce 1.0 commercial edition in 
order to develop a low-cost, high-performance, Django alternative 
microframework to develop scalable web apps in Python and WSGI. 
Furthermore, i will always be happy to support a free version of 
Django-hotsauce in order to drive the development and research of 
Python/Django web programming. :)


Final note, the Paypal payment gateway is experimental. I might one day 
decide to switch to monero or flashcoin... I'm not really sure it's a 
good idea yet.


What do you think?

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/21340642-c3ef-c50e-e49b-6c86c8e8849a%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Json data from javascript

2018-02-13 Thread Etienne Robillard
I'm not really sure what you meant here. Anyways, there's plenty of good 
JS frameworks like jQuery to allow you to write Ajax functions to send a 
JSON array for post-processing in Django.


Etienne

Le 2018-02-13 à 08:34, Shazia Nusrat a écrit :
Can you please show me any example about the structure of code I've 
provided?


Thanks

On Tue, Feb 13, 2018 at 2:27 AM, Etienne Robillard <mailto:tkad...@yandex.com>> wrote:


Hi Shazia,

You can make a XHR (Ajax) request in javascript to send the data
to a django callback.

HTH,

Etienne


Le 2018-02-12 à 18:04, Shazia Nusrat a écrit :

Hi,

Below is the code for Javascript from Django template Google Maps
API. I need to be able to save this in my Django models with JSON
response. I am new user so an example will be really a great help.

Precisely I need to be able to save coordinates like latitude and
longitude and then convert it to an address.

Thanks
varmap,infoWindow;functioninitMap(){        map
=newgoogle.maps.Map(document.getElementById('map'),{         
center:{lat:-34.397,lng:150.644},          zoom:6});       
infoWindow =newgoogle.maps.InfoWindow;// Try HTML5
geolocation.if(navigator.geolocation){         
navigator.geolocation.getCurrentPosition(function(position){varpos
={              lat:position.coords.latitude,             
lng:position.coords.longitude };           
infoWindow.setPosition(pos);           
infoWindow.setContent('Location found.');           
infoWindow.open(map);           
map.setCenter(pos);},function(){           
handleLocationError(true,infoWindow,map.getCenter());});}else{//
Browser doesn't support Geolocation         

handleLocationError(false,infoWindow,map.getCenter());}}functionhandleLocationError(browserHasGeolocation,infoWindow,pos){
 
      infoWindow.setPosition(pos);       
infoWindow.setContent(browserHasGeolocation ?'Error: The
Geolocation service failed.':'Error: Your browser doesn\'t
support geolocation.');        infoWindow.open(map);}

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAD83tOzabkiPgniqofN6BH2tLogeiGE9JaZ5rppi3f44Hb0ybA%40mail.gmail.com

<https://groups.google.com/d/msgid/django-users/CAD83tOzabkiPgniqofN6BH2tLogeiGE9JaZ5rppi3f44Hb0ybA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>




--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/42a3efaf-7a67-b436-d297-be9d3dfcdad7%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Json data from javascript

2018-02-13 Thread Etienne Robillard

Hi Shazia,

You can make a XHR (Ajax) request in javascript to send the data to a 
django callback.


HTH,

Etienne


Le 2018-02-12 à 18:04, Shazia Nusrat a écrit :

Hi,

Below is the code for Javascript from Django template Google Maps API. 
I need to be able to save this in my Django models with JSON response. 
I am new user so an example will be really a great help.


Precisely I need to be able to save coordinates like latitude and 
longitude and then convert it to an address.


Thanks
varmap,infoWindow;functioninitMap(){        map 
=newgoogle.maps.Map(document.getElementById('map'),{          
center:{lat:-34.397,lng:150.644},          zoom:6});        infoWindow 
=newgoogle.maps.InfoWindow;// Try HTML5 
geolocation.if(navigator.geolocation){          
navigator.geolocation.getCurrentPosition(function(position){varpos ={  
            lat:position.coords.latitude,              
lng:position.coords.longitude };            
infoWindow.setPosition(pos);            
infoWindow.setContent('Location found.');            
infoWindow.open(map);            map.setCenter(pos);},function(){      
      handleLocationError(true,infoWindow,map.getCenter());});}else{// 
Browser doesn't support Geolocation          
handleLocationError(false,infoWindow,map.getCenter());}}functionhandleLocationError(browserHasGeolocation,infoWindow,pos){  
      infoWindow.setPosition(pos);        
infoWindow.setContent(browserHasGeolocation ?'Error: The Geolocation 
service failed.':'Error: Your browser doesn\'t support 
geolocation.');        infoWindow.open(map);}


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD83tOzabkiPgniqofN6BH2tLogeiGE9JaZ5rppi3f44Hb0ybA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAD83tOzabkiPgniqofN6BH2tLogeiGE9JaZ5rppi3f44Hb0ybA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/e87c4a18-519e-5264-00cb-65d3203048bd%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I move a project from one computer to another?

2018-02-12 Thread Etienne Robillard

Hi,

you can use rsync for your project's source code.

Etienne


Le 2018-02-12 à 19:09, Tom Tanner a écrit :
I have a Django project that I want to work on with another computer. 
Do I need to backup my current project's Postgres database and restore 
it on the other computer's Postgres database to get my project up and 
running there? Or is there a Django way to do this?

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/c050701e-c4ac-d9e7-2931-a3d11540f144%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to install and use Django

2018-02-12 Thread Etienne Robillard

Hi Mirek,

That's a good point. But for debugging and development purposes, i 
prefer using mercurial or git to upgrade my packages. Also, having 
access to the source tree while developing your app makes debugging more 
convenient than with the python eggs format.


Cheers,

Etienne


Le 2018-02-12 à 09:51, Mirek Zvolsky a écrit :

Hallo Etienne.

System Python and system python modules are provided for all system 
applications written in Python (made compatible with distributed 
python+modules versions).


Of course you can use it for your applications too, however you have 
no control over system upgrades. After a system upgrade you must 
always check which python modules were upgraded, and then make sure 
that ALL YOUR PYTHON APPS are still compatible with new versions. 
Maybe you can just say "ok, my tests have still passed", however I'm 
not sure that this is very liable.


With Virtualenv you run always your application(s) so as you have them 
developped and debugged. You can upgrade versions only when YOU DECIDE 
TO DO SO.


And Virtualenv is so easy today with Python 3! No installation at all:

python3 -m venv ve_application/
. ve_application/bin/activate

That's definitely all.
And you can generate the requirements file: pip freeze > requirements.txt
And you can reinstall all dependencies into a new environment with 
single command: pip install -r requirements.txt



Dne sobota 10. února 2018 11:56:00 UTC+1 Etienne Robillard napsal(a):

Salut Pascual,


Le 2018-02-10 à 05:47, PASCUAL Eric a écrit :


If virtualenv is to be avoided /(which I do not recommend anyway,
especially for a newbie, since it protects him from breaking his
Python system installation)/, my advice would be to go with:


$ python setup.py install *--user*



You're not going to break your Python setup just by installing a
package with distutils/setuptools. ;-)

In fact, the purpose of site-packages and dist-packages
directories is to provide a logical layout for Python packages.
There's no need in my opinion to not install Django in a standard
location.

Best regards,
Etienne

-- 
Etienne Robillard

tka...@yandex.com 
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6d034405-1eaf-4856-89fc-3d10c10c277b%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/6d034405-1eaf-4856-89fc-3d10c10c277b%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/7000639c-8815-0bec-b448-bce979eaf231%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch error raise when adding a new entry in django admin

2018-02-12 Thread Etienne Robillard
100, 
null=True, blank=True)
scope = models.CharField(verbose_name='出题范围', 
help_text='老师的出题范围,仅对老师角色有效', max_length=100, null=True, 
blank=True)
title = models.PositiveIntegerField(verbose_name='头衔级别', null=False, 
blank=False, default=1, db_index=True)

### promotion and relation ###
promotioncode = PromotionCodeField(verbose_name='推荐码', 
help_text='用于推荐其他用户或者老师', null=True, blank=True)
broker_promote = UIDField(verbose_name='推荐者用户ID', null=True, 
blank=True, db_index=True)
broker_firstserve = UIDField(verbose_name='首服老师用户ID', null=True, 
blank=True, db_index=True)


class Meta:
verbose_name = '用户信息'
verbose_name_plural = '用户信息'
*---here is the admin class---*
class UserProfileAdmin(admin.ModelAdmin):
# list page
list_display = ('date_joined', 'uid', 'user', 'tel', 'imuid', 
'nickname', 'role', 'city', 'level', 'title', 'status', 
'promotioncode', 'broker_promote', 'broker_firstserve', )

list_display_links = ('uid', )
ordering = ('uid', )
search_fields = [
'=uid',
'=tel',
'nickname',
'user__username',
]
list_filter = ('role', 'city', 'level', 'title', 'status', )
def date_joined(self, obj):
return obj.user.date_joined
date_joined.admin_order_field = 'user__date_joined'
date_joined.short_description = '注册日期'
def save_model(self, request, obj, form, change):
if not obj.broker_promote:
obj.broker_promote = None
if not obj.broker_firstserve:
obj.broker_firstserve = None
super(UserProfileAdmin, self).save_model(request, obj, form, change)
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/76957a17-da3e-40c4-ba2b-2de780f2da4e%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/76957a17-da3e-40c4-ba2b-2de780f2da4e%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/a915066a-0abf-f29e-f081-237f863925d7%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Integration between Two apps , Using Django Model

2018-02-11 Thread Etienne Robillard

Hi Dawar,

You might want to check if you have __init__.py in your Taste and 
Taste.TasteApp modules.


HTH,

Etienne


Le 2018-02-11 à 06:45, Dawar Sohail a écrit :



want to import Django app models into another Django app, But I can 
import these models into another app models or view, Plese help me, 
<https://lh3.googleusercontent.com/-XNY5GF2mHXw/WoAsppWaGzI/B-g/L8LRj17B87EFqhrUJSk1jO7uPrCdj05OgCLcBGAs/s1600/Screenshot%2B%252824%2529.png>


<https://lh3.googleusercontent.com/-0jNAWycum-4/WoAsirTsxSI/B-c/HxQycUV9vXYKwps9skEFgNpRUyzenckvACLcBGAs/s1600/Screenshot%2B%252823%2529.png>

<https://lh3.googleusercontent.com/-91PF5qKDFso/WoAsfMSeUyI/B-Y/NB3VaogXDRcBiiSNISwAzV-YK1DFPeO3wCLcBGAs/s1600/Screenshot%2B%252822%2529.png>


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e931dc2d-b981-41c7-85e8-22d30d71af2c%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/e931dc2d-b981-41c7-85e8-22d30d71af2c%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/fd587b09-e0f6-5ee4-2d46-d26d686fdad7%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce update

2018-02-10 Thread Etienne Robillard

Hi everyone,

I've decided to split the development of Django-hotsauce in 2 distinct 
branches:


- Django-hotsauce 0.8.x LTS: This is the main stable branch, for 
security fixes and maintenance, supporting Django 1.11, Python 2.7 and 
3.5, and the gevent loop engine for uWSGI. It also requires Cython to 
work. The upcoming commercial edition of django-hotsauce 1.0 will be 
most likely based on this branch.


- Django-hotsauce 0.9.x: This is the development and unstable branch of 
django-hotsauce, based on PyPy 5.9.


If you or your company would be interested in beta testing 
Django-hotsauce 1.0 commercial edition, I would love to hear back from you!


Sincerely,

Etienne


--
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/0d773c63-77c2-49f3-614d-dc1f403da78d%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to install and use Django

2018-02-10 Thread Etienne Robillard

Salut Pascual,


Le 2018-02-10 à 05:47, PASCUAL Eric a écrit :


If virtualenv is to be avoided /(which I do not recommend anyway, 
especially for a newbie, since it protects him from breaking his 
Python system installation)/, my advice would be to go with:



$ python setup.py install *--user*



You're not going to break your Python setup just by installing a package 
with distutils/setuptools. ;-)


In fact, the purpose of site-packages and dist-packages directories is 
to provide a logical layout for Python packages.

There's no need in my opinion to not install Django in a standard location.

Best regards,
Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/94c388f3-d2be-2830-d3c6-d7d7557388f7%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: hi

2018-02-10 Thread Etienne Robillard

Is it too hard for you to say something meaningful about django?

Please stop spamming.

Etienne


Le 2018-02-10 à 03:52, Rakhee Menon a écrit :

dfgdf --
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f4d896a1-5040-480d-a692-3876fd946e9f%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/f4d896a1-5040-480d-a692-3876fd946e9f%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/d097e275-8a92-dc58-afb3-67edd7667ddb%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to install and use Django

2018-02-09 Thread Etienne Robillard
i found that the best way to confuse a newbie python/django programmer 
is to invite him/her to use virtualenv.


Virtualenv is absolutely NOT required for properly running django in 
development or production mode.


a most flexible approach is to install django in development mode:

$ cd /path/to/django

$ sudo python setup.py develop --prefix=/usr/local

HTH,

Etienne


Le 2018-02-09 à 13:12, James Farris a écrit :

I highly recommend installing virtualenv and virtualenvwrapper. This will 
reduce the stress of creating a bunch of unnecessary modules on your computer 
and contain each project you create in a separate environment. For example you 
wouldn’t necessarily want to install Django globally but rather for a specific 
project your working on. That’s where virtualenv comes in.

I also recommend going through the Django Book. It walks you through an app 
that uses a lot of what Django has to offer: https://djangobook.com

Also go through the Writing your first Django app in the Django docs: 
https://docs.djangoproject.com/en/2.0/intro/tutorial01/

I use PyCharm, because it has great auto complete and debugging.

Other references mentioned above are below.

Django apps: https://docs.djangoproject.com/en/2.0/ref/applications/
Homebrew: https://brew.sh/
Virtualenv: https://virtualenv.pypa.io/en/stable/
Virtualenvwrapper: 
https://virtualenvwrapper.readthedocs.io/en/latest/install.html



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/394be6a7-15a1-4328-90cf-b1385ac34bef%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: One domain doesn't work for multiple django projects in one DigitalOcean droplet

2018-02-09 Thread Etienne Robillard
Um, i think it would be much easier to deploy if you use one droplet per 
project.



Etienne

Le 2018-02-08 à 16:48, Shaojun Xie a écrit :

|

 BioTLDR ##
#Listen 80

WSGISocketPrefix /mnt/volume-nyc1-02/project/BioTLDR/wsgi/wsgi

 ServerName www.biotldr.tabomics.cn
 ServerAlias biotldr.tabomics.cn www.biotldr.tk biotldr.tk
 ServerAdmin h...@biotldr.tk

 ErrorLog "logs/error_log_biotldr"
 #WSGISocketPrefix /mnt/volume-nyc1-02/project/BioTLDR/wsgi/wsgi
   Alias /static "/mnt/volume-nyc1-02/project/BioTLDR/static"

 
 Require all granted
 

 

Require all granted

 
 WSGIDaemonProcess BioTLDR 
python-home=/mnt/volume-nyc1-02/project/BioTLDR/vir_env_py3/ 
python-path=/mnt/volume-nyc1-02/project/BioTLDR:/mnt/volume-nyc1-02/project/BioTLDR/vir_env_py3/lib/python3.6/site-packages/

 WSGIProcessGroup BioTLDR
 WSGIScriptAlias / /mnt/volume-nyc1-02/project/BioTLDR/BioTLDR/wsgi.py
 #WSGIApplicationGroup %{GLOBAL}



#k80
## 
https://stackoverflow.com/questions/29754226/how-to-configure-wsgisocketprefix

WSGISocketPrefix /mnt/volume-nyc1-02/project/pearDB/wsgi/wsgi

 ServerName www.peardb.tabomics.cn
 ServerAlias peardb.tabomics.cn
 ServerAdmin serverad...@mydomain.org
 #ProxyPass / http://tabomics.tk:8008/
 #ProxyPassReverse / http://tabomics.tk:8008/
   Alias /static "/mnt/volume-nyc1-02/project/pearDB/static"
 
 Require all granted
 

 

Require all granted

 
 WSGIDaemonProcess pearDB 
python-home=/mnt/volume-nyc1-02/project/pearDB/vir_django_py2.7 
python-path=/mnt/volume-nyc1-02/project/pearDB/:/mnt/volume-nyc1-02/project/pearDB/vir_django_py2.7/lib/python2.7/site-packages/

WSGIProcessGroup pearDB
WSGIScriptAlias / /mnt/volume-nyc1-02/project/pearDB/pearDB/wsgi.py


#
#  ServerName www.tabomics.cn
#  ServerAlias tabomics.cn
#  ServerAdmin h...@tabomics.cn
#  ErrorLog "logs/error_log_jbrowse"
 #CustomLog "logs/access_log_tabomics"

  ### The configure information below should be added.
  Alias /jbrowse "/mnt/volume-nyc1-02/project/pearDB/jbrowse-pearDB/"

Options Indexes FollowSymLinks
AllowOverride None
Require all granted

#


##TabOmics

 ServerName www.tabomics.cn
 ServerAlias tabomics.cn
 ServerAdmin h...@tabomics.cn
 #ProxyPass / http://tabomics.tk:8008/
 #ProxyPassReverse / http://tabomics.tk:8008/
 ErrorLog "logs/error_log_tabomics"
 #CustomLog "logs/access_log_tabomics"
   Alias /static "/mnt/volume-nyc1-02/project/tabomics/static"
 
 Require all granted
 

 

Require all granted

 
 WSGIDaemonProcess tabomics 
python-home=/mnt/volume-nyc1-02/project/tabomics/vir_tabomics_py2 
python-path=/mnt/volume-nyc1-02/project/tabomics/:/mnt/volume-nyc1-02/project/tabomics/vir_tabomics_py2/lib/python2.7/site-packages/

WSGIProcessGroup tabomics
WSGIScriptAlias / /mnt/volume-nyc1-02/project/tabomics/tabomics/wsgi.py


|

The above is the configuration file for three django projects.
Currently only 'www..tabomics.cn' and 'www.peardb.tabomics.cn' are 
working. 'www.biotldr.tabomics.cn' doesn't work.

If I ping 'www.biotldr.tabomics.cn', here is what I got:

$ ping biotldr.tabomics.cn
PING biotldr.tabomics.cn (198.211.107.37) 56(84) bytes of data.
64 bytes from tabomics.cn (198.211.107.37): icmp_seq=1 ttl=64 
time=0.026 ms
64 bytes from tabomics.cn (198.211.107.37): icmp_seq=2 ttl=64 
time=0.056 ms
64 bytes from tabomics.cn (198.211.107.37): icmp_seq=3 ttl=64 
time=0.060 ms

^C
--- biotldr.tabomics.cn ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.026/0.047/0.060/0.016 ms

Could someone tell me what the possible reasons are? Thanks 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 
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bdde099a-bf5d-4362-b5ee-feb643249622%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/bdde099a-bf5d-4362-b5ee-feb643249622%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

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

Re: Please support Django Girls Fundraising Campaign (sorry for irrelevant topic in this group)

2018-02-06 Thread Etienne Robillard
go-users/CAJ8iCyOfov04jCSAJKioD_Ha7Uqj49LZ%3DxvPaLhrd4w8V9G4nA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAJ8iCyOfov04jCSAJKioD_Ha7Uqj49LZ%3DxvPaLhrd4w8V9G4nA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout 
<https://groups.google.com/d/optout>.


--
Etienne Robillard
tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/c49f915a-57db-2111-48e0-17337262259e%40yandex.com

<https://groups.google.com/d/msgid/django-users/c49f915a-57db-2111-48e0-17337262259e%40yandex.com?utm_medium=email&utm_source=footer>.


For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BFDnhJsc7T6c0VhvWS652%2BEsszXw%3Dg6PkR0OLt9zfmpp_Z1Rg%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CA%2BFDnhJsc7T6c0VhvWS652%2BEsszXw%3Dg6PkR0OLt9zfmpp_Z1Rg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/cb4d4ec4-be87-5ad8-aa87-884698fd6537%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-hotsauce: Current status and roadmap

2018-02-06 Thread Etienne Robillard

Hi,

Someone really need to explain how to properly test/benchmark Django 
with unittest integration. I'm looking to test/benchmark the django 
models API against Non-SQL databases like Schevo, ZODB, and Durus. i 
plan to isolate and verify the latency of basic SQL database querying 
with sqlite3 when using standard Django 1.11 models. i would also like 
to measure the speed of ZODB connections.


Is it possible to not use uWSGI while running Django benchmarks with 
unittest?


Best regards,
Etienne

Le 2018-02-04 à 04:19, Etienne Robillard a écrit :


Hi,

Is wrk (https://github.com/wg/wrk) any better than ab for making HTTP 
benchmarks of django applications?


how should i collect wrk input to make graphs in Python?

Etienne


Le 2018-02-01 à 04:27, Etienne Robillard a écrit :


Hi,

Actually, I want to benchmark the WSGI application/handler of Django 
2.0.1.


And, I want to compare the Gevent loop engine with python based 
poll/epoll .


Do i really need to setup django with uwsgi to make theses 
tests/benchmarks?



Etienne


Le 2018-01-31 à 19:02, Etienne Robillard a écrit :


Hi,

Any ideas of good python library for benchmarking standalone Django 
2.0 http server?


Thanks in advance,

Etienne


Le 2018-01-31 à 07:38, Etienne Robillard a écrit :


Hi Avraham,


Le 2018-01-31 à 06:35, Avraham Serour a écrit :

Why do you call it microframework?


Because it still depends mostly on the core Django API.

You should prove it is high performance, benchmark, measure, 
compare and show some cool graphs


All right. I'm planning to benchmark the following:

Django-hotsauce 0.8.2 with Cython extensions
Django-hotsauce 0.8.2 with CPython 3.7
Django-hotsauce 0.8.2 with ZODB database
Django-hotsauce 0.9.0 with PyPy 5.9
Django-hotsauce 0.9.0 with CPython 3.7
Django-hotsauce 0.9.0 with ZODB database
Django 1.11.7 with SQLite database
Django 1.11.7 with CPython 3.7
Django 1.11.7 with PyPy 5.9
Django 2.0.1 with SQLite database
Django 2.0.1 with CPython 3.7
Django 2.0.1 with PyPy 5.9



I already have a Django project, is it a drop in replacement?


Technically, it is a full-scale web microframework on top of 
Django. You still need to install Django to run Django-hotsauce.


My project uses python 3.6 while you only have experimental 
support for 3.5. I'm not going back, you should have already 
experimental support for 3.7 at least


I don't expect huge differences between python 3.5 and 3.7. I will 
try to update in order to make cool benchmarks. :)


Many thanks for your input!

Etienne



On 31 Jan 2018 12:35, "Etienne Robillard" <mailto:tkad...@yandex.com>> wrote:


Hi everyone,

This is a quick post to present the current state of
development in Django-hotsauce, a high-performance and
scalable WSGI microframework on top of Django and others.

Django-hotsauce has now reached the 0.9 milestone. New major
features now supported includes:

  * uWSGI support with Gevent loop engine
  * Full ZODB databases support through the Schevo DBMS
  * OAuth2 authentication and authorization support with
thread-local request storage based on Werkzeug
  * Experimental PyPy 5.9 and CPython 3.5 support
  * Backward compatibility with Django 1.4 and Django 1.11

What should be done next? How can Django-hotsauce attract a
larger audience?


Best regards,

Etienne



-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com

<https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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

Re: Please support Django Girls Fundraising Campaign (sorry for irrelevant topic in this group)

2018-02-06 Thread Etienne Robillard



Le 2018-02-06 à 13:55, Gerardo Palazuelos Guerrero a écrit :
the django girls project was my introduction to django, and it was a 
good one.

I don't know man.
Basically I guess programming Django/Python is not gender specific, so 
it makes very little difference to me.


thanks to all people and their time...
and good luck


Best regards,
Etienne





--
Gerardo Palazuelos Guerrero


On Tue, Feb 6, 2018 at 4:46 AM, Anna Makarudze <mailto:amakaru...@gmail.com>> wrote:


Hello all,

My name is Anna Makarudze. I am the Django Girls Foundation
Fundraising Coordinator.

I would like to take this opportunity to inform you about the
crowdfunding project we launched this week to raise funds which we
need to continue our work in bringing in more women to coding.
Since Django Girls was started three years ago, over 12,000 women
have attended our workshops and learnt to code using Python and
Django. We would like to continue growing the number in 2018. We
are running our fundraising project through crowdfunding on
Indiegogo Generosity, an online crowdfunding platform

(https://www.generosity.com/community-fundraising/django-girls-fundraising-campaign/x/17493288

<https://www.generosity.com/community-fundraising/django-girls-fundraising-campaign/x/17493288>).
Our target is to raise USD 10,000 in four to six weeks through
corporate sponsorships and crowdfunding. We are hoping you will
support us and help us reach our goal.

If your company is interested in corporate sponsorship, please
contact me and I will share with you our Sponsors Deck for 2018
which contains information about our corporate sponsorship
packages. We hope you can share the within your organisation as
well as spread the word about the campaign to your friends, family
and colleagues.

Please feel free to ask me any questions you may have.

Thank you.

P.S Sorry for the post which may be irrelevant in this group.

Cupcakes and high-fives,

Anna Makarudze

Django Girls Fundraising Coordinator

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/c3cd0983-4c0e-492b-9183-2eb2c33b7760%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/c3cd0983-4c0e-492b-9183-2eb2c33b7760%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ8iCyOfov04jCSAJKioD_Ha7Uqj49LZ%3DxvPaLhrd4w8V9G4nA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAJ8iCyOfov04jCSAJKioD_Ha7Uqj49LZ%3DxvPaLhrd4w8V9G4nA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/c49f915a-57db-2111-48e0-17337262259e%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-hotsauce: Current status and roadmap

2018-02-04 Thread Etienne Robillard

Hi,

Is wrk (https://github.com/wg/wrk) any better than ab for making HTTP 
benchmarks of django applications?


how should i collect wrk input to make graphs in Python?

Etienne


Le 2018-02-01 à 04:27, Etienne Robillard a écrit :


Hi,

Actually, I want to benchmark the WSGI application/handler of Django 
2.0.1.


And, I want to compare the Gevent loop engine with python based 
poll/epoll .


Do i really need to setup django with uwsgi to make theses 
tests/benchmarks?



Etienne


Le 2018-01-31 à 19:02, Etienne Robillard a écrit :


Hi,

Any ideas of good python library for benchmarking standalone Django 
2.0 http server?


Thanks in advance,

Etienne


Le 2018-01-31 à 07:38, Etienne Robillard a écrit :


Hi Avraham,


Le 2018-01-31 à 06:35, Avraham Serour a écrit :

Why do you call it microframework?


Because it still depends mostly on the core Django API.

You should prove it is high performance, benchmark, measure, 
compare and show some cool graphs


All right. I'm planning to benchmark the following:

Django-hotsauce 0.8.2 with Cython extensions
Django-hotsauce 0.8.2 with CPython 3.7
Django-hotsauce 0.8.2 with ZODB database
Django-hotsauce 0.9.0 with PyPy 5.9
Django-hotsauce 0.9.0 with CPython 3.7
Django-hotsauce 0.9.0 with ZODB database
Django 1.11.7 with SQLite database
Django 1.11.7 with CPython 3.7
Django 1.11.7 with PyPy 5.9
Django 2.0.1 with SQLite database
Django 2.0.1 with CPython 3.7
Django 2.0.1 with PyPy 5.9



I already have a Django project, is it a drop in replacement?


Technically, it is a full-scale web microframework on top of Django. 
You still need to install Django to run Django-hotsauce.


My project uses python 3.6 while you only have experimental support 
for 3.5. I'm not going back, you should have already experimental 
support for 3.7 at least


I don't expect huge differences between python 3.5 and 3.7. I will 
try to update in order to make cool benchmarks. :)


Many thanks for your input!

Etienne



On 31 Jan 2018 12:35, "Etienne Robillard" <mailto:tkad...@yandex.com>> wrote:


Hi everyone,

This is a quick post to present the current state of
development in Django-hotsauce, a high-performance and scalable
WSGI microframework on top of Django and others.

Django-hotsauce has now reached the 0.9 milestone. New major
features now supported includes:

  * uWSGI support with Gevent loop engine
  * Full ZODB databases support through the Schevo DBMS
  * OAuth2 authentication and authorization support with
thread-local request storage based on Werkzeug
  * Experimental PyPy 5.9 and CPython 3.5 support
  * Backward compatibility with Django 1.4 and Django 1.11

What should be done next? How can Django-hotsauce attract a
larger audience?


Best regards,

    Etienne



-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com

<https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the G

Re: Django-hotsauce: Current status and roadmap

2018-02-01 Thread Etienne Robillard

Hi,

Actually, I want to benchmark the WSGI application/handler of Django 2.0.1.

And, I want to compare the Gevent loop engine with python based poll/epoll .

Do i really need to setup django with uwsgi to make theses tests/benchmarks?


Etienne


Le 2018-01-31 à 19:02, Etienne Robillard a écrit :


Hi,

Any ideas of good python library for benchmarking standalone Django 
2.0 http server?


Thanks in advance,

Etienne


Le 2018-01-31 à 07:38, Etienne Robillard a écrit :


Hi Avraham,


Le 2018-01-31 à 06:35, Avraham Serour a écrit :

Why do you call it microframework?


Because it still depends mostly on the core Django API.

You should prove it is high performance, benchmark, measure, compare 
and show some cool graphs


All right. I'm planning to benchmark the following:

Django-hotsauce 0.8.2 with Cython extensions
Django-hotsauce 0.8.2 with CPython 3.7
Django-hotsauce 0.8.2 with ZODB database
Django-hotsauce 0.9.0 with PyPy 5.9
Django-hotsauce 0.9.0 with CPython 3.7
Django-hotsauce 0.9.0 with ZODB database
Django 1.11.7 with SQLite database
Django 1.11.7 with CPython 3.7
Django 1.11.7 with PyPy 5.9
Django 2.0.1 with SQLite database
Django 2.0.1 with CPython 3.7
Django 2.0.1 with PyPy 5.9



I already have a Django project, is it a drop in replacement?


Technically, it is a full-scale web microframework on top of Django. 
You still need to install Django to run Django-hotsauce.


My project uses python 3.6 while you only have experimental support 
for 3.5. I'm not going back, you should have already experimental 
support for 3.7 at least


I don't expect huge differences between python 3.5 and 3.7. I will 
try to update in order to make cool benchmarks. :)


Many thanks for your input!

Etienne



On 31 Jan 2018 12:35, "Etienne Robillard" <mailto:tkad...@yandex.com>> wrote:


Hi everyone,

This is a quick post to present the current state of development
in Django-hotsauce, a high-performance and scalable WSGI
microframework on top of Django and others.

Django-hotsauce has now reached the 0.9 milestone. New major
features now supported includes:

  * uWSGI support with Gevent loop engine
  * Full ZODB databases support through the Schevo DBMS
  * OAuth2 authentication and authorization support with
thread-local request storage based on Werkzeug
  * Experimental PyPy 5.9 and CPython 3.5 support
  * Backward compatibility with Django 1.4 and Django 1.11

What should be done next? How can Django-hotsauce attract a
larger audience?


Best regards,

    Etienne



-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com

<https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the Google 
Groups "Django hotsauce" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to django-hotsauce+unsubscr...@googlegroups.com 
<mailto:django-hotsauce+unsubscr...@googlegroups.com>.
To

Re: Django-hotsauce: Current status and roadmap

2018-01-31 Thread Etienne Robillard

Hi,

Any ideas of good python library for benchmarking standalone Django 2.0 
http server?


Thanks in advance,

Etienne


Le 2018-01-31 à 07:38, Etienne Robillard a écrit :


Hi Avraham,


Le 2018-01-31 à 06:35, Avraham Serour a écrit :

Why do you call it microframework?


Because it still depends mostly on the core Django API.

You should prove it is high performance, benchmark, measure, compare 
and show some cool graphs


All right. I'm planning to benchmark the following:

Django-hotsauce 0.8.2 with Cython extensions
Django-hotsauce 0.8.2 with CPython 3.7
Django-hotsauce 0.8.2 with ZODB database
Django-hotsauce 0.9.0 with PyPy 5.9
Django-hotsauce 0.9.0 with CPython 3.7
Django-hotsauce 0.9.0 with ZODB database
Django 1.11.7 with SQLite database
Django 1.11.7 with CPython 3.7
Django 1.11.7 with PyPy 5.9
Django 2.0.1 with SQLite database
Django 2.0.1 with CPython 3.7
Django 2.0.1 with PyPy 5.9



I already have a Django project, is it a drop in replacement?


Technically, it is a full-scale web microframework on top of Django. 
You still need to install Django to run Django-hotsauce.


My project uses python 3.6 while you only have experimental support 
for 3.5. I'm not going back, you should have already experimental 
support for 3.7 at least


I don't expect huge differences between python 3.5 and 3.7. I will try 
to update in order to make cool benchmarks. :)


Many thanks for your input!

Etienne



On 31 Jan 2018 12:35, "Etienne Robillard" <mailto:tkad...@yandex.com>> wrote:


Hi everyone,

This is a quick post to present the current state of development
in Django-hotsauce, a high-performance and scalable WSGI
microframework on top of Django and others.

Django-hotsauce has now reached the 0.9 milestone. New major
features now supported includes:

  * uWSGI support with Gevent loop engine
  * Full ZODB databases support through the Schevo DBMS
  * OAuth2 authentication and authorization support with
thread-local request storage based on Werkzeug
  * Experimental PyPy 5.9 and CPython 3.5 support
  * Backward compatibility with Django 1.4 and Django 1.11

What should be done next? How can Django-hotsauce attract a
larger audience?


Best regards,

    Etienne



-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com

<https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the Google 
Groups "Django hotsauce" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-hotsauce+unsubscr...@googlegroups.com 
<mailto:django-hotsauce+unsubscr...@googlegroups.com>.
To post to this group, send email to django-hotsa...@googlegroups.com 
<mailto:django-hotsa...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-hotsauce/2b425d9c-8704-3695-f7e2-dc3a3840ef8a%40yandex.com 
<https://groups.google.com/d/msgid/django-h

Re: Django-hotsauce: Current status and roadmap

2018-01-31 Thread Etienne Robillard

Hi Avraham,


Le 2018-01-31 à 06:35, Avraham Serour a écrit :

Why do you call it microframework?


Because it still depends mostly on the core Django API.

You should prove it is high performance, benchmark, measure, compare 
and show some cool graphs


All right. I'm planning to benchmark the following:

Django-hotsauce 0.8.2 with Cython extensions
Django-hotsauce 0.8.2 with CPython 3.7
Django-hotsauce 0.8.2 with ZODB database
Django-hotsauce 0.9.0 with PyPy 5.9
Django-hotsauce 0.9.0 with CPython 3.7
Django-hotsauce 0.9.0 with ZODB database
Django 1.11.7 with SQLite database
Django 1.11.7 with CPython 3.7
Django 1.11.7 with PyPy 5.9
Django 2.0.1 with SQLite database
Django 2.0.1 with CPython 3.7
Django 2.0.1 with PyPy 5.9



I already have a Django project, is it a drop in replacement?


Technically, it is a full-scale web microframework on top of Django. You 
still need to install Django to run Django-hotsauce.


My project uses python 3.6 while you only have experimental support 
for 3.5. I'm not going back, you should have already experimental 
support for 3.7 at least


I don't expect huge differences between python 3.5 and 3.7. I will try 
to update in order to make cool benchmarks. :)


Many thanks for your input!

Etienne



On 31 Jan 2018 12:35, "Etienne Robillard" <mailto:tkad...@yandex.com>> wrote:


Hi everyone,

This is a quick post to present the current state of development
in Django-hotsauce, a high-performance and scalable WSGI
microframework on top of Django and others.

Django-hotsauce has now reached the 0.9 milestone. New major
features now supported includes:

  * uWSGI support with Gevent loop engine
  * Full ZODB databases support through the Schevo DBMS
  * OAuth2 authentication and authorization support with
thread-local request storage based on Werkzeug
  * Experimental PyPy 5.9 and CPython 3.5 support
  * Backward compatibility with Django 1.4 and Django 1.11

What should be done next? How can Django-hotsauce attract a larger
audience?


Best regards,

    Etienne



-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com

<https://groups.google.com/d/msgid/django-users/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAFWa6tLoNEdTwg39nWdR2N6XxQN4PLy%2BpWve0UwKwakJen1FAA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/2b425d9c-8704-3695-f7e2-dc3a3840ef8a%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce: Current status and roadmap

2018-01-31 Thread Etienne Robillard

Hi everyone,

This is a quick post to present the current state of development in 
Django-hotsauce, a high-performance and scalable WSGI microframework on 
top of Django and others.


Django-hotsauce has now reached the 0.9 milestone. New major features 
now supported includes:


 * uWSGI support with Gevent loop engine
 * Full ZODB databases support through the Schevo DBMS
 * OAuth2 authentication and authorization support with thread-local
   request storage based on Werkzeug
 * Experimental PyPy 5.9 and CPython 3.5 support
 * Backward compatibility with Django 1.4 and Django 1.11

What should be done next? How can Django-hotsauce attract a larger 
audience?



Best regards,

Etienne



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/680aff87-b96d-7a55-4515-a1762e02f5de%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django api call in view unable to save for foreign key userId

2018-01-30 Thread Etienne Robillard

Hi,


Le 2018-01-29 à 22:31, cherngyo...@gmail.com a écrit :

{"patientId":["This field is required."]}.


This is a generic form validation error. I suspect the problem is with 
the following code:


|classBookApptSerializer(serializers.ModelSerializer):patientId 
=MyUserSerializer(many=False)|


Perhaps you could trace the error in serializers.ModelSerializer by 
using pdb ?


Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/5dd36011-bbfb-1bc7-3b77-27d8c2335baf%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: need to find out if someone is an orphan when I have mother_alive and father_alive fields in the database

2018-01-29 Thread Etienne Robillard

Hi Eileen,

What is the error message?

By the way, one way to improve your code readability would be to use 
form.is_valid() :


For instance:

new_data = form.is_valid()

Hope this helps,

Etienne


Le 2018-01-29 à 15:03, eil...@themaii.org a écrit :

Hi,
I need to find out if someone is an orphan when I have mother_alive 
and father_alive fields in the database. Stepfathers, and stepmothers 
etc aren't counted when determining if someone is an orphan, only 
their birth mother, and birth father.

I tried
  if form['orphaned'].data == True:
             q = 
context['child_filter'].filter(Q(request.POST.get('mother_alive') == 0 
and request.POST.get('father_alive') == 0))


but I got an error on it.

does anyone know what I did wrong?

-Eileen



--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f49ad522-cbcc-4aa9-8126-636231b36bfd%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/f49ad522-cbcc-4aa9-8126-636231b36bfd%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/a41d759f-2275-3176-bed1-626d57bb81f0%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce 0.9.0 is out!

2018-01-28 Thread Etienne Robillard

Hi all,

I'm very pleased to announce the public release of Django-hotsauce 0.9.0 
: https://pypi.python.org/pypi/Django-hotsauce/0.9.0


*Whats new:*

1. Added preliminary support for JIT compilation as a replacement for 
Cython. (Require PyPy 5.9.0 or later) .


*Notes:*

This release is for experimental use only. Schevo and ZODB databases are 
supported in this release!



Have fun! :))

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/e4cd1281-f353-7962-073e-247426c51912%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Native JIT compiler for Django?

2018-01-28 Thread Etienne Robillard
Django-hotsauce is a high-performance toolkit for Django. Using Cython 
under the hood is really a good method to optimize standard Django 
applications, but I want to investigate how JIT and PyPy can further 
improve performances beyond Cython.



Le 2018-01-28 à 11:14, Jani Tiainen a écrit :
So whats the whole fuzz about JIT and all that if you're happy with 
Django as is and how it works with Python..? :-o


On Sun, Jan 28, 2018 at 3:45 PM, Etienne Robillard <mailto:tkad...@yandex.com>> wrote:


Hi Jani,

I agree.

I'm really not interesting in "fixing" bad code. I work with
open-source grade only softwares like Django. :)

Cheers,

Etienne


Le 2018-01-28 à 08:30, Jani Tiainen a écrit :

Hi.

    28.1.2018 3.10 ip. "Etienne Robillard" mailto:tkad...@yandex.com>> kirjoitti:

Hi Jason,

Please don't read me wrong. I want to allow my users to
optimize the efficiency of Python/Django web applications
using JIT.


And thats the catch. You can easily write code that is slow and
no language, no JIT or tool can fix.

For example many times problem with Django is poorly written ORM
code. By doing unnecessary database queries.

Also to back up your claims how you can be sure that using tool X
over normal Python is faster?

What if your tool actally is slower?

Also you have to note that Django is only one part of whole stack
of tools used to run Django web app.

Cheers,

Etienne


Le 2018-01-28 à 07:55, Jason a écrit :

What I get from you, Etienne, is that you think this is a
cool area to look into, but don't have anything else aside
from that suspect coolness factor to apply to your proposal.
Besides, this thing you said above

I don't want to optimize my code manually except with
machine-compiled instructions.


makes me extremely concerned that you're in the middle of an
X-Y Problem
<https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem> 
and
are avoiding the core issue because you don't feel its your
responsibility to practice good design, execute profiling to
benchmark performance and implement what optimizations are
available for the bottlenecks identified.

-- 
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
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/b5f37295-8ca1-4c33-a819-6c524c76deb1%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/b5f37295-8ca1-4c33-a819-6c524c76deb1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/179ea6ad-a568-e794-ce04-4a41121470f5%40yandex.com

<https://groups.google.com/d/msgid/django-users/179ea6ad-a568-e794-ce04-4a41121470f5%40yandex.com?utm_medium=email&utm_source=footer>.


For more options, visit https://groups.google.com/d/optout
<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

Re: Native JIT compiler for Django?

2018-01-28 Thread Etienne Robillard

Hi Jani,

I agree.

I'm really not interesting in "fixing" bad code. I work with open-source 
grade only softwares like Django. :)


Cheers,

Etienne


Le 2018-01-28 à 08:30, Jani Tiainen a écrit :

Hi.

28.1.2018 3.10 ip. "Etienne Robillard" <mailto:tkad...@yandex.com>> kirjoitti:


Hi Jason,

Please don't read me wrong. I want to allow my users to optimize
the efficiency of Python/Django web applications using JIT.


And thats the catch. You can easily write code that is slow and no 
language, no JIT or tool can fix.


For example many times problem with Django is poorly written ORM code. 
By doing unnecessary database queries.


Also to back up your claims how you can be sure that using tool X over 
normal Python is faster?


What if your tool actally is slower?

Also you have to note that Django is only one part of whole stack of 
tools used to run Django web app.


Cheers,

Etienne


Le 2018-01-28 à 07:55, Jason a écrit :

What I get from you, Etienne, is that you think this is a cool
area to look into, but don't have anything else aside from that
suspect coolness factor to apply to your proposal.  Besides, this
thing you said above

I don't want to optimize my code manually except with
machine-compiled instructions.


makes me extremely concerned that you're in the middle of an X-Y
Problem
<https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem> and
are avoiding the core issue because you don't feel its your
responsibility to practice good design, execute profiling to
benchmark performance and implement what optimizations are
available for the bottlenecks identified.

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/b5f37295-8ca1-4c33-a819-6c524c76deb1%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/b5f37295-8ca1-4c33-a819-6c524c76deb1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/179ea6ad-a568-e794-ce04-4a41121470f5%40yandex.com

<https://groups.google.com/d/msgid/django-users/179ea6ad-a568-e794-ce04-4a41121470f5%40yandex.com?utm_medium=email&utm_source=footer>.


For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91ofqA9_DBtqkkeFjbf8fgw5jXSSSmmoD%2Byn6nW6bpyD_bg%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAHn91ofqA9_DBtqkkeFjbf8fgw5jXSSSmmoD%2Byn6nW6bpyD_bg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving em

Re: Native JIT compiler for Django?

2018-01-28 Thread Etienne Robillard

Hi Jason,

Please don't read me wrong. I want to allow my users to optimize the 
efficiency of Python/Django web applications using JIT.


Cheers,

Etienne


Le 2018-01-28 à 07:55, Jason a écrit :
What I get from you, Etienne, is that you think this is a cool area to 
look into, but don't have anything else aside from that suspect 
coolness factor to apply to your proposal.  Besides, this thing you 
said above


I don't want to optimize my code manually except with
machine-compiled instructions.


makes me extremely concerned that you're in the middle of an X-Y 
Problem 
<https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem> and 
are avoiding the core issue because you don't feel its your 
responsibility to practice good design, execute profiling to benchmark 
performance and implement what optimizations are available for the 
bottlenecks identified.


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b5f37295-8ca1-4c33-a819-6c524c76deb1%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/b5f37295-8ca1-4c33-a819-6c524c76deb1%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/179ea6ad-a568-e794-ce04-4a41121470f5%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pypy-dev] How to implement a JIT compiler for Django ?

2018-01-28 Thread Etienne Robillard

Great! Thanks very much for this post, Yury.

I'll do just what you suggested. :)

Cheers,

Etienne


Le 2018-01-28 à 07:35, Yury V. Zaytsev a écrit :

On Sun, 28 Jan 2018, Etienne Robillard wrote:

Anyways, having that said, I can't even infer what your original 
line of thinking was to embed what into what to speed up what 
exactly...


I'm looking to use JIT as a replacement for Cython in a upcoming 
Django-hotsauce release. :)


If this is indeed your goal, then I do have some good news for you: 
you don't have to do anything at all other than scraping Cython in 
order to achieve it. Just run your code on PyPy instead of CPython and 
you will benefit directly from PyPy's tracing JIT.


To answer the question of why do you have to scrape Cython before it 
comes up: you *can* run Cython compiled modules on top of PyPy thanks 
to its Python C API emulation layer (CPyExt). However, this will be 
inefficient because (a) crossing PyPy / C boundary is slow, although 
not as slow as it used to be in the past and (b) PyPy's JIT can't see 
into machine code created from Cython-generated C/C++ source code. 
Therefore, to benefit most from PyPy you'd better feed it pure Python 
code.


Once you translate a Django app into C code (let's assume this is 
actually possible for the sake of the argument) and then compile it 
into machine code using clang there is nothing more left for a JIT 
to operate upon, because machine code is interpreted directly by the 
CPU.


I'm really sure its possible to generate a C or C++ file from 
human-generated Python code.


In that case, you have to educate yourself, and specifically try to 
understand how Cython really works. Hint: generating C/C++ file from 
Python code != translate Python code into C/C++ code that doesn't 
require CPython runtime.



So far, I want to use the LLVM backend (PyPy)


PyPy doesn't have anything to do with LLVM at this point. There have 
been multiple attempts in the past to use LLVM as backend for PyPy, 
but so far none of them have really been succesful, where success is 
defined as making it a default backend.



to translate CPython classes into a tracing JIT compiler...


This statement is devoid of meaning.

I'm positive you can use PyPy in embedded C/C++ applications to 
enable trace compilation of Python objects.


JIT is cool because it can theoretically makes Django and Python web 
apps outperform C applications.


These statements are both correct, but see the beginning of this email.



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/2066b470-6e19-64ac-b07e-40bc829c117d%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pypy-dev] How to implement a JIT compiler for Django ?

2018-01-28 Thread Etienne Robillard



Le 2018-01-28 à 05:11, Yury V. Zaytsev a écrit :


I think that you might be confused about the fundamentals of the 
technologies involved here.




Yes, I admit, i'm really just starting to understand PyPy fundamentals 
and LLVM.


Once you translate a Django app into C code (let's assume this is 
actually possible for the sake of the argument) and then compile it 
into machine code using clang there is nothing more left for a JIT to 
operate upon, because machine code is interpreted directly by the CPU.




I'm really sure its possible to generate a C or C++ file from 
human-generated Python code. So far, I want to use the LLVM backend 
(PyPy) to translate CPython classes into a tracing JIT compiler...


Tracing JIT engines like PyPy translate bytecode into machine code on 
the fly taking into account invariants discovered during runtime, 
which theoretically enables them to outperform machine code generated 
without knowing the data it processes, and, in any case, run a lot 
faster than the interpreted byte code.


I'm positive you can use PyPy in embedded C/C++ applications to enable 
trace compilation of Python objects.


A possible source of confusion is that people often speak of speeding 
things up with LLVM (or nowadays even GCC) JIT; in most cases this 
amounts to so called method level JITs where specific isolated 
functions are compiled on the fly into machine code by the 
corresponding JIT backend and then called from the bytecode 
interpreter instead of actually interpreting the original bytecode for 
the method.


JIT is cool because it can theoretically makes Django and Python web 
apps outperform C applications.


Anyways, having that said, I can't even infer what your original line 
of thinking was to embed what into what to speed up what exactly...


I'm looking to use JIT as a replacement for Cython in a upcoming 
Django-hotsauce release. :)


Cheers,

Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/ae3dfc98-b45a-d81f-7428-25ba6c93ba3d%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Native JIT compiler for Django?

2018-01-28 Thread Etienne Robillard
The reason I want to use a JIT compiler for running embedded Django 
applications is this:



"More recently, developers began pioneering a new field in dynamic 
compilation called trace compiling, or tracing. During compilation into 
the intermediate language, the compiler can mark the branches within the 
code, for example, a label in front of a return statement, a jmp 
operation at a break statement, or call or return. The reasoning is 
simple, if you strip away all of the jumps and function calls, no matter 
how long the program is, as long as its written by a human, then from an 
engineer's perspective, the program will always run in negligible time. 
Where programs begins to eat up memory however, are the various loops, 
recursive calls, and whatnot. Essentially, the introduction of branches 
makes the complexity of the program unpredictable, hence by optimizing 
the frequently used loops and function calls, we can effectively balance 
the efficiency of the program with the resources required to compile the 
code (which is still not trivial by any means). It also solves another 
major problem. Whenever the program counter (or instruction pointer) 
hits one of the branch markers, its entire execution flow is traced and 
stored (and will eventually be compiled if that route is taken 
frequently enough). Because the program flow of a string concatenation 
differs from those of an integer addition or even an overloaded 
function, each of these flow generates unique traces with their unique 
signatures (the input). For this very reason, if we encounter a string 
concatenation before an integer addition, the program will not only be 
able to identify the integer case as a completely different route, but 
will also be able to break down the complexity of the environment so 
that further optimizations during the compilation of the integer route 
can safely assume that its inputs are strictly integers. Neat huh?" [1]



https://gist.github.com/leegao/1073233


Le 2018-01-28 à 05:00, Jani Tiainen a écrit :


Hi,

So what is your motivation to even try to make Python(and thus Django 
to convert it to C code (or run it on top of something like LLVM)?


Is there some part which is too slow in your application? Are you even 
sure that doing things that Django does would even be faster when 
compiling it to something like C-code?


In my projects I have few really complex calculation systems and I 
have resolved them by writing the slow part in C(++) and using C-types 
to bind C code to my Python (Django) app.


If you're just seeking generic speedup, there exists PyPy project [1] 
which can run Django and relevant database backends at least 
successfully. PyPy is JIT for python, works quite well without any 
modifications to Python code.


PyPy can run Django library just fine, I have seen reports about 15 
times faster execution in most operations. Never used it myself though 
since I haven't really found out Python be too slow in my apps.


[1] http://pypy.org/

On Sun, Jan 28, 2018 at 10:53 AM, Etienne Robillard 
mailto:tkad...@yandex.com>> wrote:


Hi Jani,

I don't want to optimize my code manually except with
machine-compiled instructions.

Cheers,

Etienne


Le 2018-01-28 à 03:12, Jani Tiainen a écrit :

Hi

Why you even want to add such a complexity?

Have you measured what part in your apps are really slow?

Have you tried to optimize your python code before trying such an
extreme actions?

27.1.2018 9.04 ip. "Etienne Robillard" mailto:tkad...@yandex.com>> kirjoitti:

Hi,

I would like to know if it's possible to compile Django code
with a JIT compiler to a C file using LLVM?

    What do you think?

Etienne


Etienne Robillard
tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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%2bunsubscr...@googlegroups.com>.
To post to this group, send email to
django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/ec8bf736-c316-8e9a-01ec-16383c78e746%40yandex.com

<https://groups.google.com/d/msgid/django-users/ec8bf736-c316-8e9a-01ec-16383c78e746%40yandex.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.

Re: Native JIT compiler for Django?

2018-01-28 Thread Etienne Robillard

Hi Jani,

I don't want to optimize my code manually except with machine-compiled 
instructions.


Cheers,

Etienne


Le 2018-01-28 à 03:12, Jani Tiainen a écrit :

Hi

Why you even want to add such a complexity?

Have you measured what part in your apps are really slow?

Have you tried to optimize your python code before trying such an 
extreme actions?


27.1.2018 9.04 ip. "Etienne Robillard" <mailto:tkad...@yandex.com>> kirjoitti:


Hi,

I would like to know if it's possible to compile Django code with
a JIT compiler to a C file using LLVM?

What do you think?

Etienne


Etienne Robillard
tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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%2bunsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/ec8bf736-c316-8e9a-01ec-16383c78e746%40yandex.com

<https://groups.google.com/d/msgid/django-users/ec8bf736-c316-8e9a-01ec-16383c78e746%40yandex.com>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91ofbbm2uNyWmJ%3DH9H8eWMmFEpOPNnN3JkJy1UWmcw6kACQ%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAHn91ofbbm2uNyWmJ%3DH9H8eWMmFEpOPNnN3JkJy1UWmcw6kACQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/2a6f24f9-6d78-748c-6866-b48b0ce3ee03%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Native JIT compiler for Django?

2018-01-27 Thread Etienne Robillard

Hi,

I would like to know if it's possible to compile Django code with a JIT 
compiler to a C file using LLVM?


What do you think?

Etienne


Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/ec8bf736-c316-8e9a-01ec-16383c78e746%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to autoGenerate C bindings for Django 1.11 ?

2018-01-25 Thread Etienne Robillard

Is it possible to wrap Django API into public C methods in Cython?

I'm thinking I could define a few functions in my libdjango.pyx 
typically used for Django administration.


What do you think?

Etienne

Le 2018-01-24 à 06:26, Etienne Robillard a écrit :

Hi Jason,

Le 2018-01-24 à 06:11, Jason a écrit :
I'm curious about this to, but am struggling to see the use case for 
this.  Could you elaborate on how you'd use something like this, and 
its expected benefits?


The goal would be to use faster C code for accessing Django internal api.

Then I suppose you could build precompiled a Django binary for 
specific architectures/compilers (like llvm) :)


Here is my results so far:

erob@marina:~/src/django-hotsauce-devel$ python
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libdjango
>>> libdjango
'/home/erob/src/django-hotsauce-devel/lib/libdjango/__init__.pyc'>

>>> dir(libdjango)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', 
'__path__']

>>> libdjango.main
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'main'
>>> import libdjango.main
Traceback (most recent call last):
  File "", line 1, in 
ImportError: dynamic module does not define init function (initmain)

erob@marina:~/src/django-hotsauce-devel/lib/libdjango$ cat libdjango.pxd
from django import *

erob@marina:~/src/django-hotsauce-devel/lib/libdjango$ cat libdjango.pyx
from libdjango cimport *


Any ideas why the dynamic module does not define init function?




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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9210f6ce-e01c-423f-a1a7-1eae6fe596a0%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/9210f6ce-e01c-423f-a1a7-1eae6fe596a0%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the Google 
Groups "Django hotsauce" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-hotsauce+unsubscr...@googlegroups.com 
<mailto:django-hotsauce+unsubscr...@googlegroups.com>.
To post to this group, send email to django-hotsa...@googlegroups.com 
<mailto:django-hotsa...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-hotsauce/99d0931e-2a14-c977-5519-6bcac70637c0%40yandex.com 
<https://groups.google.com/d/msgid/django-hotsauce/99d0931e-2a14-c977-5519-6bcac70637c0%40yandex.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/5e81f5d5-d84f-30e3-1b32-32cf06fd124c%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to autoGenerate C bindings for Django 1.11 ?

2018-01-24 Thread Etienne Robillard

Hi Jason,

Le 2018-01-24 à 06:11, Jason a écrit :
I'm curious about this to, but am struggling to see the use case for 
this.  Could you elaborate on how you'd use something like this, and 
its expected benefits?


The goal would be to use faster C code for accessing Django internal api.

Then I suppose you could build precompiled a Django binary for specific 
architectures/compilers (like llvm) :)


Here is my results so far:

erob@marina:~/src/django-hotsauce-devel$ python
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libdjango
>>> libdjango
'/home/erob/src/django-hotsauce-devel/lib/libdjango/__init__.pyc'>

>>> dir(libdjango)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', 
'__path__']

>>> libdjango.main
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'main'
>>> import libdjango.main
Traceback (most recent call last):
  File "", line 1, in 
ImportError: dynamic module does not define init function (initmain)

erob@marina:~/src/django-hotsauce-devel/lib/libdjango$ cat libdjango.pxd
from django import *

erob@marina:~/src/django-hotsauce-devel/lib/libdjango$ cat libdjango.pyx
from libdjango cimport *


Any ideas why the dynamic module does not define init function?




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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9210f6ce-e01c-423f-a1a7-1eae6fe596a0%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/9210f6ce-e01c-423f-a1a7-1eae6fe596a0%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/99d0931e-2a14-c977-5519-6bcac70637c0%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to autoGenerate C bindings for Django 1.11 ?

2018-01-24 Thread Etienne Robillard
Hi Avraham
 
On Tuesday, 23 January 2018 17:18:19 UTC-5, Avraham Serour wrote:
>
> Did you try doing this and see what happens?
>

Not yet. But I presume I could just use the libdjango.so shared library as 
a replacement for the django package?

Regards,

Etienne

>
> On 23 Jan 2018 9:56 PM, "Etienne Robillard"  > wrote:
>
>> Can I create a file named libdjango.pyx with the following code:
>>
>> {{{
>>
>> import django
>>
>> from django import *
>>
>> }}}
>>
>> Then compile the C file with gcc to access django in C ?
>>
>> Etienne
>>
>>
>> Le 2018-01-23 à 04:32, Etienne Robillard a écrit :
>>
>>> Hi,
>>>
>>>
>>> I would like to know if it would be possible to autogenerate C bindings 
>>> for the whole Django package in Cython or similar extension.
>>>
>>> What do you think? :)
>>>
>>> Cheers,
>>>
>>> Etienne
>>>
>>>
>>>
>> -- 
>> Etienne Robillard
>> tka...@yandex.com 
>> https://www.isotopesoftware.ca/
>>
>> -- 
>> 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/5b89eee2-b69e-f35b-4a8f-ac3bbb362cda%40yandex.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/b6a19d7d-940b-4855-ab74-96f0e30b75fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to autoGenerate C bindings for Django 1.11 ?

2018-01-23 Thread Etienne Robillard

Can I create a file named libdjango.pyx with the following code:

{{{

import django

from django import *

}}}

Then compile the C file with gcc to access django in C ?

Etienne


Le 2018-01-23 à 04:32, Etienne Robillard a écrit :

Hi,


I would like to know if it would be possible to autogenerate C 
bindings for the whole Django package in Cython or similar extension.


What do you think? :)

Cheers,

Etienne




--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/5b89eee2-b69e-f35b-4a8f-ac3bbb362cda%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


How to autoGenerate C bindings for Django 1.11 ?

2018-01-23 Thread Etienne Robillard

Hi,


I would like to know if it would be possible to autogenerate C bindings 
for the whole Django package in Cython or similar extension.


What do you think? :)

Cheers,

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/9804f80b-9eda-5f21-9fd8-da31b52d3f84%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'WSGIRequest' object is not callable error generate

2018-01-19 Thread Etienne Robillard



Le 2018-01-19 à 13:53, Amit Kadivar a écrit :



return request(request,'signup.html',{'form':form})


That line looks incorrect to me. You need to use render_response or a 
similar function... I don't remember the exact function name, however.


Cheers,

Etienne


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9a822b59-f3cb-4024-955a-11c8e9ca8a9e%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/9a822b59-f3cb-4024-955a-11c8e9ca8a9e%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/070df736-c935-4b3c-2fd4-20e05c4c6631%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is CSRF middleware to be taken seriously (from a XSRF point of view)?

2018-01-16 Thread Etienne Robillard

See this: https://www.owasp.org/index.php/SameSite

Cheers,

Etienne


Le 2018-01-16 à 10:36, knbk a écrit :

How does using nginx protect against CSRF attacks?

Marten

On Tuesday, January 16, 2018 at 10:49:21 AM UTC+1, Etienne Robillard 
wrote:


A much more practical way to improve security against XSRF attacks
is using nginx.

Regards,

Etienne


Le 2018-01-16 à 04:38, James Bennett a écrit :

If you can demonstrate a practical attack against Django's CSRF
system, feel free to email it to secu...@djangoproject.com
.

On Tue, Jan 16, 2018 at 1:26 AM, Etienne Robillard
> wrote:

Hi Stephan,

I'm also interested to understand why I should have some form
of CSRF protection for my wsgi app...

perhaps recoding the Django 1.11 CSRF middleware into a
proper WSGI application (CSRFController) would help.

but seriously, i don't use/recommend the Django CSRF
middleware because it does not improve security of forms
processing.


cheers,

Etienne



Le 2018-01-15 à 17:03, Stephan Doliov a écrit :

Just curious, I recently went on a source code studying
binge and took a look at the CSRF middleware that comes with
Django. I appreciate the work and effort of the authors, but
I am not sure I gain anything by deploying it to my site.
Here is why:
The middleware token assigned to a form and to a csrftoken
cookie are ciphertexts of the same underlying key (by
default, the underlying key is chosen as 32 randomly chosen
(with replacement) chars from a set of 62 chars. So the easy
workaround can be done in one of two ways

1) Write a script that just harvests the middleware token
from a form "protected" with such token and use the value of
that as the csrftoken cookie.
As the middlewaretoken is a cipher of the underlying token,
obviously using the the same string as the value to the
csrftoken cookie will satisfy the middleware's demand for
authorization of the resource (e.g. POSTing to the form)

2) Learn the easy cipher algorithm the csrf middleware uses
and present a csrf token cookie that will decode to the
right value.

In either case, I am not convinced that meaningful
protection against CSRF types of requests are provided by
the middleware. Am I missing something?

Wouldn't it be more secure to just have middleware that
whitelists as a series of origins (aka CORS) and then,
unlike CORS, actually perform reverse lookups on the dns of
the whitelisted domains? (Of course, this assumes that the
hosts that might want to make cross-site requests ahve
access to managing their reverse DNS).

Am I missing something; or, if serving performance is a top
goal of mine, should I just ditch the csrf middleware? (and
maybe rate limit client requests to prevent DoS attacks)?

Thanks,
Steve
-- 
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
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/9c4a794f-aa9e-4c00-ba20-779ad7a87d2a%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/9c4a794f-aa9e-4c00-ba20-779ad7a87d2a%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


-- 
Etienne Robillard

tka...@yandex.com 
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/95bba86c-ed2e-fd8d-e7da-2ec1b80c273c%40yandex.com

<https://groups.google.com/d/msgid/django-users/95bba86c-ed2e-fd8d-e7da-2ec1b80

Re: Is CSRF middleware to be taken seriously (from a XSRF point of view)?

2018-01-16 Thread Etienne Robillard
A much more practical way to improve security against XSRF attacks is 
using nginx.


Regards,

Etienne


Le 2018-01-16 à 04:38, James Bennett a écrit :
If you can demonstrate a practical attack against Django's CSRF 
system, feel free to email it to secur...@djangoproject.com 
<mailto:secur...@djangoproject.com>.


On Tue, Jan 16, 2018 at 1:26 AM, Etienne Robillard <mailto:tkad...@yandex.com>> wrote:


Hi Stephan,

I'm also interested to understand why I should have some form of
CSRF protection for my wsgi app...

perhaps recoding the Django 1.11 CSRF middleware into a proper
WSGI application (CSRFController) would help.

but seriously, i don't use/recommend the Django CSRF middleware
because it does not improve security of forms processing.


cheers,

Etienne



Le 2018-01-15 à 17:03, Stephan Doliov a écrit :

Just curious, I recently went on a source code studying binge and
took a look at the CSRF middleware that comes with Django. I
appreciate the work and effort of the authors, but I am not sure
I gain anything by deploying it to my site. Here is why:
The middleware token assigned to a form and to a csrftoken cookie
are ciphertexts of the same underlying key (by default, the
underlying key is chosen as 32 randomly chosen (with replacement)
chars from a set of 62 chars. So the easy workaround can be done
in one of two ways

1) Write a script that just harvests the middleware token from a
form "protected" with such token and use the value of that as the
csrftoken cookie.
As the middlewaretoken is a cipher of the underlying token,
obviously using the the same string as the value to the csrftoken
cookie will satisfy the middleware's demand for authorization of
the resource (e.g. POSTing to the form)

2) Learn the easy cipher algorithm the csrf middleware uses and
present a csrf token cookie that will decode to the right value.

In either case, I am not convinced that meaningful protection
against CSRF types of requests are provided by the middleware. Am
I missing something?

Wouldn't it be more secure to just have middleware that
whitelists as a series of origins (aka CORS) and then, unlike
CORS, actually perform reverse lookups on the dns of the
whitelisted domains? (Of course, this assumes that the hosts that
might want to make cross-site requests ahve access to managing
their reverse DNS).

Am I missing something; or, if serving performance is a top goal
of mine, should I just ditch the csrf middleware? (and maybe rate
limit client requests to prevent DoS attacks)?

Thanks,
Steve
-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/9c4a794f-aa9e-4c00-ba20-779ad7a87d2a%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/9c4a794f-aa9e-4c00-ba20-779ad7a87d2a%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


-- 
Etienne Robillard

tkad...@yandex.com <mailto:tkad...@yandex.com>
https://www.isotopesoftware.ca/ <https://www.isotopesoftware.ca/>

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/95bba86c-ed2e-fd8d-e7da-2ec1b80c273c%40yandex.com

<https://groups.google.com/d/msgid/django-users/95bba86c-ed2e-fd8d-e7da-2ec1b80c273c%40yandex.com?utm_medium=email&utm_source=footer>.


For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


--
You received this message because you are subscribed to the Google 
Groups "Django users" gro

Re: Is CSRF middleware to be taken seriously (from a XSRF point of view)?

2018-01-16 Thread Etienne Robillard

Hi Stephan,

I'm also interested to understand why I should have some form of CSRF 
protection for my wsgi app...


perhaps recoding the Django 1.11 CSRF middleware into a proper WSGI 
application (CSRFController) would help.


but seriously, i don't use/recommend the Django CSRF middleware because 
it does not improve security of forms processing.



cheers,

Etienne



Le 2018-01-15 à 17:03, Stephan Doliov a écrit :
Just curious, I recently went on a source code studying binge and took 
a look at the CSRF middleware that comes with Django. I appreciate the 
work and effort of the authors, but I am not sure I gain anything by 
deploying it to my site. Here is why:
The middleware token assigned to a form and to a csrftoken cookie are 
ciphertexts of the same underlying key (by default, the underlying key 
is chosen as 32 randomly chosen (with replacement) chars from a set of 
62 chars. So the easy workaround can be done in one of two ways


1) Write a script that just harvests the middleware token from a form 
"protected" with such token and use the value of that as the csrftoken 
cookie.
As the middlewaretoken is a cipher of the underlying token, obviously 
using the the same string as the value to the csrftoken cookie will 
satisfy the middleware's demand for authorization of the resource 
(e.g. POSTing to the form)


2) Learn the easy cipher algorithm the csrf middleware uses and 
present a csrf token cookie that will decode to the right value.


In either case, I am not convinced that meaningful protection against 
CSRF types of requests are provided by the middleware. Am I missing 
something?


Wouldn't it be more secure to just have middleware that whitelists as 
a series of origins (aka CORS) and then, unlike CORS, actually perform 
reverse lookups on the dns of the whitelisted domains? (Of course, 
this assumes that the hosts that might want to make cross-site 
requests ahve access to managing their reverse DNS).


Am I missing something; or, if serving performance is a top goal of 
mine, should I just ditch the csrf middleware? (and maybe rate limit 
client requests to prevent DoS attacks)?


Thanks,
Steve
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9c4a794f-aa9e-4c00-ba20-779ad7a87d2a%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/9c4a794f-aa9e-4c00-ba20-779ad7a87d2a%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/95bba86c-ed2e-fd8d-e7da-2ec1b80c273c%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Handling secret keys in digitalocean

2018-01-10 Thread Etienne Robillard



Le 2018-01-10 à 17:04, Jason a écrit :
Since my work stuff is on Apache, I use this advice from two scoops of 
django.


Etienne, are you really saying you have your AWS and database 
credentials, usernames and passwords in your project repositories? /ouch/



I dont save clear-text passwords in Django settings for security reasons.

Except I don't mind putting API keys and Django-specific data like 
SECRET_KEY inside a private code repository.


Cheers,

Etienne



--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/829ffc12-1ffa-4dba-b8ee-4ad25db74ae0%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/829ffc12-1ffa-4dba-b8ee-4ad25db74ae0%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/a6ca2bbe-1803-47a1-dc1f-29bb2a73196b%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Handling secret keys in digitalocean

2018-01-10 Thread Etienne Robillard

Hi Jason,

I understand your views. But I have trust in Digital Ocean and Github 
that they will not mess with "private" stuff unless they want to expose 
themselves to lawsuits.


Personally, I don't care using a code repository to save Django-specific 
data.


Cheers,

Etienne


Le 2018-01-10 à 09:01, Jason a écrit :
Etienne, I think this is more related to having secrets outside of 
your code repository than actually on the server.  Having your AWS and 
db creds in your github repo, whether public or private, is a pretty 
bad thing to do.

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52e78880-3127-42c3-b2de-50a451b22072%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/52e78880-3127-42c3-b2de-50a451b22072%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f28057cd-c300-c8e4-dbe7-52d155328db3%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Handling secret keys in digitalocean

2018-01-10 Thread Etienne Robillard

Hi,

I think this is paranoia. Unless you allow root access to your droplet 
without password or pubkey authentication, there's no way anyone can 
gain access to your settings.py file.


cheers,

Etienne


Le 2018-01-10 à 06:10, Antonis Christofides a écrit :

Hello,

this is actually a big question that is a pain for lots of people. The other
time I held a webinar and I spent some time on this; if you are interested it's
at https://www.crowdcast.io/e/deploying-django, and together with the related
question about different settings in development vs. deployment, I start
treating this issue at 38m10s.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2018-01-10 11:34, yingi keme wrote:

I am aware that its a bad idea to put your secret keys and other API keys in 
your settinggs.py file.

In a production environment like for instance hosting your site in 
digitalocean, where will you have to store your secret keys. And how will you 
load it in your settings.py file.?

I am a newbie when it comes to deploying, anyhelp will please.!!!



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/263877a6-942e-f1e3-ddb2-65a627ba1d7a%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: MongoDB and Django

2018-01-07 Thread Etienne Robillard

Hi,

My recommendation is to check out libschevo. [1]

It is compatible with Durus and ZODB databases and support schema 
migrations in Pure python.


cheers,

Etienne

1. https://www.isotopesoftware.ca/documentation/libschevo/

Le 2018-01-07 à 03:34, Jani Tiainen a écrit :

Hi,

You can use MongoDB with Django just fine. Though, you won't get any 
ORM integration.


If you're not bound to MongoDB yet personally I would suggest to take 
a look at ArangoDB. It doesn't have ORM integration either but in my 
opinion it's much better than MongoDB. It has many SQL-like features 
(including it's query language and proper transactions)


On Sun, Jan 7, 2018 at 5:00 AM, Mark Phillips 
mailto:m...@phillipsmarketing.biz>> wrote:


Is anyone on the list using MongoDB with Django?

I see the MongoDB-django engine is no longer in active
development, so I am not sure if I want to start using it as no
one is supporting it.

There are other python mongodb options, and some django rest mongo
options. I am curious what, if anything, the group is using.

Thanks!

Mark
-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAEqej2PCHthPB3gzAewsvT7o141gdLEq_0P6VVH5JFngcain%3Dw%40mail.gmail.com

<https://groups.google.com/d/msgid/django-users/CAEqej2PCHthPB3gzAewsvT7o141gdLEq_0P6VVH5JFngcain%3Dw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.




--
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91oe36_P3gzuPRqegX%3Dcqc%3DdF82vygqndJLW8vMqcwFQ1cg%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAHn91oe36_P3gzuPRqegX%3Dcqc%3DdF82vygqndJLW8vMqcwFQ1cg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/8cb57cdf-5660-0718-6eab-da14524e67dc%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can i get more clear understanding on django models?

2018-01-05 Thread Etienne Robillard

you can put docstrings to document what the classes are doing.. :-)

cheers,

Etienne


Le 2018-01-05 à 05:52, utpalbrahma1...@gmail.com a écrit :

from  django.db  import  models


class  Question(models.Model):
 question_text  =  models.CharField(max_length=200)
 pub_date  =  models.DateTimeField('date published')


class  Choice(models.Model):
 question  =  models.ForeignKey(Question,  on_delete=models.CASCADE)
 choice_text  =  models.CharField(max_length=200)
 votes  =  models.IntegerField(default=0)
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39e00f5e-41d1-4d17-8116-41db3c6ab072%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/39e00f5e-41d1-4d17-8116-41db3c6ab072%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/818a5636-3448-217c-88e6-fe68a245a460%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to convert Queryset to String?

2018-01-02 Thread Etienne Robillard

if your title object has a __str__ then it can be printed.

Printing a queryset object make no sense!

HTH

Etienne


Le 2018-01-02 à 04:30, Joshua O. Morales a écrit :

title = Title.objects.filter(title=title)
print(title)
Is there a way to turn this:
*]>*
into a string:
*Hello, World*



I tried using it as an argument but it gave me an error.

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9d47f644-68f6-4939-a0f2-65b4681701b5%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/9d47f644-68f6-4939-a0f2-65b4681701b5%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/60db2027-90dc-c226-238e-c1dafd636968%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django: text, font, and style

2018-01-01 Thread Etienne Robillard

Hi Malik,

I share your views regarding the autoescape templatetag.

Personally I don't use the Django template framework but depends on Mako 
for UTF-8 template rendering and HTML escaping.



Happy new year!

Etienne


Le 2018-01-01 à 13:46, Malik Rumi a écrit :


Apparently I completely misunderstand the built in template tags {% 
autoescape &} and {% safe %}. Either they don't do what I expect, or I 
can't get them to do what I expect. But what I am trying to do is not 
at all unusual, so this post is all about learning from the community 
what are the best practices for getting this done.



Simply put, I want to be able to put some style on any arbitrary text 
in any arbitrary article on my site.



I have tried the version of TinyMCE built into Mezzanine. I found it 
both too limiting and too complex for my purposes. I also think the 
idea of using a wysiwg editor just to make a single word bold 
or with  highlighting is pretty heavy handed. 
There must be a better way. What is it?



I did stumble across a snippet for a custom template tag, 
https://www.djangosnippets.org/snippets/1242/, but it is 9 years old 
and has only one comment in all that time. Although the comment is 
favorable, that's hardly what I would call a large and happy current 
user base. On the flip side, I assume this is not very different from 
how {% url %} works, so maybe it can be hacked to do what I'm talking 
about?



I also looked at djangopackages, and the results were disappointing. 
Django-text looked promising, but the author wrote me that it is no 
longer in active development :-(



So, all you experts out there, how do you solve this problem? Thanks.


p.s. I am comfortable with html, but CSS and javascript, not so much. 
Doesn't mean I can't or won't learn if that's your go to option, I'm 
just letting you know where I am.



p.s.s. HAPPY NEW YEAR TO ALL!

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0b700a53-7812-4a64-a690-0f606980179f%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/0b700a53-7812-4a64-a690-0f606980179f%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/5679eee2-aea2-aa0f-4a8a-58f2502f90bc%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Still having trouble with django-filebrowser

2017-12-29 Thread Etienne Robillard

Hey Mike,

Please take a look at this: 
https://stackoverflow.com/questions/3231432/admin-field-fails-to-save-with-tinymce-and-filebrowser-in-django


Best regards,

Etienne


Le 2017-12-29 à 17:30, Mike Dewhirst a écrit :

On 18/12/2017 8:23 PM, Etienne Robillard wrote:
Looks likes this is using javascript. What does the javascript 
console says? Is the markup of the page valid HTML?




The javascript is slightly different between dev on localhost and 
staging and I'm totally outta my depth :(


In the  section of the staging site which DOES show the upload 
widget there is a line which isn't in the localhost dev site ...




... which bothers me. It doesn't seem to be a js script???

Another difference is directly beneath the TinyMCE HTMLField textarea. 
See NOT IN LOCALHOST SCRIPT below.


(
function($){
    function tinymce4_init(selector){
    var tinymce4_config={
</pre><tt>    'file_browser_callback':djangoFileBrowser, < NOT IN 
</tt><tt>LOCALHOST SCRIPT
</tt><pre style="margin: 0em;">
setup:function(editor){editor.on('change',function(){editor.save();});},
    "language":"en",
    "contextmenu":"formats | link image",
    "statusbar":true,
</pre><tt>    "toolbar1":"formatselect | bold italic underline | 
</tt><tt>alignleft aligncenter alignright alignjustify | bullist numlist | 
</tt><tt>outdent indent | table | link image | codesample | preview code",
</tt><pre style="margin: 0em;">
    "directionality":"ltr",
    "height":360,
    "width":"auto",
    "theme":"modern",
</pre><tt>    "plugins":"link image preview codesample contextmenu table 
</tt><tt>code lists",
</tt><pre style="margin: 0em;">
    "inline":false,
    "selector":"textarea#id_instruction",
    "menubar":false
    };
    if(typeof selector!='undefined'){
    tinymce4_config['selector']=selector;
    }
    tinymce.init(tinymce4_config);
    }tinymce4_init();
})();


I have found file_browser_callback in a number of files but really 
don't understand javascript well enough to make sense of it. 
Re-venving and reinstalling everything


bleach==2.1.2
certifi==2017.11.5
chardet==3.0.4
Django==1.11.8
django-filebrowser-no-grappelli==3.7.3
django-tinymce4-lite==1.7.0
html5lib==1.0.1
idna==2.6
jsmin==2.2.2
olefile==0.44
Pillow==4.3.0
psycopg2==2.7.3
pytz==2017.3
requests==2.18.4
six==1.11.0
urllib3==1.22
webencodings==0.5.1

... doesn't make any difference.

On reflection I'm giving up. It is working on the Ubuntu side and 
while I don't understand why I don't have any more time to put into it.


Thank you all very much for your input. It makes this community - and 
Django - special.


Cheers

Mike




--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/35d61861-45bb-6af5-e0f3-86998897f69f%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Possible bug Django 2.0 CreateView generic CBV

2017-12-29 Thread Etienne Robillard

Hi Steven,

Could you put a "import pdb; pdb.set_trace()" somewhere in your code?

This way it would be pretty easy to inspect where the code is breaking.

Besides, why upgrading to Class-based-views if your previous Django 1.11 
implementation was working fine?


HTH

Etienne




Le 2017-12-28 à 20:44, Steven Meyer a écrit :
I hope I've got the right group this time. I originally posted it on 
Django core membership but Tim Graham emailed me to say it was the 
wrong group.


I am very new to Django - been at it for five weeks. Not sure whether 
this is a bug or my own stupidity.


Here is my model in an app called gcbv (for generic class-based view)

from django.db import models
from core.models import TimeStampModel
from django.urls import reverse
# Create your models here.

class Vehicle(TimeStampModel):
maker = models.CharField(max_length=100)
model_year = models.IntegerField()
vehicle_type = models.CharField(max_length=100)
slug = models.SlugField(max_length=100, unique=True)
vehicle_model = models.CharField(max_length=100)
website = models.URLField(max_length=100, blank=True)
email = models.EmailField(max_length=100, blank=True)
notes = models.TextField(blank=True, default='')
def __str__(self):
x = self.maker + ' ' + self.vehicle_model
return x

And here are the URLs

from django.contrib import admin
from django.urls import path, include
from django.conf.urls import url
from . import views
from django.urls import reverse
#from django.views.generic.base import TemplateView

app_name = 'gcbv'

urlpatterns = [
    path('sub1/', views.SubView.as_view(), name='sub1'),
    path('vehicle_list/', views.VehicleListView.as_view(),
        name = 'vehicle_list'),
    path('vehicle//',
        views.VehicleDetailView.as_view(),
        name='vehicle_detail'),
    path('vehicle/create', views.VehicleCreateView.as_view(),
        name='vehicle_create'),
    path('', views.IndexTemplateView.as_view(), name='index'),
]

And here is the relevant view

class VehicleCreateView(CreateView):
model = Vehicle
fields = ['maker', 'model_year', 'vehicle_type', 'slug',
'vehicle_model', 'website', 'email', 'notes']
labels = {'maker':'Maker', 'model_year':'Year',
'vehicle_type':'Type', 'vehicle_model':'Model',
'website':'Website', 'email':'Email', 'notes':'Notes'}


Here is the template:

{% extends "core/base.html" %}
{% block body_block %}
Vehicle Create for GCBV



  {% csrf_token %}
  {{ form.as_p }}
  Submit


End Vehicle Create for GCBV
{% endblock %}

I've attached screenshots of:

--The rendered form template

--What happens after I click submit

It looks as if the data is not being saved to the database.

If I add the same data from admin everything works fine. I've attached 
another screenshot showing that VehicleDetailView has found the 
relevant template and rendered the information.


Any help would be greatly appreciated.

NB: This all worked fine when I was using function views and regex 
instead of path.




--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5aa037bb-25d5-442d-b1a6-b1bbc558dead%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/5aa037bb-25d5-442d-b1a6-b1bbc558dead%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/94338840-e876-ffbc-d3cd-2fd3a127f15d%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'module' object has no attribute 'lru_cache'

2017-12-27 Thread Etienne Robillard
OK, I've read the INSTALL file and noticed that Django dropped support 
for Python 2.7.


Any reasons for dropping support for Python 2.7 in the first place ?

Regards,

Etienne


Le 2017-12-27 à 05:05, Etienne Robillard a écrit :

Hi,

I'm trying to upgrade my development server to Django 2.0 using 
setup.py develop command:


erob@marina:~/ncvs/django$ sudo python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 32, in 
    version = __import__('django').get_version()
  File "/home/erob/ncvs/django/django/__init__.py", line 1, in 
    from django.utils.version import get_version
  File "/home/erob/ncvs/django/django/utils/version.py", line 61, in 


    @functools.lru_cache()
AttributeError: 'module' object has no attribute 'lru_cache'

Why does the setup.py script attempt to import the django package?

Is it possible to upgrade Django from source when release 1.11.6 is 
already installed in /usr/local ?


Thank you in advance,

Etienne



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/2a503d84-2c58-ecca-a8a0-aeef800f0487%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


'module' object has no attribute 'lru_cache'

2017-12-27 Thread Etienne Robillard

Hi,

I'm trying to upgrade my development server to Django 2.0 using setup.py 
develop command:


erob@marina:~/ncvs/django$ sudo python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 32, in 
    version = __import__('django').get_version()
  File "/home/erob/ncvs/django/django/__init__.py", line 1, in 
    from django.utils.version import get_version
  File "/home/erob/ncvs/django/django/utils/version.py", line 61, in 


    @functools.lru_cache()
AttributeError: 'module' object has no attribute 'lru_cache'

Why does the setup.py script attempt to import the django package?

Is it possible to upgrade Django from source when release 1.11.6 is 
already installed in /usr/local ?


Thank you in advance,

Etienne

--
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/1cdaf2bc-ddb9-5940-ed33-4bfa162f439d%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] BlogEngine 0.8.2 release

2017-12-26 Thread Etienne Robillard

Hi all,

I'm excited to announce the public release of BlogEngine2, a ZODB 
powered blogging microframework on top of Django. :P


BlogEngine2 is a full-featured API to develop a functional blog site in 
Python and django-hotsauce.


Download:

https://www.isotopesoftware.ca/pub/blogengine2/blogengine2-0.8.2.tar.gz

https://pypi.python.org/pypi/blogengine2/0.8.2

Changes:

- Bugfixes release - Updated to django-hotsauce 0.8.2

For more info, please see the wiki: 
https://www.isotopesoftware.ca/wiki/BlogEngine


Cheers,

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/ded3df04-e08e-ebb3-0f7b-28c136a62090%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: DJANGO NOT FOUND

2017-12-25 Thread Etienne Robillard

Hi,

Why do you use eclipse? I don't recommend using and IDE like eclipse for 
django and python programming since it may easily confuse newbies who 
still need to learn the language.


Virtualenv is ok assuming you have basic Python programming experience 
but Django can run fine without it.


Keep it simple, take the time to learn the language and don't make 
things more complex than they are.


HTH

Etienne

Le 2017-12-24 à 05:58, Avraham Serour a écrit :
did you create a virtualenv for the project? you shouldn't pip install 
stuff in the system python.


can you import django using the python console?

On Sun, Dec 24, 2017 at 2:22 AM, Jack 
<mailto:jackjimmygonzalesro...@gmail.com>> wrote:


Hi, i've installed on my ubuntu 16.04 LTS python3.6 and django but
django i have installed with pip3 and usign virtualenv, but it is
ok by console, the problem is in eclipse, i installed python, it
is OK, but at the moment of creating a django project, it drops a
message, djangonotfound, i've removed the interpreter and add it
again because i thought it was the problem but the problem
continues, i've uninstalled pydev from eclipse and the problem is
the same.

If someone knows about this, please help me.

Thnks a lot.
-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/58251deb-dc26-4f68-8a1b-c838f0f97e43%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/58251deb-dc26-4f68-8a1b-c838f0f97e43%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tK0Ev9jCqT2h%3Dd5K4QocPUjx4MvnNiNwQDQ9ZyAkdv5gg%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAFWa6tK0Ev9jCqT2h%3Dd5K4QocPUjx4MvnNiNwQDQ9ZyAkdv5gg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f24a6ec9-7822-1f67-3cbf-e78256443baa%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'WSGIRequest' object has no attribute 'user'

2017-12-25 Thread Etienne Robillard
Please show us any relevant traceback message, and include your Python 
and Django versions as well.


cheers,

Etienne


Le 2017-12-24 à 23:55, harsh sharma a écrit :

i am getting  this error  when ever i try to run localhost/admin


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2f504ec2-ddde-4bd9-95ed-74edf91584b0%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/2f504ec2-ddde-4bd9-95ed-74edf91584b0%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/a866cc45-bc56-b35b-0d57-43feaf02a421%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce-oauthclient 0.2 is out

2017-12-21 Thread Etienne Robillard

Hi all,

I'm glad to announce the 0.2 release of django-hotsauce-oauthclient, a 
WSGI middleware to authenticate with OAuth 2.0 framework.


Django-hotsauce-oauthclient is a experimental WSGI middleware  on top of 
django-hotsauce and oauthlib.


It is a fork of the wsgi_oauth2 library.

Changes:

- Added experimental HTTPS support.

For more info please see: 
https://www.isotopesoftware.ca/wiki/DjangoHotSauce/OAuth


Cheers,

Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/7765b22d-c2e9-cdeb-fbe1-44009602a3f1%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to send parameter to view?

2017-12-19 Thread Etienne Robillard

Hi Kubilay,

I guess you could use sessions for that.

For example:

contest = request.session['contest_name']

See: https://docs.djangoproject.com/en/2.0/topics/http/sessions/

HTH

Etienne


Le 2017-12-18 à 10:36, Kubilay Yazoğlu a écrit :

Hello. I have two apps. Posts and Contests.

In templates/contest/detail.html, there is a button that takes you to 
templates/post/create.html


What I want is to send the contest name from detail to create so that 
the post will be added to the right contest. For that, I guess I 
should do something to send contest name from detail.html to create 
view of post/create. Right?
In the following code (post\views.py), the contest name is determined 
randomly. Help me to get the right contest please.


if request.method== 'POST': items= Contest.objects.all()
 random_item= random.choice(items)
 form= PostForm(request.POST,request.FILES)

 if form.is_valid(): post= form.save(commit = False)
 post.contest= random_item
 post.ownername= request.user
 post.save()
 messages.success(request,'You have succesfully sent a post')
 return HttpResponseRedirect(random_item.get_absolute_url())
else: form= PostForm()
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ddc3b1d3-32a3-4457-a36d-5cbbea6255b6%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/ddc3b1d3-32a3-4457-a36d-5cbbea6255b6%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/28b623ce-0214-0814-82c1-a1d9f1f3aef5%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Geo problem. TypeError: get_distance() got an unexpected keyword argument 'handle_spheroid'

2017-12-18 Thread Etienne Robillard

Hi 王祥,

Check out this: https://code.djangoproject.com/ticket/25524

HTH

Etienne


Le 2017-12-18 à 04:34, 王祥 a écrit :

I'm using django gis app. My model is like this:
<https://lh3.googleusercontent.com/-dVausGAScrE/WjeJ4DPgTnI/ACw/7yfzkkQJ9mkvT40y3VC4RgDH4-SFfDgxwCLcBGAs/s1600/model.png>
And the command
|
MyPoint3.objects.filter(point__distance_lt=(Point(0,0),4))
|
runs successfully in django 2.0 version, but it fails running in 
django v1.11.

The trace_back info is like this:
<https://lh3.googleusercontent.com/-qFQLHyThvQ4/WjeLHvep2FI/AC8/Z5Rw1aTkzCA2Hd3iWAs33y8N1jG__BMLQCLcBGAs/s1600/fail.png>

How can I fix the problem? Thank you for your attention.
You can see the whole demo project and code in this repository. 
<https://github.com/ramwin/geodjango>

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d90a2f6d-3a98-4ebb-9603-2535127f0698%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/d90a2f6d-3a98-4ebb-9603-2535127f0698%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/1e2d7eba-3d3b-2c59-07a7-af4a1af55f61%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Still having trouble with django-filebrowser

2017-12-18 Thread Etienne Robillard
Looks likes this is using javascript. What does the javascript console 
says? Is the markup of the page valid HTML?


HTH

Etienne

Le 2017-12-17 à 22:06, Mike Dewhirst a écrit :
This time with version 3.9.2 having climbed a little higher into the 
branches ...


C:\Users\mike\envs\xxct3\lib\site-packages\django_filebrowser-3.9.2-py3.6.egg\filebrowser\sites.py:12: 
RemovedInDjango20Warning: Importing from django.core.urlresolvers is 
deprecated in favor of django.urls.
   from django.core.urlresolvers import reverse, get_urlconf, 
get_resolver
C:\Users\mike\envs\xxct3\train\train\urls.py:113: 
RemovedInDjango20Warning: Passing a 3-tuple to 
django.conf.urls.include() is deprecated. Pass a 2-tuple containing 
the list of patterns and app_name, and provide the namespace argument 
to include() instead.

   url(r'^admin/filebrowser/', include(site.urls)),

But no change.

I have also deleted my project/templates/admin folder and still no 
change from the screenshot sent earlier - which I did not see so I'll 
attach a new one to this email.


Cheers

Mike


On 18/12/2017 11:35 AM, Mike Dewhirst wrote:

On 18/12/2017 9:28 AM, Etienne Robillard wrote:


Hi Mike,

What Django version are you using? Is this happening with Python 2 
or 3?




Sorry Etienne. Should have mentioned that.

Python 3.6 but it also needs to work with Py27

Django 1.11.8


Have you tried to turn on Python warnings?



C:\Users\mike\envs\xxct3\lib\site-packages\filebrowser\sites.py:12: 
RemovedInDjango20Warning: Importing from django.core.urlresolvers is 
deprecated in favor of django.urls.
  from django.core.urlresolvers import reverse, get_urlconf, 
get_resolver
C:\Users\mike\envs\xxct3\train\train\urls.py:113: 
RemovedInDjango20Warning: Passing a 3-tuple to 
django.conf.urls.include() is deprecated. Pass a 2-tuple containing 
the list of patterns and app_name, and provide the namespace argument 
to include() instead.

  url(r'^admin/filebrowser/', include(site.urls)),


Have you tried to use the development verion of django-filebrowser?



Yes. Installed from trunk. Same outcome. Here is a screenshot




HTH

Etienne


Le 2017-12-17 à 15:48, Mike Dewhirst a écrit :

An update. I adjusted settings ...

FILEBROWSER_DIRECTORY = 'uploads/'
FILEBROWSER_VERSIONS_BASEDIR = '_versions/'

.. and to match these dirs ...

'media/_versions/'
'media/uploads/'

Still won't show me an upload or browse button in the insert image 
dialog.


I also uninstalled and reinstalled to no effect.

Thanks for any help

Mike

On Saturday, December 16, 2017 at 7:04:34 PM UTC+11, Mike Dewhirst 
wrote:


    I have tried both django-filebrowser and
    django-filebrowser-no-grappelli
    with django-tinymce4-lite

    The TinyMCE part is working fine in the Admin and trying to
    insert an
    image in the text is trying to work and if I pasted in a url it
    would
    probably insert the image it points to.

    The problem is there is no browse button in the image-insert
    dialog box.

    The Admin ImageField [Browse] button works fine.

    In settings ...
    FILEBROWSER_DIRECTORY = '/'

     url(r'^admin/filebrowser/', include(site.urls)),
     url(r'^tinymce/', include('tinymce.urls')),
     url(r'^admin/', admin.site.urls),

    Any hints appreciated ..

    Thanks

    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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9a34b92-9005-4cda-a4a6-40efc00dcf28%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/f9a34b92-9005-4cda-a4a6-40efc00dcf28%40googlegroups.com?utm_medium=email&utm_source=footer>. 


For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0f1b5957-e66b-4c8a-57ca-85d7848406d6%40yandex.com 
<https://groups.google.com/d/msgid/django-users/

Re: Still having trouble with django-filebrowser

2017-12-17 Thread Etienne Robillard

Hi Mike,

What Django version are you using? Is this happening with Python 2 or 3?

Have you tried to turn on Python warnings?

Have you tried to use the development verion of django-filebrowser?

HTH

Etienne


Le 2017-12-17 à 15:48, Mike Dewhirst a écrit :

An update. I adjusted settings ...

FILEBROWSER_DIRECTORY = 'uploads/'
FILEBROWSER_VERSIONS_BASEDIR = '_versions/'

.. and to match these dirs ...

'media/_versions/'
'media/uploads/'

Still won't show me an upload or browse button in the insert image dialog.

I also uninstalled and reinstalled to no effect.

Thanks for any help

Mike

On Saturday, December 16, 2017 at 7:04:34 PM UTC+11, Mike Dewhirst wrote:

I have tried both django-filebrowser and
django-filebrowser-no-grappelli
with django-tinymce4-lite

The TinyMCE part is working fine in the Admin and trying to insert an
image in the text is trying to work and if I pasted in a url it would
probably insert the image it points to.

The problem is there is no browse button in the image-insert
dialog box.

The Admin ImageField [Browse] button works fine.

In settings ...
FILEBROWSER_DIRECTORY = '/'

 url(r'^admin/filebrowser/', include(site.urls)),
 url(r'^tinymce/', include('tinymce.urls')),
 url(r'^admin/', admin.site.urls),

Any hints appreciated ..

Thanks

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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9a34b92-9005-4cda-a4a6-40efc00dcf28%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/f9a34b92-9005-4cda-a4a6-40efc00dcf28%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/0f1b5957-e66b-4c8a-57ca-85d7848406d6%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to implement full-text search in Django?

2017-12-16 Thread Etienne Robillard

Thanks Egor. Django-haystack looks quite flexible and well-designed.

My current plan is to use redisearch plugin for Redis: 
http://redisearch.io/


I'm thinking that I could write a script to import into redis a list of 
URLs by fetching a RSS file as input and then use redisearch to perform 
a full-text search query and return a JSON stream.


My goal is to not duplicate data between redis and zodb...

What do you think?

Etienne


Le 2017-12-16 à 06:05, Egor Smolyakov a écrit :

Check out this library https://github.com/django-haystack/django-haystack

It supports a wide range of backends.

On 16/12/2017, Etienne Robillard  wrote:

Hi all,

I would like some input on implementing a full-text search engine for my
website and blog.

I really don't want to use Google search API or a external webservice to
index my documents.

Also, my blog is powered by ZODB while my main website uses Durus.

Ideally, i would like to use Redis server to index my documents and
Ajax/jQuery to make a search using JSON.

I have considered Elasticsearch, but it requires Java, and I don't
really like this.

Is there any other alternatives for indexing non-relational database
objects such as ZODB ?

What do you think?


Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/02c550ee-57c9-a7b6-128b-343693c98cbe%40yandex.com.
For more options, visit https://groups.google.com/d/optout.





--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/21edc431-64dd-e7f5-5d5f-4a9d522ca985%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


How to implement full-text search in Django?

2017-12-16 Thread Etienne Robillard

Hi all,

I would like some input on implementing a full-text search engine for my 
website and blog.


I really don't want to use Google search API or a external webservice to 
index my documents.


Also, my blog is powered by ZODB while my main website uses Durus.

Ideally, i would like to use Redis server to index my documents and 
Ajax/jQuery to make a search using JSON.


I have considered Elasticsearch, but it requires Java, and I don't 
really like this.


Is there any other alternatives for indexing non-relational database 
objects such as ZODB ?


What do you think?


Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/02c550ee-57c9-a7b6-128b-343693c98cbe%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Decrypting Password

2017-12-14 Thread Etienne Robillard

And why do you want to do that?

Etienne

Le 2017-12-14 à 02:08, hardiksara...@gmail.com a écrit :
I want to decrypt the encrypted   the password formed in django is 
there any way please 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 
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8effca8d-942c-493d-ad34-a7ca43524318%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/8effca8d-942c-493d-ad34-a7ca43524318%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/87635f9d-8e93-d3fa-8cda-3762d1281b53%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: can't create app in putty

2017-12-13 Thread Etienne Robillard

Hi,

Perhaps you need to set PYTHONPATH to the location where your app module 
is located.


HTH

Etienne


Le 2017-12-13 à 01:54, Виктор Копылец a écrit :
I buy hosting and create project. Then i decided create app. I write 
python manage.py startapp webapp and jumps out error :



  Traceback (most recent call last):
  File "manage.py", line 22, in 
    execute_from_command_line(sys.argv)
  File 
"/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", 
line 364, in execute_from_command_line

    utility.execute()
  File 
"/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", 
line 308, in execute

    settings.INSTALLED_APPS
  File 
"/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/conf/__init__.py", 
line 56, in __getattr__

    self._setup(name)
  File 
"/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/conf/__init__.py", 
line 41, in _setup

    self._wrapped = Settings(settings_module)
  File 
"/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/conf/__init__.py", 
line 110, in __init__

    mod = importlib.import_module(self.SETTINGS_MODULE)
  File 
"/home2/victorko/virtualenv/app/3.4/lib64/python3.4/importlib/__init__.py", 
line 109, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 2254, in _gcd_import
  File "", line 2237, in _find_and_load
  File "", line 2212, in 
_find_and_load_unlocked
  File "", line 321, in 
_call_with_frames_removed

  File "", line 2254, in _gcd_import
  File "", line 2237, in _find_and_load
  File "", line 2224, in 
_find_and_load_unlocked

  ImportError: No module named 'app.app'


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3cf5b8f8-dcdc-4827-9af6-0878fb33ce22%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/3cf5b8f8-dcdc-4827-9af6-0878fb33ce22%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/a185d63f-4d41-68b5-9829-969a957a6594%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: nginx error in Digital Ocean

2017-12-12 Thread Etienne Robillard

Hi,

Have you tried to compile nginx from source and specify the log 
directory with --http-log-path=/var/log/nginx/access.log ?


Etienne


Le 2017-12-12 à 10:17, Coqui a écrit :

I am trying to deploy to digital ocean but when I run

sudo nginx -t

I get : nginx: [emerg] open() "... /logs/nginx-access.log" failed (2: 
No such file or directory)


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/48496a0d-60c8-41f1-8721-4b379bf47d92%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/48496a0d-60c8-41f1-8721-4b379bf47d92%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f3e7b06a-e3e0-630a-f128-69af566fc88c%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


[OT] Is Trump planning to break the Internet?

2017-12-10 Thread Etienne Robillard

Hey all,

On December 14, the FCC will vote to repeal net neutrality and possibly 
rig the Internet. This means that major corporations could pay to have 
their content delivered faster while independent websites traffic would 
be throttled. I think this is a outrageous move and could seriously harm 
independent websites and communities from reaching their key audience. 
We must not let this happen!


Please share the word with your peers. It is imperative that we must 
unite and act together to fight for our freedom of speech and prevent 
the Internet from becoming obsolete. The Internet is a brilliant 
technology allowing billions of people to share their knowledge 
independently. We must defend at all costs its very own foundations and 
protect it from censorship and tyranny!


Sincerely,

Etienne Robillard

https://www.fightforthefuture.org/


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/da647177-c1e5-b0be-cbca-fdb6d9794b18%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: ModelAdmin Media JS file order issue in Django 2.0

2017-12-10 Thread Etienne Robillard
Why don't you simply put the javascripts into your base template without 
using Python ?


Etienne


Le 2017-12-10 à 09:30, Marc R a écrit :

I have this in my model:

class Media:
        js = (
*'/static/plugins/codemirror/lib/codemirror.js',*
'/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
'/static/plugins/codemirror/addon/fold/foldcode.js',
'/static/plugins/codemirror/addon/fold/foldgutter.js',
'/static/plugins/codemirror/addon/fold/brace-fold.js',
'/static/plugins/codemirror/addon/fold/indent-fold.js',
'/static/plugins/codemirror/addon/fold/comment-fold.js',
'/static/plugins/codemirror/addon/fold/xml-fold.js',
'/static/plugins/codemirror/addon/comment/comment.js',
'/static/plugins/codemirror/addon/edit/matchbrackets.js',
'/static/plugins/codemirror/addon/edit/matchtags.js',
'/static/plugins/codemirror/mode/javascript/javascript.js',
            '/static/plugins/codemirror/mode/xml/xml.js',
'/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
'/static/plugins/codemirror/addon/display/fullscreen.js',
'/static/js/admin/syslog/syslog_change_form.min.js'
        )

which used to work as it was included in the model admin page in the 
order it appears. However, now in Django 2.0, it appears in this order:
<tt>src="/static/plugins/codemirror/addon/fold/foldcode.js">
<tt>src="/static/plugins/codemirror/addon/fold/foldgutter.js">
<tt>src="/static/plugins/codemirror/addon/fold/brace-fold.js">
<tt>src="/static/plugins/codemirror/addon/fold/indent-fold.js">
<tt>src="/static/plugins/codemirror/addon/fold/comment-fold.js">
<tt>src="/static/plugins/codemirror/addon/fold/xml-fold.js">
<tt>src="/static/plugins/codemirror/addon/comment/comment.js">
<tt>src="/static/plugins/codemirror/addon/edit/matchbrackets.js">
<tt>src="/static/plugins/codemirror/addon/edit/matchtags.js">
<tt>src="/static/plugins/codemirror/mode/javascript/javascript.js">
<tt>src="/static/plugins/codemirror/mode/xml/xml.js">
*<tt>src="/static/plugins/codemirror/lib/codemirror.js">*
<tt>src="/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js">
<tt>src="/static/plugins/codemirror/addon/display/fullscreen.js">
<tt>src="/static/js/admin/syslog/syslog_change_form.min.js">


The issue is that the First file MUST be first as the remainder rely 
upon it!  I'd rather not override a template file as if i change the 
admin backend with a package i'd like this to "just work" as it did in 
Django 1.11
Is this a bug in the new way that Django includes these files (docs 
say they made a change in how this is done, clearly it broke something 
that worked!).


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 
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5ad93160-05c2-4251-84ad-6f8a1574b675%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/5ad93160-05c2-4251-84ad-6f8a1574b675%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/36e6755b-ed27-9a77-9bdd-77a9bd4bf429%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re:

2017-12-09 Thread Etienne Robillard

Hi Chaitanya,

If you're not afraid of getting your hands dirty by playing with 
django-hotsauce, you could try django-livestore, a fork of the Satchmo 
framework.


See: https://bitbucket.org/tkadm30/livestore

Best regards,

Etienne

Le 2017-12-09 à 14:33, chaitanya goud a écrit :

Hey I would like to know about
Where to download a e-commerce website in django and how run it
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BkSnu5ytKSOhk_kqGzUFs4UjXd17HpkcwsmzF_Ckq8%2BL-Qz-Q%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CA%2BkSnu5ytKSOhk_kqGzUFs4UjXd17HpkcwsmzF_Ckq8%2BL-Qz-Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/39853fdf-8529-5d10-2faa-2770f4b20e98%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: uwsgi stats middleware for Django

2017-12-09 Thread Etienne Robillard
     {% trans "Workers accepting connections" %}
    
    
    {{stats.workers_accepting_connections}}
    
    
    
    
    {% trans "Total threads" %}
    
    
    {{stats.threads_total}}
    
    
    
    
    {% trans "Busy threads" %}
    
    
    {{stats.threads_busy}}
    
    
    
    
    {% trans "Total processed requests" %}
    
    
    {{stats.requests_processed}}
    
    
    
    

{% endblock content %}
"""

A request dispatched while ApacheBench was generating some load
(concurrency = 15) into the server rendered the image you can find
attached to this message.

Sincerely,
Adler

Em sexta-feira, 8 de dezembro de 2017 10:09:41 UTC-2, Etienne
Robillard escreveu:

Hi Ádler,

Thank you for your reply.

Can you please review this code before I commit?


"""uWSGIController API Version 0.8.3

Middleware for storing uWSGI statistics into the environ object.
"""

import sys
import os
import logging
import demjson
import urllib

logger = logging.getLogger(__name__)

from notmm.controllers.wsgi import WSGIController

__all__ = ('uWSGIController',)


class uWSGIController(WSGIController):

    def __init__(self, wsgi_app,
stats_url='http://localhost:9001 <http://localhost:9001>'):

    self.wsgi_app = wsgi_app
    self.stats_url = stats_url
    super(uWSGIController, self).__init__() # hack

    def init_request(self, request):
    logger.debug('In uWSGIController.init_request...')
    request.environ['uwsgi.requests'] =
self.connections(self.stats_url)
    self._request = request
    self._environ = request.environ
    return self._request

    def connections(self, url):
    """Return the amount of live connections (requests)
for all workers"""
    fp = urllib.urlopen(url)
    json = demjson.decode(fp.read())

    connections = 0

    for worker in json['workers']:
    connections += worker['requests']

    fp.close()

    return connections


Best regards,

    Etienne


Le 2017-12-07 à 13:29, Ádler Oliveira Silva Neves a écrit :


Sounds like you want retrieving statistics from uWSGI's stats
server.

http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html
<http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html>

In order to get that JSON via HTTP requests, your server
".ini" should receive extra arguments to start an stats
server listening to the specified port and application must
be somehow aware of such port number, which has a side-effect
of increasing coupling.

Sincerely,

Adler

On 07/12/2017 13:13, Etienne Robillard wrote:

Hi,

I would like to access the uWSGI stats API from within
Django by creating a custom WSGI middleware.

Could it be possible to compute the number of requests
currently being used by uWSGI workers in Python/Django ?

Ideally, i could then retrieve the active connections in use
in a standard Django view:

def someview(request):

    # retrieve the number of active requests (connections)

    connections = request.environ['uwsgi.requests']


What do you think?


Etienne




-- 
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
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/c6d79973-28b8-5236-a64e-4c24ed3c30a7%40gmail.com

<https://groups.google.com/d/msgid/django-users/c6d79973-28b8-5236-a64e-4c24ed3c30a7%40gmail.com?utm_medium=email

Re: uwsgi stats middleware for Django

2017-12-08 Thread Etienne Robillard

Hi Ádler,

Thank you for your reply.

Can you please review this code before I commit?


"""uWSGIController API Version 0.8.3

Middleware for storing uWSGI statistics into the environ object.
"""

import sys
import os
import logging
import demjson
import urllib

logger = logging.getLogger(__name__)

from notmm.controllers.wsgi import WSGIController

__all__ = ('uWSGIController',)


class uWSGIController(WSGIController):

    def __init__(self, wsgi_app, stats_url='http://localhost:9001'):

    self.wsgi_app = wsgi_app
    self.stats_url = stats_url
    super(uWSGIController, self).__init__() # hack

    def init_request(self, request):
    logger.debug('In uWSGIController.init_request...')
    request.environ['uwsgi.requests'] = 
self.connections(self.stats_url)

    self._request = request
    self._environ = request.environ
    return self._request

    def connections(self, url):
    """Return the amount of live connections (requests) for all 
workers"""

    fp = urllib.urlopen(url)
    json = demjson.decode(fp.read())

    connections = 0

    for worker in json['workers']:
    connections += worker['requests']

    fp.close()

    return connections


Best regards,

Etienne


Le 2017-12-07 à 13:29, Ádler Oliveira Silva Neves a écrit :


Sounds like you want retrieving statistics from uWSGI's stats server.

http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html

In order to get that JSON via HTTP requests, your server ".ini" should 
receive extra arguments to start an stats server listening to the 
specified port and application must be somehow aware of such port 
number, which has a side-effect of increasing coupling.


Sincerely,

Adler

On 07/12/2017 13:13, Etienne Robillard wrote:

Hi,

I would like to access the uWSGI stats API from within Django by 
creating a custom WSGI middleware.


Could it be possible to compute the number of requests currently 
being used by uWSGI workers in Python/Django ?


Ideally, i could then retrieve the active connections in use in a 
standard Django view:


def someview(request):

    # retrieve the number of active requests (connections)

    connections = request.environ['uwsgi.requests']


What do you think?


Etienne




--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c6d79973-28b8-5236-a64e-4c24ed3c30a7%40gmail.com 
<https://groups.google.com/d/msgid/django-users/c6d79973-28b8-5236-a64e-4c24ed3c30a7%40gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/381c4e78-74b3-74d2-8298-7684820db97e%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


uwsgi stats middleware for Django

2017-12-07 Thread Etienne Robillard

Hi,

I would like to access the uWSGI stats API from within Django by 
creating a custom WSGI middleware.


Could it be possible to compute the number of requests currently being 
used by uWSGI workers in Python/Django ?


Ideally, i could then retrieve the active connections in use in a 
standard Django view:


def someview(request):

    # retrieve the number of active requests (connections)

    connections = request.environ['uwsgi.requests']


What do you think?


Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/849152fb-01ba-e59f-2022-eb02a4ffceee%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: memory leak in django app?

2017-12-06 Thread Etienne Robillard

Hi Antonis,


Le 2017-12-06 à 16:23, Antonis Christofides a écrit :

The "SSL handshake failed" doesn't seem related to the alleged memory leak.
Correct. I forgot to specify which SSL protocol to use. Using ab -f 
TLSV1 solved that problem.


Now, you say you have this problem only in production. If you restart uwsgi,
does memory usage go immediately up? Does it go after a few requests? How many
requests? Do you have the same data in development and production? If, for
example, your app loads a whole db table in memory, and this db table has a
million records in production and only a few in development, there would be a
difference.
The problem started to appear in production after a few days without 
restarting the main uWSGI process.


Also, the database in use is ZODB and is not affected by this issue at all!

So, I'm guessing this is a problem with uWSGI, not Django. For example, 
running the development server with wsgiref on my local host do not take 
more than 3.5% of rss memory with DEBUG=True.


Regards,

Etienne



Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-12-06 19:38, Etienne Robillard wrote:

Hi Antonis,

My development server appears unaffected by this problem. Plus I can get heap
stats using guppy, which is pretty cool. :)

Both my production and development servers have __debug__ enabled in Python
2.7.13.

However when using ab -c 100 to benchmark my nginx server I get:

SSL handshake failed (1).

Do you have any ideas how to configure nginx to allow a minimum of 100
concurrent connections when using SSL encryption?

I have worker_connections set to 512 in my nginx.conf

Regards,

Etienne


Le 2017-12-06 à 12:17, Antonis Christofides a écrit :

Does this happen only in production? What about when you run a development
server? What is the memory usage of your development server?

Antonis Christofides
http://djangodeployment.com


On 2017-12-06 15:05, Etienne Robillard wrote:

Hi Antonis,

Thank you for your reply. I installed the htop utility and found that 2 of my
4 uWSGI processes are using 882M (42.7%) of resident memory each. Theses two
processes takes about  (85%) of the available RAM memory! That can explain why
I get "out of memory" errors when no more memory is available for sshd.

I tried to debug memory allocation with guppy following instructions here:
https://www.toofishes.net/blog/using-guppy-debug-django-memory-leaks/

But I get "hp.Nothing" when I attempt to get the heap stats from the master
uWSGI process.

Example:

hp.setref()
hp.heap()

hp.Nothing

Any help would be appreciated!

Etienne


Le 2017-12-06 à 07:53, Antonis Christofides a écrit :

Hello,

the amount of memory you need depends on what Django does and how many workers
(instances of Django) you run (which usually depends on how many requests you
are getting and how I/O intensive your Django application is). For many
applications, 512 MB is enough.

Why are you worried? The only symptom you describe is that your free memory is
decreasing. This is absolutely normal. The operating system doesn't like RAM
that is sitting down doing nothing, so it will do its best to make free RAM
nearly zero. Whenever there's much RAM available, it uses more for its caches.

How much memory is your Django app consuming? You can find out by executing
"top" and pressing "M" to sort by memory usage.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-12-06 14:04, Etienne Robillard wrote:

Hi all,

I'm struggling to understand how django/python may allocate and unallocate
memory when used with uWSGI.

I have a Debian system running Python 2.7 and uwsgi with 2GB of RAM and 2
CPUs.

Is that enough RAM memory for a uWSGI/Gevent based WSGI app running Django?

I'm running uWSGI with the --gevent switch in order to allow cooperative
multithreading, but my free RAM memory is always decreasing when nginx is
running.

How can I debug memory allocation in a Django/uWSGI app?

I defined also in my sitecustomize.py "gc.enable()" to allow garbage
collection, but it does not appears to make any differences.

Can you recommend any libraries to debug/profile memory allocation in Python
2.7 ?

Is Django more memory efficient with --pymalloc or by using the default linux
malloc() ?

Thank you in advance,

Etienne



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/c8941fcd-871e-cc41-c2b3-3d07c6a0d193%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: memory leak in django app?

2017-12-06 Thread Etienne Robillard

Hi Antonis,

My development server appears unaffected by this problem. Plus I can get 
heap stats using guppy, which is pretty cool. :)


Both my production and development servers have __debug__ enabled in 
Python 2.7.13.


However when using ab -c 100 to benchmark my nginx server I get:

SSL handshake failed (1).

Do you have any ideas how to configure nginx to allow a minimum of 100 
concurrent connections when using SSL encryption?


I have worker_connections set to 512 in my nginx.conf

Regards,

Etienne


Le 2017-12-06 à 12:17, Antonis Christofides a écrit :

Does this happen only in production? What about when you run a development
server? What is the memory usage of your development server?

Antonis Christofides
http://djangodeployment.com


On 2017-12-06 15:05, Etienne Robillard wrote:

Hi Antonis,

Thank you for your reply. I installed the htop utility and found that 2 of my
4 uWSGI processes are using 882M (42.7%) of resident memory each. Theses two
processes takes about  (85%) of the available RAM memory! That can explain why
I get "out of memory" errors when no more memory is available for sshd.

I tried to debug memory allocation with guppy following instructions here:
https://www.toofishes.net/blog/using-guppy-debug-django-memory-leaks/

But I get "hp.Nothing" when I attempt to get the heap stats from the master
uWSGI process.

Example:

hp.setref()
hp.heap()

hp.Nothing

Any help would be appreciated!

Etienne


Le 2017-12-06 à 07:53, Antonis Christofides a écrit :

Hello,

the amount of memory you need depends on what Django does and how many workers
(instances of Django) you run (which usually depends on how many requests you
are getting and how I/O intensive your Django application is). For many
applications, 512 MB is enough.

Why are you worried? The only symptom you describe is that your free memory is
decreasing. This is absolutely normal. The operating system doesn't like RAM
that is sitting down doing nothing, so it will do its best to make free RAM
nearly zero. Whenever there's much RAM available, it uses more for its caches.

How much memory is your Django app consuming? You can find out by executing
"top" and pressing "M" to sort by memory usage.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-12-06 14:04, Etienne Robillard wrote:

Hi all,

I'm struggling to understand how django/python may allocate and unallocate
memory when used with uWSGI.

I have a Debian system running Python 2.7 and uwsgi with 2GB of RAM and 2 CPUs.

Is that enough RAM memory for a uWSGI/Gevent based WSGI app running Django?

I'm running uWSGI with the --gevent switch in order to allow cooperative
multithreading, but my free RAM memory is always decreasing when nginx is
running.

How can I debug memory allocation in a Django/uWSGI app?

I defined also in my sitecustomize.py "gc.enable()" to allow garbage
collection, but it does not appears to make any differences.

Can you recommend any libraries to debug/profile memory allocation in Python
2.7 ?

Is Django more memory efficient with --pymalloc or by using the default linux
malloc() ?

Thank you in advance,

Etienne



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/d9039dfa-c3b0-955b-44fc-b42cc7e49fd5%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: memory leak in django app?

2017-12-06 Thread Etienne Robillard

Hi Antonis,

Thank you for your reply. I installed the htop utility and found that 2 
of my 4 uWSGI processes are using 882M (42.7%) of resident memory each. 
Theses two processes takes about  (85%) of the available RAM memory! 
That can explain why I get "out of memory" errors when no more memory is 
available for sshd.


I tried to debug memory allocation with guppy following instructions 
here: https://www.toofishes.net/blog/using-guppy-debug-django-memory-leaks/


But I get "hp.Nothing" when I attempt to get the heap stats from the 
master uWSGI process.


Example:
>>> hp.setref()
>>> hp.heap()
hp.Nothing

Any help would be appreciated!

Etienne


Le 2017-12-06 à 07:53, Antonis Christofides a écrit :

Hello,

the amount of memory you need depends on what Django does and how many workers
(instances of Django) you run (which usually depends on how many requests you
are getting and how I/O intensive your Django application is). For many
applications, 512 MB is enough.

Why are you worried? The only symptom you describe is that your free memory is
decreasing. This is absolutely normal. The operating system doesn't like RAM
that is sitting down doing nothing, so it will do its best to make free RAM
nearly zero. Whenever there's much RAM available, it uses more for its caches.

How much memory is your Django app consuming? You can find out by executing
"top" and pressing "M" to sort by memory usage.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-12-06 14:04, Etienne Robillard wrote:

Hi all,

I'm struggling to understand how django/python may allocate and unallocate
memory when used with uWSGI.

I have a Debian system running Python 2.7 and uwsgi with 2GB of RAM and 2 CPUs.

Is that enough RAM memory for a uWSGI/Gevent based WSGI app running Django?

I'm running uWSGI with the --gevent switch in order to allow cooperative
multithreading, but my free RAM memory is always decreasing when nginx is
running.

How can I debug memory allocation in a Django/uWSGI app?

I defined also in my sitecustomize.py "gc.enable()" to allow garbage
collection, but it does not appears to make any differences.

Can you recommend any libraries to debug/profile memory allocation in Python
2.7 ?

Is Django more memory efficient with --pymalloc or by using the default linux
malloc() ?

Thank you in advance,

Etienne



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f12958ba-acaa-6bf3-1792-50f260ad6b63%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


memory leak in django app?

2017-12-06 Thread Etienne Robillard

Hi all,

I'm struggling to understand how django/python may allocate and 
unallocate memory when used with uWSGI.


I have a Debian system running Python 2.7 and uwsgi with 2GB of RAM and 
2 CPUs.


Is that enough RAM memory for a uWSGI/Gevent based WSGI app running Django?

I'm running uWSGI with the --gevent switch in order to allow cooperative 
multithreading, but my free RAM memory is always decreasing when nginx 
is running.


How can I debug memory allocation in a Django/uWSGI app?

I defined also in my sitecustomize.py "gc.enable()" to allow garbage 
collection, but it does not appears to make any differences.


Can you recommend any libraries to debug/profile memory allocation in 
Python 2.7 ?


Is Django more memory efficient with --pymalloc or by using the default 
linux malloc() ?


Thank you in advance,

Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/1e6a9dfa-5b8b-194b-b860-084fc6887890%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to configure NGINX to run Django app in a subpath?

2017-11-29 Thread Etienne Robillard

Whats wrong in using FastCGI for your specific use-case ?

Etienne

Le 2017-11-29 à 15:45, Luca Moiana a écrit :

Following this tutorial

I came up with this NGINX server:

|

upstream app_name {

server unix:/home/geouser/pmapp/pmapp.sock fail_timeout=10;

}


server {


listen 80;

root /home/geouser/pmapp;

server_name 
www.officinecartografiche.it,officinecartografiche.it,207.154.206.172;




location /pmapp/{

proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;

proxy_set_header Host$http_host;

proxy_redirect off;

proxy_pass http://app_name/;


}

}

|

and I can access the "it works" page from: http://my domain/pmapp

But, If I try http://my domain/pmapp/admin

I have error 404

then if I use www.mydomain/pmapp I have "DisallowedHost at /" error 
but I added all possibile spell of my site, including IP, on 
'ALLOWED_HOSTS' in settings.py


Any help?


Il giorno lunedì 27 novembre 2017 21:28:55 UTC+1, Matemática A3K ha 
scritto:


Something like this should work:
https://stackoverflow.com/a/20998131/8930660
<https://stackoverflow.com/a/20998131/8930660>
and change STATIC_URL and MEDIA_URL

Also, the FORCE_SCRIPT_NAME should also work, but if it doesn't,
the first is the most "manual" thing you can do, I think...

Then you have no need to have 2 nginx confs, just put that the
proxy_pass "starts" in your prefix instead of root

On Mon, Nov 27, 2017 at 8:32 AM, Luca Moiana > wrote:

Googling around I found this page
http://albertoconnor.ca/hosting-django-under-different-locations.html
<http://albertoconnor.ca/hosting-django-under-different-locations.html>
but ain't working for me

Il giorno lunedì 27 novembre 2017 11:10:50 UTC+1, Etienne
Robillard ha scritto:

I have not been able to solve this problem with uWSGI.
Apparently, uWSGI is not using the same internal routing
semantics than FastCGI.

See: https://forum.nginx.org/read.php?2,275684,275706
<https://forum.nginx.org/read.php?2,275684,275706>

Etienne

Le 2017-11-26 à 15:41, Matemática A3K a écrit :

I don't know / remember how to do it in Gunicorn, but
here is an example with uWSGI:

https://stackoverflow.com/questions/35792409/nginx-serving-django-in-a-subdirectory-through-uwsgi

<https://stackoverflow.com/questions/35792409/nginx-serving-django-in-a-subdirectory-through-uwsgi>

The main thing is that you will have to deal with
"/pmapp" prefix in your routing / urls. You can deal with
this inside Django or have it stripped before it gets to
Django (by nginx or gunicorn).

HTH :)

On Sun, Nov 26, 2017 at 4:56 PM, Luca Moiana
 wrote:

Hi,

Sorry for the slight OT but after days of search I
have no clue.


Following this DigitalOcean tutorial

<https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04>
 I
was able to setup Django + Postgres + Gunicorn +
NGINX running Django on my root,

Now I'd like to change and have something like this:

mydomain.com <http://mydomain.com> -> static HTML
mydomain.com/pmapp <http://mydomain.com/pmapp> ->
Django app

I created two server blocks in NGINX, one for my
static website:

|

server {


listen 80;


listen [::]:80;




root /var/www/html/officinecartografiche.it;


index index.html index.htm index.nginx-debian.html;




server_name

www.officinecartografiche.it,officinecartografiche.it,207.154.206.172;




location /{


try_files $uri $uri/=404;

}

}

|

 and one for my django app:

|

server {


listen 80;


listen [::]:80;


server_name

www.officinecartografiche.it,officinecartografiche.it,207.154.206.172;


location =/favicon.ico { access_log off;
log_not_found off; }


location /static/{


root /home/geouser/pmapp;


}




location /pmapp {


#includeproxy_params;


proxy_pass http://unix:/home/geouser/pmapp/pmapp.sock;


proxy_redirect
http://www.officinecartografiche.it:8000/pmapp/
<http:

Re: How to configure NGINX to run Django app in a subpath?

2017-11-27 Thread Etienne Robillard
I have not been able to solve this problem with uWSGI. Apparently, uWSGI 
is not using the same internal routing semantics than FastCGI.


See: https://forum.nginx.org/read.php?2,275684,275706

Etienne

Le 2017-11-26 à 15:41, Matemática A3K a écrit :
I don't know / remember how to do it in Gunicorn, but here is an 
example with uWSGI:

https://stackoverflow.com/questions/35792409/nginx-serving-django-in-a-subdirectory-through-uwsgi

The main thing is that you will have to deal with "/pmapp" prefix in 
your routing / urls. You can deal with this inside Django or have it 
stripped before it gets to Django (by nginx or gunicorn).


HTH :)

On Sun, Nov 26, 2017 at 4:56 PM, Luca Moiana <mailto:luca.moi...@gmail.com>> wrote:


Hi,

Sorry for the slight OT but after days of search I have no clue.


Following this DigitalOcean tutorial

<https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04>
 I
was able to setup Django + Postgres + Gunicorn + NGINX running
Django on my root,

Now I'd like to change and have something like this:

mydomain.com <http://mydomain.com> -> static HTML
mydomain.com/pmapp <http://mydomain.com/pmapp> -> Django app

I created two server blocks in NGINX, one for my static website:

|

server {


listen 80;


listen [::]:80;




root /var/www/html/officinecartografiche.it;


index index.html index.htm index.nginx-debian.html;




server_name
www.officinecartografiche.it,officinecartografiche.it,207.154.206.172;




location /{


try_files $uri $uri/=404;

}

}

|

 and one for my django app:

|

server {


listen 80;


listen [::]:80;


server_name
www.officinecartografiche.it,officinecartografiche.it,207.154.206.172;


location =/favicon.ico { access_log off; log_not_found off; }


location /static/{


root /home/geouser/pmapp;


}




location /pmapp {


#includeproxy_params;


proxy_pass http://unix:/home/geouser/pmapp/pmapp.sock;


proxy_redirect http://www.officinecartografiche.it:8000/pmapp/
<http://www.officinecartografiche.it:8000/pmapp/> http://$host/pmapp/;


proxy_set_header SCRIPT_NAME /pmapp;


}


}

|

and added this to settings.py:
|

FORCE_SCRIPT_NAME =*'/pmapp'*

|


WHAT AM I DOING WRONG??

THANKS FOR YOUR HELP!!!

-- 
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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/b1ee39d2-fd04-4727-88e1-e130def5dd37%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/b1ee39d2-fd04-4727-88e1-e130def5dd37%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BFDnhLuJEm4kE1D1FHMApW8nYQv%2BWi1Xt9R7o07bgOwqLGsjw%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CA%2BFDnhLuJEm4kE1D1FHMApW8nYQv%2BWi1Xt9R7o07bgOwqLGsjw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/f183b36b-2126-0ed9-ec86-5f7736856450%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Channels and multi-tenant will this be a world of hurt?

2017-11-25 Thread Etienne Robillard

Hi,

What is a multi-tenant site?

how can i build a multi-tenant django app for django-hotsauce and 
asyncio without django-channels?


Thank you,

Etienne

Le 2017-11-24 à 19:09, Andrew Godwin a écrit :
Your assumptions all seem correct. Also consider that the security 
model of WebSockets is... interesting, so securing a multi-tenant 
setup is going to require a bit more work than you would merely doing 
the same for HTTP requests.


There are other non-Channels options around if you want to look into 
them, but I suspect they'll all have similar architectural challenges.


Andrew

On Fri, Nov 24, 2017 at 3:09 PM, Filbert <mailto:timn...@gmail.com>> wrote:


Running multi-tenant site using a fork of Django tenant schemas
with tens of web servers and thousands of tenants

Piloting a project to implement Channels for real-time
notifications, etc.

I want to confirm these assumptions:

1. Channels really has no support for multi-tenant, I will have to
roll my own.
2. Since uWSGI is serving us well and (at this point) I wouldn't
trust Daphne to serve HTTP, I've got split paths in NGinx for
uWSGI and ASGI.
3. We are running RabbitMQ, so we have to cluster it and implement
channels using asgi_rabbitmq (Redis would just add yet another
moving part)
4. Plan on significant additional resource requirements on the web
server and serious scaling challenges.

Are their any other non-Channels options, or is it the really the
only game in town?

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
<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 https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/aae2725b-d873-40fd-ae09-d1668ab9e727%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/aae2725b-d873-40fd-ae09-d1668ab9e727%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFwN1urh-Mb%3D2ZRtwyvZPh9CQoUDHrqN30yQUxhUd5GbUT8XfA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAFwN1urh-Mb%3D2ZRtwyvZPh9CQoUDHrqN30yQUxhUd5GbUT8XfA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/0e0de25c-c9b3-ffea-8d48-63aba327c35e%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce 0.8.2

2017-11-23 Thread Etienne Robillard

Hi everyone,

I'm very happy to announce the Django-hotsauce 0.8.2 release!

Whats new:

- Implemented the "AsyncIOController" class in the 
notmm.controllers.async module.


- Misc Bugfixes.

Download:

Clone the repo: https://bitbucket.org/tkadm30/django-hotsauce

You may report a bug to django-hotsa...@googlegroups.com

Cheers,

Etienne

--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/9060056b-a5cb-3969-ec87-73a21a45ae8e%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: WSGI Steps and Sequence ... django.setup() reduces latency?

2017-11-10 Thread Etienne Robillard


Hi,


Le 2017-11-10 à 08:50, guettli a écrit :



AFAIK django.setup() gets done implicit for web requests, you only 
need to call it for scripts.


What do you mean with "when django.setup() is disabled"?

But maybe in my code base something works different than in standard 
django. Up to now I thought we don't do special stuff there.


You don't need to call django.setup() unless your app is depending on 
the django models.


This may reduce latency since initializing the whole django 
infrastructure is expensive at runtime.


Etienne

   


--
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/209cef25-c33a-c9ea-1654-caa04c89d2c1%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Extending WSGI with Cython

2017-11-07 Thread Etienne Robillard

Hi all,

I'm the main developer of the django-hotsauce project, a microframework 
derived from Django to build scalable web apps on top of WSGI. I use 
Cython for extending Django with a custom "BaseController" type object, 
to handle low-level HTTP/1.1 request/response semantics:


https://bitbucket.org/tkadm30/django-hotsauce/src/1cee385a8b7ecaf94c0e4c3785174aee43d72de2/lib/notmm/controllers/wsgi.pyx?at=0.8-devel&fileviewer=file-view-default

I would like your input on extending WSGI to support HTTP/2 protocol in 
Cython and Python 3.


Ideally, I would like to use Cython to extend the BaseController 
extension to handle concurrent HTTP/2 requests and use WSGI (PEP-) 
to return a streamable HTTP response object.


My BaseControllerMixin class look currently like this:

cdef class BaseControllerMixIn(object):
   
cdef dict environ

cdef inline application

1. How can i upgrade this minimal extension to support the newer HTTP/2 
features and asynchronous transport in WSGI context ?


2. Is it possible to using the async/wait pragma in Cython source file? 
I would like to upgrade "get_response" to support HTTP/2 requests and 
streamed output buffering:


cdef class BaseControllerMixIn(object):

    cdef async streamed_get_response(self, request, ...):

    response = callback(request, *args, **kwargs)

    return response


What do you think?

Etienne

--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/d64a3fb3-cf93-1e5c-fe4c-62707f0f185c%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: WSGI Steps and Sequence ... django.setup() reduces latency?

2017-11-07 Thread Etienne Robillard

Hi,

I don't initialize django.setup() at runtime but when modules are 
loading. I have not observed any latency issues when django.setup() is 
disabled.



See here for an example: 
https://bitbucket.org/tkadm30/django-hotsauce/src/1cee385a8b7ecaf94c0e4c3785174aee43d72de2/lib/notmm/controllers/wsgi.pyx?at=0.8-devel&fileviewer=file-view-default



Etienne


Le 2017-11-07 à 03:44, guettli a écrit :

I guess wsgi uses these steps:

1. WSGI Process starts (Up to now no single request comes in)
2. HTTP Requests comes in. You can get this timestamp via 
X-Request-Start. See 
https://docs.newrelic.com/docs/apm/applications-menu/features/request-queue-server-configuration-examples

3. Django gets called. You can get this timestamp in a middleware
4. Django has created a response. You can get this timestamp in a 
middleware
5. Webserver starts to send the response to the client. I have no clue 
how to get this timestamp
6. Webserver has finished sending the response to the client. I have 
no clue how to get this timestamp

7. The WSGI Process waits until the next http response comes in.
8. Jump to step2 if request_count < maximum_requests. Else jump to step1

Is this simplified sequence of steps correct?

We monitor the duration between step2 and step3 (queue-time) and log a 
warning if the duration is too long.


We use apache and wsgi.

The configuration maximum-requests=N tells apache to terminate the 
wsgi worker process after N request.


If N gets reached the duration of queue-time (step2 to step3) is much 
longer. We guess that's because django.setup() takes some time


We could increase N (maximum_requests) to make this less likely, but 
is there no way to call django.setup() outside queue-time?


Regards,
  Thomas Güttler


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0c3d11a9-b72a-4322-a97a-da33d60cefdc%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/0c3d11a9-b72a-4322-a97a-da33d60cefdc%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/b20258db-da12-a78d-1cd5-92b84b8ee37c%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to create path for sqlite3 in django? I'm unable to access my database.

2017-10-30 Thread Etienne Robillard

Hi,

you may need to install sqlite3 for windows and set your PATH to the 
directory where sqlite3 executable is found.


Etienne


Le 2017-10-30 à 03:52, bonagiri abhishek a écrit :

C:\Users\admin\cricwebsite>python manage.py dbshell
CommandError: You appear not to have the 'sqlite3' program installed 
or on your path.

Can anyone please explain me the problem?
I'm unable to access the database as it is showing the above CommandError.
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e9a5e8c3-02b7-45f4-9fcd-6e7f5edd8ea5%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/e9a5e8c3-02b7-45f4-9fcd-6e7f5edd8ea5%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/e4e6d0d9-25ea-aeb3-8bf6-25c5efca77c8%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


[ANNOUNCE] Django-livestore 1.0-beta1 is out

2017-10-30 Thread Etienne Robillard

Hi guys,

I'm pleased to announce the first beta release of Django-livestore 1.0!

Django-livestore is a fork of the Satchmo framework to develop ecommerce 
web applications in Django.


This release is for developers only. It is not suitable for production use.

Whats new:

- Python 3.5.3 support and bugfixes.

Download:

- 
http://www.isotopesoftware.ca/pub/livestore/django-livestore-1.0-beta1.tar.xz


- https://bitbucket.org/tkadm30/livestore/

For support, please ask a question to django-hotsa...@googlegroups.com

Best regards,

Etienne

--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/1e31050d-0a6d-d3d7-84f4-46eeb19f0693%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Possible Bug Regarding model choices and form hidden input?

2017-10-28 Thread Etienne Robillard

Which Python and Django versions do you use?

Etienne


Le 2017-10-27 à 23:27, Paul Kenjora a écrit :

Hi,

  When setting HiddenInput on a form widget for an integer model field 
with choices, in tests I get 'X is not a valid choice' errors.  I'm 
guessing it's the hidden input returning a STRING and the model 
expecting an INT.


  I have a model that has

*classBanner(models.Model):
*

*banner_x = models.PositiveIntegerField(blank=False, default=0, 
choices=enumerate(BANNER_XS))*


*
*

And a form that has

*classBannerForm(forms.ModelForm):*

*classMeta:*

*model = Banner*

*fields = ['banner_x']*

*def__init__(self, *args, **kwargs):*

*kwargs['prefix'] = 'banner'*

*super(BannerForm, self).__init__(*args, **kwargs)*

*self.fields['banner_x'].widget = forms.HiddenInput()*


In my unit tests I always get the error:

***resp = self.client.post(**'/banner/, {*

*'banner-banner_x':0,*

**

*}, follow=True)
*

*banner_xSelect a 
valid choice. 0 is not one of the available choices.*


*
*

Anyone else seeing this?  Works fine via browser, just unit tests are 
not coming back right.



--
- Paul Kenjora
- 602-214-7285
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEH8JE3HuYObgFkpmVNnz39Gt7NMjJUX9jXsr9tenGYhwgG_GA%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAEH8JE3HuYObgFkpmVNnz39Gt7NMjJUX9jXsr9tenGYhwgG_GA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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/9ffccbba-aee5-0cbf-2819-823d3bf9efd1%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   >