Re: Best Django Deployment

2020-01-25 Thread Motaz Hejaze
I found this comparison on a blog ..

Apache vs Nginx

https://www.hostingadvice.com/how-to/nginx-vs-apache/

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


Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Chinmay Dali


I am trying to loop over a product list{more so a queryset} in django using for 
loop, by adding the range of products The following code works when printed out 
in cmd prompt

I am doing something like this

'''

for card in allproduct[nextRangePage:limit]:

'''

 in django template using this

'''

{% for card in allproduct[{%'nextRangePage'%}:{%'limit'%}] %}

'''

it gives the following the error:

```

*django.template.exceptions.TemplateSyntaxError: Could not parse the remainder: 
'[{%'nextRangePage'' from 'allproduct[{%'nextRangePage''*

```

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


Re: Best Django Deployment

2020-01-25 Thread Nick Sarbicki
I've used nginx+gunicorn/uwsgi, Apache+modwsgi, Google app engine flex,
Google app engine standard, heroku, kubernetes on various cloud platforms,
elastic beanstalk deployments and various others.

Realistically I don't think there is a "best" way. It all depends on your
environment, what you're working with and what you know.

If you're new to deploying Django I'd just follow the digital ocean guide
with nginx and gunicorn here:
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04

It teaches you the basics of what you want to know.

In the end every style of deployment has its ups and downs so I'd just use
whatever works best for you. If you don't know what that is then try
whatever seems simplest (in my opinion that digital ocean guide) and feel
free to evolve and adapt from there.

One thing I would say though is to avoid app engine flex. It's just a
wrapper around Google compute engine for 6x the price. It promises
scalability but realistically the latency in bringing up new machines voids
that. Luckily the latest standard engine supports python 3 and Django and
is much faster so is ok to use (with a lot of work around connecting to
databases).

On Sat, 25 Jan 2020, 08:06 Motaz Hejaze,  wrote:

> I found this comparison on a blog ..
>
> Apache vs Nginx
>
> https://www.hostingadvice.com/how-to/nginx-vs-apache/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8fdeda69-15ad-4997-9806-31c437ee2416%40googlegroups.com
> .
>

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


Re: Best Django Deployment

2020-01-25 Thread Motaz Hejaze
Guys thank you all for all your answers ..

I think i'll go with Nginx rather than Apache , Apache seems to have more
options , but also seems old , complicated and heavy !

Now i want to consider which layer of integration with web server to use ,
i.e should i user Nginx/Gunicorn or Nginx/uwsgi ?? are there any
performance gain ?

What about running Django in an Asynchronous way , i mean using django with
Asgi rather than Usgi ?? any performance gain too ??

On Sat, Jan 25, 2020 at 1:09 PM Nick Sarbicki 
wrote:

> I've used nginx+gunicorn/uwsgi, Apache+modwsgi, Google app engine flex,
> Google app engine standard, heroku, kubernetes on various cloud platforms,
> elastic beanstalk deployments and various others.
>
> Realistically I don't think there is a "best" way. It all depends on your
> environment, what you're working with and what you know.
>
> If you're new to deploying Django I'd just follow the digital ocean guide
> with nginx and gunicorn here:
> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
>
> It teaches you the basics of what you want to know.
>
> In the end every style of deployment has its ups and downs so I'd just use
> whatever works best for you. If you don't know what that is then try
> whatever seems simplest (in my opinion that digital ocean guide) and feel
> free to evolve and adapt from there.
>
> One thing I would say though is to avoid app engine flex. It's just a
> wrapper around Google compute engine for 6x the price. It promises
> scalability but realistically the latency in bringing up new machines voids
> that. Luckily the latest standard engine supports python 3 and Django and
> is much faster so is ok to use (with a lot of work around connecting to
> databases).
>
> On Sat, 25 Jan 2020, 08:06 Motaz Hejaze,  wrote:
>
>> I found this comparison on a blog ..
>>
>> Apache vs Nginx
>>
>> https://www.hostingadvice.com/how-to/nginx-vs-apache/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/8fdeda69-15ad-4997-9806-31c437ee2416%40googlegroups.com
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGuvt91tse6MUmO3XhPL4iQVCzw44QzMQOA%3D-qAXMLjnmZBPOg%40mail.gmail.com
> 
> .
>

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


