Re: Script for running Daphne and runworker in the background . runworker ends after session expires.

2019-03-23 Thread Aldian Fazrihady
On Sun, Mar 24, 2019 at 11:41 AM Adam Zedan wrote: > Thanks Aldian , what about runworker ? > I don't use Daphne worker. However, I am using celery -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Script for running Daphne and runworker in the background . runworker ends after session expires.

2019-03-23 Thread Adam Zedan
Thanks Aldian , what about runworker ? On Sat, Mar 23, 2019 at 8:36 PM Aldian Fazrihady wrote: > Hi, > Mine is like this. It is still running after exiting ssh: > > nohup daphne -v 2 -b $AFCOM_DAPHNE_HOST -p $AFCOM_DAPHNE_PORT > afcom.asgi:application > $AFCOM_PROJECT_PATH/daphne/afcom.log

Spanning multi-valued relationships with 'filter' and 'values'

2019-03-23 Thread Christhian Jesus
When i try to follow the relationship with 'filter', the lookup is ignored: Evaluacion.objects.values('id', 'periodo__indicador').filter( periodo__indicador=1) My Django version is 2.1.7 and Python 3.7.2 My model is: Class Periodo(models.Model): pass Class Indicador(models.Model):

Re: Script for running Daphne and runworker in the background . runworker ends after session expires.

2019-03-23 Thread Aldian Fazrihady
Hi, Mine is like this. It is still running after exiting ssh: nohup daphne -v 2 -b $AFCOM_DAPHNE_HOST -p $AFCOM_DAPHNE_PORT afcom.asgi:application > $AFCOM_PROJECT_PATH/daphne/afcom.log 2>&1 & On Sun, Mar 24, 2019 at 10:52 AM Adam Zedan wrote: > I am trying to create a bash script that would

Re: Script for running Daphne and runworker in the background . runworker ends after session expires.

2019-03-23 Thread Adam Zedan
Seems like Daphne and runworker both terminate after session expires On Saturday, March 23, 2019 at 7:51:26 PM UTC-7, Adam Zedan wrote: > > I am trying to create a bash script that would run Daphne and runworker in > the background. > This is what I came up with so far > > > echo "Killing

Script for running Daphne and runworker in the background . runworker ends after session expires.

2019-03-23 Thread Adam Zedan
I am trying to create a bash script that would run Daphne and runworker in the background. This is what I came up with so far echo "Killing Redis." killall redis-server #echo "Starting redis Server." redis-server --daemonize yes echo "Stopping NGINX.." sudo /etc/init.d/nginx

How to filter 'Invalid HTTP_HOST header ...' errors

2019-03-23 Thread Mike Dewhirst
I'm getting hundreds of Invalid HTTP_HOST header errors and need to avoid having them emailed to ADMINS. My ISP has a limit on the number of messages which can be sent per hour and occasionally that gets exceeded and he complains the site is jamming his queues. While that is a more or less

Re: Having problem with first page of first tutorial

2019-03-23 Thread Thomas POKAM
You should make sure you import the module polls in the site01/urls.py file by adding this line: from polls import views Le 23/03/2019 à 19:47, Ben Edwards a écrit : Ive not done https://docs.djangoproject.com/en/2.1/intro/tutorial01/ 3 times and cant get past the first page.  Its kind of

Performing SQL queries on SQLite database

2019-03-23 Thread carl collins
Hello guys, I'm Carl Collins from Cameroon. I'm working on this Django Project and I got stuck . Need help.The first thing I would love to ask is about performing SQL queries in Django use Django ORM. Presume I have something like this: connection = sqlite.connect('data.db') cursor =

Re: Having problem with first page of first tutorial

2019-03-23 Thread Dylan Young
There is no polls/urls.py file in your repository. Best, Casey On Sat, 23 Mar 2019 at 16:23, Ben Edwards wrote: > Ive not done https://docs.djangoproject.com/en/2.1/intro/tutorial01/ 3 > times and cant get past the first page. Its kind of dryving me nuts. > > Where I am at is in github

Having problem with first page of first tutorial

2019-03-23 Thread Ben Edwards
Ive not done https://docs.djangoproject.com/en/2.1/intro/tutorial01/ 3 times and cant get past the first page. Its kind of dryving me nuts. Where I am at is in github https://github.com/ben-tvpp/site01 Ive added the view https://github.com/ben-tvpp/site01/blob/master/polls/views.py # Create

Re: Doubt in the creation of fields in the FrontEnd

2019-03-23 Thread Barkalez XX
Then it occurs to me to create a table called List Ingredients and relate it to the recipe. El sábado, 23 de marzo de 2019, 19:16:47 (UTC+1), Aldian Fazrihady escribió: > > > Hi, > > Generating fields is possible, > > but for your recipe app, that's absolutely not a good thing to do. > >

