Re: Arbitrary GROUP BY fields

2019-10-18 Thread thinkwell
Thanks for your reply James. I wasn't able to get it to work. I posted on the new Django forum because it's easier to format code examples over there. Hopefully that clarifies things more... -- You receiv

Re: Problem with loaddata fixtures

2019-10-18 Thread Mike Dewhirst
On 19/10/2019 1:37 am, Seba Rossi wrote: Hello there i was trying to migrate my database from SQLite to PostgreSQL following the docs steps but it seems that i encountered a problem wich i can't resolve. I think dumpdata and loaddata  are for fixtures used in unit tests and not for migrating

Recorrer una tabla sqlite3 en una view Django

2019-10-18 Thread Gabriel Araya Garcia
¿Como puedo recorrer registro a registro una tabla e ir insertando dicha informacion en otra tabla segun criterio de lo que tenga en un campo de la primera tabla? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group a

Re: send_mail error

2019-10-18 Thread Bart Jonkers
You need to set https://www.dev2qa.com/how-do-i-enable-less-secure-apps-on-gmail/ Bart Op vr 18 okt. 2019 om 17:33 schreef James Gutu : > What error are you getting? Look at the traceback, or even copy paste it > here. > Ensure you have set the EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, > EMAIL_HOST_

Re: a variable is not defined

2019-10-18 Thread Joalbert Palacios
Not sure, but I believe that is because scope, given that result variable is defined in the inner method and not defined in search function. On Fri, Oct 18, 2019, 3:49 PM sotiris moustogiannis wrote: > thanks for your help!! > > On Friday, October 18, 2019 at 6:59:05 AM UTC+3, jlgimeno71 wrote:

Re: Channels 2 using asyncio run_in_executor

2019-10-18 Thread BR
>From your experience, can you provide a brief overview of the types of calls that would cause a deadlock? Maybe that's what I was experiencing earlier, but after spending today on a work around, I can't replicate my original problem. Both sync_to_async and run_in_executor work just fine right

Re: a variable is not defined

2019-10-18 Thread sotiris moustogiannis
thanks for your help!! On Friday, October 18, 2019 at 6:59:05 AM UTC+3, jlgimeno71 wrote: > > I saw this that may be relevant: > > > https://stackoverflow.com/questions/7576202/how-can-i-pass-two-models-to-a-class-based-generic-view > > -Jorge > > On Thu, Oct 17, 2019 at 8:14 PM sotiris moustogian

Re: Channels 2 using asyncio run_in_executor

2019-10-18 Thread Andrew Godwin
It should be fine, but you will need to be careful - there's a lot of side-effects with run_in_executor you should be aware of like the way exceptions propagate (Django won't handle them right for you) and the possibility of deadlock. Andrew On Fri, Oct 18, 2019 at 11:27 AM BR wrote: > Should I

Channels 2 using asyncio run_in_executor

2019-10-18 Thread BR
Should I expect any issues using asyncio run_in_executor to run blocking code? I realize there is the sync_to_async function as well, but that wasn't working in my case. I'm using multiprocessing.Queue to share data with a new process, and when I try to use queue.get() with either sync_to_async

Problem with loaddata fixtures

2019-10-18 Thread Seba Rossi
Hello there i was trying to migrate my database from SQLite to PostgreSQL following the docs steps but it seems that i encountered a problem wich i can't resolve. I have a base model called Producto wich has no dependencies. I have another model called Preaprobado that has the following field:

Re: Implementing multiple choice selection

2019-10-18 Thread James Gutu
Check this out here . It shows the solution at the form level. On Fri, Oct 18, 2019 at 3:59 PM briodev wrote: > Halo guys, in the below snapshot, both Campus and Facul

Re: send_mail error

2019-10-18 Thread James Gutu
What error are you getting? Look at the traceback, or even copy paste it here. Ensure you have set the EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, EMAIL_HOST_PORT correctly in the settings.py file. On Thu, Oct 17, 2019 at 3:27 PM challa.Harikrishna chowdary < challahari0...@gmail.com> wrote: > Hi > >

Re: Arbitrary GROUP BY fields

2019-10-18 Thread James Gutu
I am thinking along the lines of this: page_titles = PageTitles.object.select_related('category','rating').values('id', 'category_id', 'rating_id').order_by('date','id').annotate( allow=Sum('allow'), block=Sum('block'), hits=Sum('hits')) To get it right, you may have to share your mod

Re: Creating an app that generates static files

2019-10-18 Thread Jack Sundberg
Thank you both! This helps a ton. On Friday, October 18, 2019 at 5:02:40 AM UTC-4, vineet daniel wrote: > > and use ssd for maximum I/O as youd creating and deleting files a lot, > move session from db to something like redis and python has concurrency > libraries make use of them as well. > >

Re: Django URL not working on my windows 10

2019-10-18 Thread kishor kumar Bharti
use following code in project urls.py from django.contrib import admin from django.conf.urls import url,include from second_app import views urlpatterns = [ url(r'^$',views.index, name='index'), url(r'^second_app/',include('second_app.urls')), url(r'^admin/', admin.site.urls), ] an

Django-jwt use cookie instead of Authorization header

2019-10-18 Thread Suraj Thapa FC
Django-jwt use cookie instead of Authorization header I want to build the SPA application using Django Rest Framework as a back-end. The application will use JsonWebToken authentication. For maximum security, I want to store the authentication token inside of httpOnly cookie, so it will not be acc

Re: Creating an app that generates static files

2019-10-18 Thread vineet daniel
and use ssd for maximum I/O as youd creating and deleting files a lot, move session from db to something like redis and python has concurrency libraries make use of them as well. On Fri, 18 Oct 2019, 14:29 vineet daniel, wrote: > Dont forget inode and files limit if you are creating too many fil

Re: Creating an app that generates static files

2019-10-18 Thread vineet daniel
Dont forget inode and files limit if you are creating too many files real quickly. On Fri, 18 Oct 2019, 13:15 James Gutu, wrote: > Jack, > That sounds about right. > > On Thu, Oct 17, 2019 at 11:22 PM Jack Sundberg > wrote: > >> Thank you, James! This seems like a good fix. From reading through

Django cookie in rest api

2019-10-18 Thread Suraj Thapa FC
After reading the cookies.. How do i set them in headers... -- 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 th

Re: Creating an app that generates static files

2019-10-18 Thread James Gutu
Jack, That sounds about right. On Thu, Oct 17, 2019 at 11:22 PM Jack Sundberg wrote: > Thank you, James! This seems like a good fix. From reading through the > documentation (here > ), this is > how I understand the workflow -- so corr