I start final year project in django and project for social welfare ''''' please i need help and guideline '''''''

2020-01-25 Thread Jani Eric
if someone is free and ready for help then text me on *what'sapp 
:03331931286*
* Thanks to all django group  members*

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


Re: I start final year project in django and project for social welfare ''''' please i need help and guideline '''''''

2020-01-25 Thread Motaz Hejaze
please contact me on Skype
My Skype account m3tz-hjze

On Sat, Jan 25, 2020 at 2:33 PM Jani Eric  wrote:

> if someone is free and ready for help then text me on *what'sapp
> :03331931286*
> * Thanks to all django group  members*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fa4d75f3-804d-47af-bd04-d3c28323458b%40googlegroups.com
> 
> .
>

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


Re: Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Jason
While you can use Jinja templates in django, that requires additional 
configuration to ensure the proper template renderer is used.  Otherwise, 
by default, django uses its own template renderer.

You don't say whether you've taken the necessary steps to have your django 
project use Jinja, and from the output you posted, it seems unlikely.

So, the documentation on templates 
 is pretty 
thorough in the steps you need to take, or use django template syntax.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/213f585e-4b65-409f-b94f-0bc0fb9547c4%40googlegroups.com.


Re: Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Jani Eric
thanks bro


On Saturday, January 25, 2020 at 3:11:33 PM UTC+5, Chinmay Dali wrote:
>
> I am trying to loop over a product list{more so a queryset} in django using 
> for loop, by adding the range of products The following code works when 
> printed out in cmd prompt
>
> I am doing something like this
>
> '''
>
> for card in allproduct[nextRangePage:limit]:
>
> '''
>
>  in django template using this
>
> '''
>
> {% for card in allproduct[{%'nextRangePage'%}:{%'limit'%}] %}
>
> '''
>
> it gives the following the error:
>
> ```
>
> *django.template.exceptions.TemplateSyntaxError: Could not parse the 
> remainder: '[{%'nextRangePage'' from 'allproduct[{%'nextRangePage''*
>
> ```
>
>

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


