Re: button not responding when click but when press return key than works

2018-06-13 Thread Fidel Leon
If I remember correctly, the correct tag for a button is [obviously] , no (please see the missing T). El jue., 14 jun. 2018 a las 0:14, Asif Khan () escribió: > No I am not using JS capturing for any kind of actions. where as my other > form button are working. > > On Thursday, June 14, 2018 at

Re: Server-Sent Events for Django

2018-06-13 Thread Justin Karneges
Thanks for the tips. I didn't think about referencing a CDN, but I suppose that's a better default, and if people want local copies then they can make their own. Json2 probably shouldn't be in there. I've been dragging that file around for years without really thinking about it. If anyone really

Re: Server-Sent Events for Django

2018-06-13 Thread Jason
ooh, nice! missed that part. Did you consider having that pull from a CDN rather than locally? Reason being, any updates to said polyfills will require you to deploy an update. Whereas if you have a template tag to pull from a CDN, you can have your users specify the version if necessary

Re: Server-Sent Events for Django

2018-06-13 Thread Justin Karneges
Thanks Jason! The library comes with Yaffle's polyfill for IE/Edge support, that can be included with a template tag. https://github.com/fanout/django-eventstream#receiving-in-the-browser On Wed, Jun 13, 2018 at 5:20 PM, Jason wrote: > Nice library! good work :-) > > I would suggest you

Re: Server-Sent Events for Django

2018-06-13 Thread Jason
Nice library! good work :-) I would suggest you update your readme to reflect that SSE is not supported by any MS browser (IE or Edge) as shown by https://caniuse.com/#feat=eventsource. On Wednesday, June 13, 2018 at 7:34:21 PM UTC-4, Justin Karneges wrote: > > Hi folks, > > I'm pleased to

Server-Sent Events for Django

2018-06-13 Thread Justin Karneges
Hi folks, I'm pleased to announce an SSE library for Django: https://github.com/fanout/django-eventstream The library makes pushing data from the server really easy. It uses Channels under the hood, although you don't have to write any async code. Simply declare endpoints in routing.py and call

RE: Nested for loops in templates

2018-06-13 Thread Matthew Pava
field is a string – a name of a field, field is not actually an attribute of row. You’ll need a template tag to get the attribute named field from row. This StackOverflow question may help you:

Re: Nested for loops in templates

2018-06-13 Thread Vijay Khemlani
As far as I know you can't do it directly in the templating system Yo could write a template tag as described here https://stackoverflow.com/questions/2894365/use-variable-as-dictionary-key-in-django-template/10700142#10700142 or use a different data structure, for example each row as a list of

Re: button not responding when click but when press return key than works

2018-06-13 Thread Asif Khan
No I am not using JS capturing for any kind of actions. where as my other form button are working. On Thursday, June 14, 2018 at 2:14:48 AM UTC+5, Asif Khan wrote: > > I am having amazing problem in my django template. Button does not respond > on pressing click on it. It works when I press

Re: button not responding when click but when press return key than works

2018-06-13 Thread Julio Biason
Hi Asif, Are you sure you don't have any JS capturing the submit press and doing `preventDefault()`? That would prevent the button from sending the form. On Firefox, if you inspect the button, if it shows an "EV" near it, it means there is something capturing the button events -- and `click`

button not responding when click but when press return key than works

2018-06-13 Thread Asif Khan
I am having amazing problem in my django template. Button does not respond on pressing click on it. It works when I press return key. code is following. {% extends 'vtapp/baseapp_layout.html' %} {% block head %} Vehicle Vegilince - Customer Search {% endblock %} {% block content %} Enter

Nested for loops in templates

2018-06-13 Thread Mikkel Kromann
Dear Django users. Thanks to the good advice of many people on this list, I've managed to create some nice generic class based views that work simultaneously with many models. The models may differ from each other with regards to the number of columns in their data tables as well as the naming

Re: Converting GeometryField to MultiPolygon using GeoDjango?

2018-06-13 Thread Jani Tiainen
Hi. I usually do data cleanups with QGIS tool which has excellent tools to manipulate data. And it's relatively fast. Of course if you need to import data more regular basis QGIS might not be an option. ke 13. kesäk. 2018 klo 21.30 Jack kirjoitti: > See original question on Stack Overflow >

Re: Converting GeometryField to MultiPolygon using GeoDjango?

2018-06-13 Thread Jack
See original question on Stack Overflow for better formating. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Converting GeometryField to MultiPolygon using GeoDjango?

2018-06-13 Thread Jack
I am trying to add a bunch of school boundary files into the database. The boundary files are inconsistent. They are processed by `DataSource` as either `Polygon`, `MultiPolygon`, or `GeometryCollection`. Converting `Polygon` into `MultiPolygon` is fairly simple using this solution

How would I turn this function into a CBV?

2018-06-13 Thread Alexander Joseph
I found a tutorial for putting forms in modals that works but its not using CBVs and I'd rather use CBVs. Here is the function that works... def gaas_create(request): form = GaasWaferDesignForm() context = {'form': form} html_form =

Re: odd crash

2018-06-13 Thread Larry Martell
Update: The django code clearly has a bug, and I fixed it on my system. That allowed me to see the next higher up error, which was an error importing one of my own context_processors. This is odd, as the file and function are there, and are readable, and if they were not I would always get this

Re: saving django session data for anonymous user

2018-06-13 Thread Siddharth Srivastava
Thanks Anthony for your prompt reply. current implementation is that i am using django orm query to pull the user cart details and cart id(session key) is the key so when user switch from anonymous user to actual user then i loses the data came from the query. so when user gets authenticated

Django Admin verification

2018-06-13 Thread habib mobolaji
Please, I am currently working on a project for a modeling agency where the admin verifies the details of a new model after completing a registration form. The project is using python django framework. This is the breakdown; - A new model fills a form. - The form is send to the

Re: Get the Parameter Value From URL

2018-06-13 Thread 赖信桃
Hi, Pravin You don't need `get` method in template, just use dot, and if it doesn't exist, Django template engine will set it to None automatically. Both below works: ``` {{ request.GET.foo }} {% if request.GET.my_var %} {{ request.GET.my_var }} {% endif %} ``` Check Django template

Re: Login with pre-set credentials.

2018-06-13 Thread 赖信桃
I believe the default django admin and default user system can meet you need. Check the docs: https://docs.djangoproject.com/zh-hans/2.0/ref/contrib/admin/ kimeualexis 于2018年6月12日周二 下午9:36写道: > Hello, guys! > Am working on a student's portal with users: Admin, Staff & Student. I > want the admin