Re: Best Django Deployment

2020-01-23 Thread Mike Dewhirst
On 24/01/2020 3:14 pm, onlinejudge95 wrote: +1 on the question. Mainly whether the Apache + modWSGI or Nginx is the better way to go. I use Apache + modWSGI because I'm familiar with it. I also run a Mezzanine site which uses Gunicorn + nginx and the setup wasn't difficult. I don't think

Re: Case-insensitve unique = True

2020-01-23 Thread Mike Dewhirst
On 24/01/2020 3:20 pm, Simon Charette wrote: If you are using PostgreSQL I'd suggest using a CIText field[0] with a unique constraint[1]. Surely everyone uses PostgreSQL, no? That [0] is identical in Django 2.2 and it looks like I should migrate my models.CharField to

Re: Case-insensitve unique = True

2020-01-23 Thread maninder singh Kumar
I wonder at that. When I develop a model does the CharField have to be specified case insensitive at that level. For instance : A search can be case insensitive and iexact is the best way. [image: --] Maninder Kumar [image: http://]about.me/maninder.s.kumar

Re: Case-insensitve unique = True

2020-01-23 Thread Simon Charette
If you are using PostgreSQL I'd suggest using a CIText field[0] with a unique constraint[1]. If you are *not* using PostgreSQL your best choice is likely to emulate the upcoming expression[3] support for UniqueConstraint(Lower('field')) by using a RunSQL operation that performs the appropriate

Re: Best Django Deployment

2020-01-23 Thread onlinejudge95
+1 on the question. Mainly whether the Apache + modWSGI or Nginx is the better way to go. On Fri, Jan 24, 2020, 7:41 AM Aldian Fazrihady wrote: > Google AppEngine fFex will handle everything for you, but for my > requirement, the price is too expensive, so I don't use it and I also don't > use

Case-insensitve unique = True

2020-01-23 Thread Mike Dewhirst
What is the best way to ensure a charfield is case-insensitively unique? Currently I'm using a query with __iexact=True but I wonder whether there is a better way. Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Best Django Deployment

2020-01-23 Thread Aldian Fazrihady
Google AppEngine fFex will handle everything for you, but for my requirement, the price is too expensive, so I don't use it and I also don't use any Google cloud product to host my Django app. If your app code is not efficient, it means it will use more resources, then the monthly bill of

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread Tatiana Mesa
Gracias Daniel, me seria muy útil un ejemplo. El jue., 23 de ene. de 2020 a la(s) 15:24, DANIEL URBANO DE LA RUA ( dannybombas...@gmail.com) escribió: > Create un tag template espera te mando doc > > On Thu, 23 Jan 2020, 19:38 Tatiana Mesa, wrote: > >> Hola Daniel, gracias por la rápida

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/ mira bien aqui tu pudes facbicarte uno para separara la hora y la devuelves a la vista en tiempo de ejecucion osea cuando se renderiza tu pagina creas un archivo y lo instancias {% tag_template_name args kwars %} puedes tomar el

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
Create un tag template espera te mando doc On Thu, 23 Jan 2020, 19:38 Tatiana Mesa, wrote: > Hola Daniel, gracias por la rápida respuesta > > Tengo el campo* DateTimeField* que trae la fecha y la hora en el mismo > campo. Quiero separarlos solo en la vista del Html. Sin modificar el tipo > de

Best Django Deployment

2020-01-23 Thread Motaz Hejaze
Any help friends ? -- 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

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread Tatiana Mesa
Hola Daniel, gracias por la rápida respuesta Tengo el campo* DateTimeField* que trae la fecha y la hora en el mismo campo. Quiero separarlos solo en la vista del Html. Sin modificar el tipo de dato. Agradezco tu respuesta. El jue., 23 de ene. de 2020 a la(s) 12:27, DANIEL URBANO DE LA RUA (

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/3.0/ref/forms/fields/#django.forms.TimeField El jue., 23 ene. 2020 a las 18:24, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: > https://www.geeksforgeeks.org/timefield-django-models/ > > > El jue., 23 ene. 2020 a las 18:19, DANIEL URBANO DE LA

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
https://www.geeksforgeeks.org/timefield-django-models/ El jue., 23 ene. 2020 a las 18:19, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: > Tienes date and time field > > On Thu, 23 Jan 2020, 15:57 Tatiana Mesa, wrote: > >> Buenas tardes comunidad, >> >> He empezado a trabajar

Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
Tienes date and time field On Thu, 23 Jan 2020, 15:57 Tatiana Mesa, wrote: > Buenas tardes comunidad, > > He empezado a trabajar con vistas basadas en clases en Django y tengo una > pequeña complicación. > > Quisiera saber de que forma puedo separar un campo *fecha (*DateTimeField*), > *en un

Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread Tatiana Mesa
Buenas tardes comunidad, He empezado a trabajar con vistas basadas en clases en Django y tengo una pequeña complicación. Quisiera saber de que forma puedo separar un campo *fecha (*DateTimeField*), *en un input la feha y en otro input la hora en una vista de *HTML.* Tengo en mi modelo un

Re: How to I create download link of some file using django

2020-01-23 Thread Kasper Laudrup
Hi Aditya, On 23/01/2020 12.46, aditya surana wrote: What if i don't want to add this additional feature?. Then don't? 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

Re: How to I create download link of some file using django

2020-01-23 Thread aditya surana
What if i don't want to add this additional feature?. On Monday, June 24, 2019 at 6:44:22 PM UTC+5:30, Nishant Boro wrote: > > You can use this simple module: > > https://github.com/nishant-boro/django-rest-framework-download-expert > > This module provides a simple way to serve files for

Re: Got an interview, need some idea for projects.

2020-01-23 Thread Aditya Khatwa
Create a small website that shows your own portfolio such as your project listing etc can be done in 3-5 days. Add a form as well if you want. Focus on the dynamic aspect rather than its aesthetic for a faster result... On Thu, 23 Jan 2020, 12:41 Jack Lin, wrote: > > > Hi Django users, I'm

Re: Django and MySQL NDB Cluster

2020-01-23 Thread Victor Guimarães Nunes
I found a (dummy) solution for this. The error was occurring when a Signal from post_save of User model was being triggered. In that signal I was performing a SomeModel.objects.get_or_create. So, apparently the get_or_create method was implemented using transactions with savepoints enabled.

Re: Django and MySQL NDB Cluster

2020-01-23 Thread Victor Guimarães Nunes
No, the database is all set and includes some data by the way. Em quinta-feira, 23 de janeiro de 2020 04:49:16 UTC-3, maninder singh Kumar escreveu: > > Could it be the server doesn't have the database ? > > > > [image: --] > > Maninder Kumar > [image: http://]about.me/maninder.s.kumar >

Re: Django and MySQL NDB Cluster

2020-01-23 Thread Victor Guimarães Nunes
Will do Em quarta-feira, 22 de janeiro de 2020 18:32:04 UTC-3, Jason escreveu: > > https://code.djangoproject.com/ticket/27677 > > Check the last comment from Tim. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Got an interview, need some idea for projects.

2020-01-23 Thread Motaz Hejaze
Yes .. You can follow projects from books like .. Django 2 by example Building Django 2 web applications On Thu, Jan 23, 2020 at 9:10 AM Jack Lin wrote: > > > Hi Django users, I'm Jack who currently learning Django everyday > > My practice projects