Re: I start final year project in django and project for social welfare ''''' please i need help and guideline '''''''

2020-01-25 Thread Jani Eric
Thanks bro

On Saturday, January 25, 2020 at 5:52:48 PM UTC+5, Motaz Hejaze wrote:
>
> please contact me on Skype
> My Skype account m3tz-hjze
>
> On Sat, Jan 25, 2020 at 2:33 PM Jani Eric  > wrote:
>
>> if someone is free and ready for help then text me on *what'sapp 
>> :03331931286*
>> * Thanks to all django group  members*
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/fa4d75f3-804d-47af-bd04-d3c28323458b%40googlegroups.com
>>  
>> 
>> .
>>
>

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


Re: Best Django Deployment

2020-01-25 Thread Nick Sarbicki
As far as I'm aware the performance difference between gunicorn and uwsgi
is minimal. I prefer gunicorn but I have no real rationale for why.

For ASGI Vs WSGI, WSGI is the historical standard most things are built on
so is by far the easiest to start with. ASGI requires a fundamental change
in how you think about your web services and whilst Django does support
ASGI nowadays it is still only experimental support. As a starting point
I'd stick with WSGI, ASGI has some benefits but early on the learning
curves make WSGI the logical choice.


On Sat, 25 Jan 2020, 11:41 Motaz Hejaze,  wrote:

> Guys thank you all for all your answers ..
>
> I think i'll go with Nginx rather than Apache , Apache seems to have more
> options , but also seems old , complicated and heavy !
>
> Now i want to consider which layer of integration with web server to use ,
> i.e should i user Nginx/Gunicorn or Nginx/uwsgi ?? are there any
> performance gain ?
>
> What about running Django in an Asynchronous way , i mean using django
> with Asgi rather than Usgi ?? any performance gain too ??
>
> On Sat, Jan 25, 2020 at 1:09 PM Nick Sarbicki 
> wrote:
>
>> I've used nginx+gunicorn/uwsgi, Apache+modwsgi, Google app engine flex,
>> Google app engine standard, heroku, kubernetes on various cloud platforms,
>> elastic beanstalk deployments and various others.
>>
>> Realistically I don't think there is a "best" way. It all depends on your
>> environment, what you're working with and what you know.
>>
>> If you're new to deploying Django I'd just follow the digital ocean guide
>> with nginx and gunicorn here:
>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
>>
>> It teaches you the basics of what you want to know.
>>
>> In the end every style of deployment has its ups and downs so I'd just
>> use whatever works best for you. If you don't know what that is then try
>> whatever seems simplest (in my opinion that digital ocean guide) and feel
>> free to evolve and adapt from there.
>>
>> One thing I would say though is to avoid app engine flex. It's just a
>> wrapper around Google compute engine for 6x the price. It promises
>> scalability but realistically the latency in bringing up new machines voids
>> that. Luckily the latest standard engine supports python 3 and Django and
>> is much faster so is ok to use (with a lot of work around connecting to
>> databases).
>>
>> On Sat, 25 Jan 2020, 08:06 Motaz Hejaze,  wrote:
>>
>>> I found this comparison on a blog ..
>>>
>>> Apache vs Nginx
>>>
>>> https://www.hostingadvice.com/how-to/nginx-vs-apache/
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/8fdeda69-15ad-4997-9806-31c437ee2416%40googlegroups.com
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAGuvt91tse6MUmO3XhPL4iQVCzw44QzMQOA%3D-qAXMLjnmZBPOg%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-ec7ODpS-MTE1dxyNoVSTY2ROamqCDeDHddLR4Xk1NT2g%40mail.gmail.com
> 
> .
>

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


Re: Best Django Deployment

2020-01-25 Thread Motaz Hejaze
They talking about making django asynchronous nature by the version 3.3 ..
i can see that asynchronous model is high speed and performance like in
node.js
i don't know if that will be applicable to django


On Sat, Jan 25, 2020 at 4:08 PM Nick Sarbicki 
wrote:

> As far as I'm aware the performance difference between gunicorn and uwsgi
> is minimal. I prefer gunicorn but I have no real rationale for why.
>
> For ASGI Vs WSGI, WSGI is the historical standard most things are built on
> so is by far the easiest to start with. ASGI requires a fundamental change
> in how you think about your web services and whilst Django does support
> ASGI nowadays it is still only experimental support. As a starting point
> I'd stick with WSGI, ASGI has some benefits but early on the learning
> curves make WSGI the logical choice.
>
>
> On Sat, 25 Jan 2020, 11:41 Motaz Hejaze,  wrote:
>
>> Guys thank you all for all your answers ..
>>
>> I think i'll go with Nginx rather than Apache , Apache seems to have more
>> options , but also seems old , complicated and heavy !
>>
>> Now i want to consider which layer of integration with web server to use
>> , i.e should i user Nginx/Gunicorn or Nginx/uwsgi ?? are there any
>> performance gain ?
>>
>> What about running Django in an Asynchronous way , i mean using django
>> with Asgi rather than Usgi ?? any performance gain too ??
>>
>> On Sat, Jan 25, 2020 at 1:09 PM Nick Sarbicki 
>> wrote:
>>
>>> I've used nginx+gunicorn/uwsgi, Apache+modwsgi, Google app engine flex,
>>> Google app engine standard, heroku, kubernetes on various cloud platforms,
>>> elastic beanstalk deployments and various others.
>>>
>>> Realistically I don't think there is a "best" way. It all depends on
>>> your environment, what you're working with and what you know.
>>>
>>> If you're new to deploying Django I'd just follow the digital ocean
>>> guide with nginx and gunicorn here:
>>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
>>>
>>> It teaches you the basics of what you want to know.
>>>
>>> In the end every style of deployment has its ups and downs so I'd just
>>> use whatever works best for you. If you don't know what that is then try
>>> whatever seems simplest (in my opinion that digital ocean guide) and feel
>>> free to evolve and adapt from there.
>>>
>>> One thing I would say though is to avoid app engine flex. It's just a
>>> wrapper around Google compute engine for 6x the price. It promises
>>> scalability but realistically the latency in bringing up new machines voids
>>> that. Luckily the latest standard engine supports python 3 and Django and
>>> is much faster so is ok to use (with a lot of work around connecting to
>>> databases).
>>>
>>> On Sat, 25 Jan 2020, 08:06 Motaz Hejaze,  wrote:
>>>
 I found this comparison on a blog ..

 Apache vs Nginx

 https://www.hostingadvice.com/how-to/nginx-vs-apache/

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

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAGuvt91tse6MUmO3XhPL4iQVCzw44QzMQOA%3D-qAXMLjnmZBPOg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHV4E-ec7ODpS-MTE1dxyNoVSTY2ROamqCDeDHddLR4Xk1NT2g%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGuvt90%3DtN4b8P%2B595X0FeXpp78bqg--aagqQ4ivo2wDJFkX0A%40mail.gmail.com
> 

Re: Changing Queryset into String

2020-01-25 Thread mohamed Alisaleh
بتاريخ الجمعة، 24 يناير، 2020 7:22:23 م UTC+3، كتب Lim Kai Wey:
> Greetings everyone,
> 
> 
> I would like to ask if anyone knows how to convert my  queryset into string 
> or if there is a better approach to what I am trying to accomplish. In 
> theory, I am trying to assign all the text into a variable and tokenize the 
> whole string so that I can find the top 10 most common word.
> 
> 
> Following is the snippet of my code:
> 
> Models.py
> 
> 
> class Tweet(models.Model):
> tweet_id = models.BigIntegerField()
> text = models.TextField()
> polarity = models.DecimalField(decimal_places=5,max_digits=6,null=True)
> keyword = models.ForeignKey(Keyword, on_delete=models.CASCADE)
> country = models.CharField(max_length=255,null=True)
> stored_at = models.DateTimeField(editable= False)
> 
> def __str__(self):
> return self.text
> 
> 
> 
> Views.py
> 
> 
> def tweet_visualizer(request, word = None):
> if(word == None):
> num_comments = Tweet.objects.all().count()
> latest_comments = Tweet.objects.all().order_by('-stored_at')[:6]
> all_tweets = Tweet.objects.all()
> 
> all_comments = all_tweets.__str__()
> tokenized_text = word_tokenize(all_comments)
> fdist = FreqDist(tokenized_text)
> top_10_common = fdist.most_common(10)
> else:
> num_comments = Tweet.objects.filter(keyword__keyword=word).count()
> latest_comments = 
> Tweet.objects.filter(keyword__keyword=word).order_by('-stored_at')[:6]
> all_tweets = Tweet.objects.filter(keyword__keyword=word)
> 
> all_comments= all_tweets.__str__()
> tokenized_text = word_tokenize(all_comments)
> fdist = FreqDist(tokenized_text)
> top_10_common = fdist.most_common(10)
> 
> 
> 
> My Current Output:
> ,  option majority with green conference.>,  either.>, ,  sport without.>, ,  sense each might loss.>, ,  two go.>, ,  development house.>, ,  Natural development story music and eye water.>,  school since what benefit force or.>, ,  Scientist here very at risk computer.>,  policy.>, 
> 
> 
> My Desired Output:
> Just each machine team recognize Card shoulder option majority with green 
> conference Sometimes feel news chance either ... etc
> 
> 
> Thank you in advance for anyone who can help me. I really do appreciate it! 
> 
> 
> Sincerely,
> Kai Wey

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


Changing Queryset into String

2020-01-25 Thread mohamed Alisaleh
Github.com

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


Re: Changing Queryset into String

2020-01-25 Thread mohamed Alisaleh
aborabieamohame

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


Re: Best Django Deployment

2020-01-25 Thread Motaz Hejaze
https://github.com/andrewgodwin/deps/blob/async/draft/0009-async.rst#the-orm

On Sat, Jan 25, 2020 at 4:50 PM Motaz Hejaze  wrote:

> They talking about making django asynchronous nature by the version 3.3 ..
> i can see that asynchronous model is high speed and performance like in
> node.js
> i don't know if that will be applicable to django
>
>
> On Sat, Jan 25, 2020 at 4:08 PM Nick Sarbicki 
> wrote:
>
>> As far as I'm aware the performance difference between gunicorn and uwsgi
>> is minimal. I prefer gunicorn but I have no real rationale for why.
>>
>> For ASGI Vs WSGI, WSGI is the historical standard most things are built
>> on so is by far the easiest to start with. ASGI requires a fundamental
>> change in how you think about your web services and whilst Django does
>> support ASGI nowadays it is still only experimental support. As a starting
>> point I'd stick with WSGI, ASGI has some benefits but early on the learning
>> curves make WSGI the logical choice.
>>
>>
>> On Sat, 25 Jan 2020, 11:41 Motaz Hejaze,  wrote:
>>
>>> Guys thank you all for all your answers ..
>>>
>>> I think i'll go with Nginx rather than Apache , Apache seems to have
>>> more options , but also seems old , complicated and heavy !
>>>
>>> Now i want to consider which layer of integration with web server to use
>>> , i.e should i user Nginx/Gunicorn or Nginx/uwsgi ?? are there any
>>> performance gain ?
>>>
>>> What about running Django in an Asynchronous way , i mean using django
>>> with Asgi rather than Usgi ?? any performance gain too ??
>>>
>>> On Sat, Jan 25, 2020 at 1:09 PM Nick Sarbicki 
>>> wrote:
>>>
 I've used nginx+gunicorn/uwsgi, Apache+modwsgi, Google app engine flex,
 Google app engine standard, heroku, kubernetes on various cloud platforms,
 elastic beanstalk deployments and various others.

 Realistically I don't think there is a "best" way. It all depends on
 your environment, what you're working with and what you know.

 If you're new to deploying Django I'd just follow the digital ocean
 guide with nginx and gunicorn here:
 https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04

 It teaches you the basics of what you want to know.

 In the end every style of deployment has its ups and downs so I'd just
 use whatever works best for you. If you don't know what that is then try
 whatever seems simplest (in my opinion that digital ocean guide) and feel
 free to evolve and adapt from there.

 One thing I would say though is to avoid app engine flex. It's just a
 wrapper around Google compute engine for 6x the price. It promises
 scalability but realistically the latency in bringing up new machines voids
 that. Luckily the latest standard engine supports python 3 and Django and
 is much faster so is ok to use (with a lot of work around connecting to
 databases).

 On Sat, 25 Jan 2020, 08:06 Motaz Hejaze,  wrote:

> I found this comparison on a blog ..
>
> Apache vs Nginx
>
> https://www.hostingadvice.com/how-to/nginx-vs-apache/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8fdeda69-15ad-4997-9806-31c437ee2416%40googlegroups.com
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAGuvt91tse6MUmO3XhPL4iQVCzw44QzMQOA%3D-qAXMLjnmZBPOg%40mail.gmail.com
 
 .

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

Re: Best Django Deployment

2020-01-25 Thread aakansha jain
Can anyone tell me how to run the django development environment so that I
can contribute to Django.

On Wed, Jan 22, 2020 at 10:09 PM Motaz Hejaze  wrote:

> Hey Friends!
>
> I want to ask what is the best Django deployment stack to increase the
> request/per/second rate ??
>
> does Nginx have better performance than apache ?
>
> What about Gunicorn and other alternatives ?
>
> thank you very much
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ebdcce7b-ce78-479b-a89c-ad2cdc313a62%40googlegroups.com
> 
> .
>

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


Hosting a django website

2020-01-25 Thread Perceval Maturure
dear all
1.what is the best way to host a django website on a shared host that you
are not sudo?
2.is this possible?
3. any ideas?

-- 
*Perceval Maturure*

*083 303 9423*

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


Re: Best Django Deployment

2020-01-25 Thread aakansha jain
Can anyone tell me how to run the django development environment so that I 
can contribute to Django.

On Wednesday, January 22, 2020 at 10:08:53 PM UTC+5:30, Motaz Hejaze wrote:
>
> Hey Friends!
>
> I want to ask what is the best Django deployment stack to increase the 
> request/per/second rate ??
>
> does Nginx have better performance than apache ?
>
> What about Gunicorn and other alternatives ?
>
> thank you very much 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f4a7966-8b78-4bdc-b244-9e596c74e552%40googlegroups.com.


Re: Error with running test suite while contributing to django

2020-01-25 Thread aakansha jain
I am also getting the same issue.
I am to getting how to run the django development environment so that I can 
contribute to Django.

On Friday, January 24, 2020 at 6:10:40 PM UTC+5:30, Muhammed abdul Quadir 
owais wrote:
>
> Hi , 
>
> I want help over here ,..
> I'm a newbie for django contributions so I got stuck over here...
> After cloning the django from git hub ( obviously after the action of 
> fork) and running commands (like $ python -m pip install -e 
> /path/to/your/local/clone/django/
> and $ python -m pip install -r requirements/py3.txt (no errors here) then 
> ,.. 
> then after cd to tests then running this command ./runtests.py
> )
> the test here is giving as response..
>
> ss...sss..s..ss..sss..s.s..s...s.s...s.s..s..ss..s...sss...s.ssss.s..s.s.s.sss..s..s..s.s......s..s...ss...x...s.x.sss.s...s...s.s...s..ss..

Re: Django blog post not linking to detail.html page

2020-01-25 Thread aakansha jain
Can anyone tell me how to run the django development environment so that I 
can contribute to Django

On Sunday, January 19, 2020 at 9:56:31 PM UTC+5:30, amanda wrote:
>
> Hello,
> I am new to Django, i follow a book : Django by Example 2. i install a 
> blog, it show blog post list, but when i click post title, it does not go 
> to post detail.html page.
> anyone can tell me where i can wrong?
> Thank you very much!
>
>
>
>

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


How to run the django development environment?

2020-01-25 Thread aakansha jain
I am new to open source. I have forked the project on my system.
But now I am not getting how to run the django development environment so 
that I can contribute to Django..

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


Re: How to run the django development environment?

2020-01-25 Thread Kasper Laudrup

Hi Aakansha

On 25/01/2020 19.49, aakansha jain wrote:

I am new to open source.


A good start to getting any help is not spamming unrelated threads with 
the same question over and over again.


That will not make you feel very welcome in whatever open source 
community you're trying to work with/contribute to.


Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b353bba2-0f6d-8ac9-7c69-b156a808a3e9%40stacktrace.dk.


Re: Best Django Deployment

2020-01-25 Thread Motaz Hejaze
make another thread for your question man , this is out of the topic of
this thread

On Sat, Jan 25, 2020 at 8:40 PM aakansha jain 
wrote:

> Can anyone tell me how to run the django development environment so that I
> can contribute to Django.
>
> On Wednesday, January 22, 2020 at 10:08:53 PM UTC+5:30, Motaz Hejaze wrote:
>>
>> Hey Friends!
>>
>> I want to ask what is the best Django deployment stack to increase the
>> request/per/second rate ??
>>
>> does Nginx have better performance than apache ?
>>
>> What about Gunicorn and other alternatives ?
>>
>> thank you very much
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5f4a7966-8b78-4bdc-b244-9e596c74e552%40googlegroups.com
> 
> .
>

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


Re: Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Aditya Khatwa
Use custom templates tag instead doing it directly... make a function
stating your {% query_set %} and then use it inside the template.


On Sat, 25 Jan 2020, 18:29 Jani Eric,  wrote:

> thanks bro
>
>
> On Saturday, January 25, 2020 at 3:11:33 PM UTC+5, Chinmay Dali wrote:
>>
>> I am trying to loop over a product list{more so a queryset} in django using 
>> for loop, by adding the range of products The following code works when 
>> printed out in cmd prompt
>>
>> I am doing something like this
>>
>> '''
>>
>> for card in allproduct[nextRangePage:limit]:
>>
>> '''
>>
>>  in django template using this
>>
>> '''
>>
>> {% for card in allproduct[{%'nextRangePage'%}:{%'limit'%}] %}
>>
>> '''
>>
>> it gives the following the error:
>>
>> ```
>>
>> *django.template.exceptions.TemplateSyntaxError: Could not parse the 
>> remainder: '[{%'nextRangePage'' from 'allproduct[{%'nextRangePage''*
>>
>> ```
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a9b2cafa-d9eb-4ec7-a3f7-24edd1f42ee7%40googlegroups.com
> 
> .
>

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


Re: Django blog post not linking to detail.html page

2020-01-25 Thread Aditya Khatwa
Django 2 by example is pretty good book when it comes to understand
django
If you are having some problems then I suggest you go through the same
project in your case blog post again and try to match it with your code
syntax most likely you are going to find the problem you are facing.

On Sun, 26 Jan 2020, 00:18 aakansha jain,  wrote:

> Can anyone tell me how to run the django development environment so that I
> can contribute to Django
>
> On Sunday, January 19, 2020 at 9:56:31 PM UTC+5:30, amanda wrote:
>>
>> Hello,
>> I am new to Django, i follow a book : Django by Example 2. i install a
>> blog, it show blog post list, but when i click post title, it does not go
>> to post detail.html page.
>> anyone can tell me where i can wrong?
>> Thank you very much!
>>
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/67f861ef-ad1c-4632-b65f-9722835c3150%40googlegroups.com
> 
> .
>

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


Re: Error with running test suite while contributing to django

2020-01-25 Thread Muhammed abdul Quadir owais
Oh!
Reply me … if you find the solution of it …

thanks

> On 26-Jan-2020, at 12:13 AM, aakansha jain  wrote:
> 
> I am also getting the same issue.
> I am to getting how to run the django development environment so that I can 
> contribute to Django.
> 
> On Friday, January 24, 2020 at 6:10:40 PM UTC+5:30, Muhammed abdul Quadir 
> owais wrote:
> Hi , 
> 
> I want help over here ,..
> I'm a newbie for django contributions so I got stuck over here...
> After cloning the django from git hub ( obviously after the action of fork) 
> and running commands (like $ python -m pip install -e 
> /path/to/your/local/clone/django/
> and $ python -m pip install -r requirements/py3.txt (no errors here) then ,.. 
> then after cd to tests then running this command 
> ./runtests.py
> )
> the test here is giving as response..
> 
> ss...sss..s..ss..sss..s.s..s...s.s...s.s..s..ss..s...sss...s.ssss.s..s.s.s.sss..s..s..s.s......s..s...ss...x...s.x.sss.s...s...s.s.