Re: best practices for location of start up code

2017-09-23 Thread Antonis Christofides
Hello Larry, The Django development server runs in more than one thread, which is probably why your initialization code run twice. OTOH, it run only once on production probably because you have configured uwsgi to run only one process (it's possible that this is the default on single-core

Re: capturing url pattern from html forms

2017-09-23 Thread James Schneider
On Sep 23, 2017 1:27 PM, "Mel DeJesus" wrote: Unfortunately, I didn't show my entire URLpatterns list, and the ^item/$ seems to interfere with the ^$ of the previous: Any suggestions for a work around? thanks again. from django.conf.urls import include, url from

Re: capturing url pattern from html forms

2017-09-23 Thread Mel DeJesus
Unfortunately, I didn't show my entire URLpatterns list, and the ^item/$ seems to interfere with the ^$ of the previous: Any suggestions for a work around? thanks again. from django.conf.urls import include, url from django.contrib import admin from rest_framework.urlpatterns import

Re: capturing url pattern from html forms

2017-09-23 Thread Mel DeJesus
Awesome, thanks! Following your suggestion, I went to views and I assigned the request.GET['id'] to a variable and was able to use it! On Saturday, September 23, 2017 at 3:41:16 PM UTC-4, Daniel Roseman wrote: > > > > On Saturday, 23 September 2017 19:48:37 UTC+1, Mel DeJesus wrote: >> >> >>

Re: First steps in Django 1.11.5 and I have my first error

2017-09-23 Thread Gerardo Palazuelos Guerrero
Hi, Another beginner here . I'm not sure what you did exactly so it caused your error. But I'm following the django girls tutorial; I cannot completely express how good it was for me, it was my first tutorial. I want to recommend you to check it out, it will guide you on how to run the app

Making chatbot

2017-09-23 Thread rakibul
Hi everyone I want to build a chatbot app using Django Rest Framework. -- You received this message because you 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: capturing url pattern from html forms

2017-09-23 Thread Daniel Roseman
On Saturday, 23 September 2017 19:48:37 UTC+1, Mel DeJesus wrote: > > > Hi - > > If the number '1' is submitted with the form below, the following url is > created: http://localhost:8000/item/?id=1 > > But I continually get a page not found. How can I style the regex in the > urlpatterns so

Re: best practices for location of start up code

2017-09-23 Thread Larry Martell
On Sat, Sep 23, 2017 at 2:39 PM, Larry Martell wrote: > On Sat, Sep 23, 2017 at 1:34 PM, James Schneider > wrote: >> >> >> On Sep 22, 2017 2:58 PM, "Larry Martell" wrote: >> >> We have some code we want to run 1 time

capturing url pattern from html forms

2017-09-23 Thread Mel DeJesus
Hi - If the number '1' is submitted with the form below, the following url is created: http://localhost:8000/item/?id=1 But I continually get a page not found. How can I style the regex in the urlpatterns so that this url registers? Thanks. Item Name: I'm attempting to capture

Re: best practices for location of start up code

2017-09-23 Thread Larry Martell
On Sat, Sep 23, 2017 at 1:34 PM, James Schneider wrote: > > > On Sep 22, 2017 2:58 PM, "Larry Martell" wrote: > > We have some code we want to run 1 time when our django app is > started. What is the best place for this? I tried putting it in my

Re: best practices for location of start up code

2017-09-23 Thread James Schneider
On Sep 22, 2017 2:58 PM, "Larry Martell" wrote: We have some code we want to run 1 time when our django app is started. What is the best place for this? I tried putting it in my app's config function, but from there I get: *** AppRegistryNotReady: Apps aren't loaded

Re: ASGI alongside mod_wsgi behind an Nginx proxy

2017-09-23 Thread Andrew Godwin
Hi there, This is a current bug with the root path setting - see https://github.com/django/daphne/issues/125. Until it's fixed, I'd recommend just coding all URLs as absolute and making nginx pass them through as such. Andrew On Fri, Sep 22, 2017 at 2:13 PM, Sean F wrote:

First steps in Django 1.11.5 and I have my first error

2017-09-23 Thread Diego Muiño Orallo
Hello, this is my first app in Django and I have the next error: When I launch python manage.py runserver --settings=eventus.settings.local apear this error: Unhandled exception in thread started by .wrapper at 0x110c72158> Traceback (most recent call last): File

Re: best practices for location of start up code

2017-09-23 Thread Antonis Christofides
Hi, I believe that the standard place for this is AppConfig.ready() . Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-09-23 00:57, Larry Martell wrote: > We have some code we want