Re: Doubt in the creation of fields in the FrontEnd

2019-03-23 Thread Aldian Fazrihady
Hi, Generating fields is possible, but for your recipe app, that's absolutely not a good thing to do. Regards, Aldian Fazrihady On Sun, Mar 24, 2019 at 1:54 AM Barkalez XX wrote: > Thank for you answer. > > > I did not know that fields could be generated in the database from > FrontEnd. > >

Re: Doubt in the creation of fields in the FrontEnd

2019-03-23 Thread Barkalez XX
Thank for you answer. I did not know that fields could be generated in the database from FrontEnd. It occurs to me to put a "Add ingredient" button and produce a new field in the recipe table, but I do not know how to do that. El sábado, 23 de marzo de 2019, 17:54:24 (UTC+1), Aldian

social share

2019-03-23 Thread omar ahmed
hello ... how can i add social share in django like FB ,twitter and G+ ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Doubt in the creation of fields in the FrontEnd

2019-03-23 Thread Aldian Fazrihady
Hi, I don't think that's a good idea to frequently add new field to a database table. A field in form doesn't mean that it will also be a field of a table database. You can make a new ingredient field in a form to become a new row of a database table. You just need to properly design your

Doubt in the creation of fields in the FrontEnd

2019-03-23 Thread Barkalez XX
I would like to know if it is possible to create a new field in a table from the FrontEnd. For example, in a form to create recipes, not all recipes contain the same number of ingredients. At first I thought about putting a high number of ingredients to enter in the form to create a recipe,

Re: Error in Django url mapping

2019-03-23 Thread egbosi Kelechi
Great. You are on the right track, only that the Url path you typed in the address bar triggered the error. You should use /first_app/index/ Reason:the index url path is located in the first_app. Urls file. On Sat, Mar 23, 2019, 5:07 PM The Aryas Hey Guys, I am facing problem on django url

Error in Django url mapping

2019-03-23 Thread The Aryas
Hey Guys, I am facing problem on django url mapping, I did exactly what my couse said and copied the code text exactly,but it throws the error:- Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/index Using the URLconf defined in protwo.urls, Django tried these URL

Re: Dispatching requests from one uwsgi to another uwsgi instance running Django Channels

2019-03-23 Thread Ahmed Ishtiaque
Awesome! Sorry I couldn't reply earlier. To explain myself a little better, I use gunicorn to handle all HTTP requests to my server and daphne to handle all WebSocket requests. This isn't necessary since daphne can do both by itself, but the Deploying

Django channels raises TypeError on close: An asyncio.Future, a coroutine or an awaitable is required

2019-03-23 Thread Rodrigo Bistolfi
Hi there, I am using Channels 2.1.7 with Python 3.7.2. My consumer does this on connect: async def connect(self): """Accept connect if user has been provided by middleware""" self.user = self.scope.get('user') if self.user: await self.accept() else: await

Configuration Management

2019-03-23 Thread anand . desai
Hi All, Can anyone point to a preferred configuration management tool that can be used for Django on EC2? Thanks, Anand -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: problem in running server

2019-03-23 Thread Maior Marso
do a " pip list " and a python -V to see if Django and python are there. On Fri, Mar 22, 2019 at 10:20 AM fazal rehman wrote: > Thanks it works  > > On Fri, Mar 22, 2019, 8:43 PM Scheck David >> activate your virtual env or pip install Django >> >> Le ven. 22 mars 2019 à 16:04, fazal rehman

how to deploy django on cpanel or server

2019-03-23 Thread surojitsahu07
how to deploy django on cpanel or server -- You received this message because you are subscribed to the Google 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

Re: Dispatching requests from one uwsgi to another uwsgi instance running Django Channels

2019-03-23 Thread Adam Zedan
YES it worked. I used Daphne with nginx and it worked. Thank you. On Friday, March 22, 2019 at 5:58:20 PM UTC-7, Adam Zedan wrote: > > I am currently using Django channels for websocket communication. I read > this >

Re: Dispatching requests from one uwsgi to another uwsgi instance running Django Channels

2019-03-23 Thread Adam Zedan
Hi Ahmed I am a little confused here. I was using NGINX and uwsgi. Now based on your response i decided to use Daphne.. So Now I have NGINX with Daphne. I am not sure where gunicorn fits in here . I am following this tutorial.

sending notification to one user using Channels 2

2019-03-23 Thread Mukul Mantosh
I want to send notification to specific authenticated user using Channels 2. Stackoverflow: https://stackoverflow.com/questions/55310717/sending-notification-to-one-user-using-channels-2 -- You received this message because you are subscribed to the Google Groups "Django users" group. To