Re: How to pass data between Django module/app functions without using database in asynchronous web service

2016-12-29 Thread Ken McDonald
On Thursday, December 29, 2016 at 6:00:03 AM UTC-5, Andrew Godwin wrote: > > *Q) Are the websocket and the AJAX calls going to different clients/pages > entirely, rather than them both being in the same page context? It sounds > like the websocket is going to a server somewhere that's allocating

Re: User model not using persistent DB connection?

2016-12-29 Thread Bobby Mozumder
I’m actually already setting CONN_MAX_AGE to None on a connection pool. The rest of the queries in the view are using the persistent connection pools. It’s only this specific request.user object that keeps creating a new connection instead of using the persistent connection for some reason. -b

Re: User model not using persistent DB connection?

2016-12-29 Thread James Bennett
See the documentation for details: https://docs.djangoproject.com/en/1.10/ref/settings/#conn-max-age Also, generally speaking maintaining a connection pool has been seen as out of scope for Django itself, and most people use a standalone connection pooler (such as pgpool for Postgres). On Thu, D

User model not using persistent DB connection?

2016-12-29 Thread Bobby Mozumder
Hi, It seems Django doesn’t use a persistent DB connection whenever I use the Request.User object. I always get a signal saying a new DB connection occurs when I call the object. For example: class MyView(DetailView): def get(self, request, slug): print(request.user) # <--- Boom, n

Re: existing database connectivity

2016-12-29 Thread ludovic coues
Have you done a tutorial on django ? Part 4 of the official tutorial deal with altering an object from your database according to a form. https://docs.djangoproject.com/en/1.10/intro/tutorial04/ The django girls tutorial have a section on how to create an object from a form and save it in your da

Re: File/Folder Sync API?

2016-12-29 Thread Alexander Joseph
Thanks for the awesome resources! Yes, those are what I'm looking for. It would be nice to have something more secure than dropbox though. Something like Tresorit or Sync.com would be ideal, not sure if anything like that exists for django dev or if those have APIs though. Thanks again On Thu, Dec

RE: Just added Python, Django and MySQL integration template for easier data visualization with AnyChart JS

2016-12-29 Thread Matthew Pava
I took a quick glance, and they are advertising Django integration to show an example of how to retrieve the data from the database through Django ORM to be used in the HTML template that is rendered by Django and includes the script tag with the AnyCharts.js file. We are currently using two di

Re: Django-Channels strange slowdowns - how to profile?

2016-12-29 Thread jakub . skalecki
I've prepared this simple script to measure roundtrip time (redis on remote host): def check_time(path): t = time.time() channel_layer.

Re: Just added Python, Django and MySQL integration template for easier data visualization with AnyChart JS

2016-12-29 Thread Avraham Serour
I have no idea what anychartjs does, in any case I don't understand why a js lib would need django integration. Also it seems they have no idea what they are doing, the guthub repo linked has .pyc files commited, anyone needing to use don't copy paste code from there and take it with a kilo of sal

Re: Django-Channels strange slowdowns - how to profile?

2016-12-29 Thread jakub . skalecki
Thank you for your response. I'll do what you suggested regarding basic consumer, and post my results here. Sadly, Docker Swarm and distributed hosts are much harder to debug than "standard" deployment. Currently, full way of request is like this: External load balancer (5 hosts) -> Docker Swar

Static CSS file for custom widget

2016-12-29 Thread Antonis Christofides
Hello everyone, can a custom widget specify a static CSS file? I think the

Re: How do I translate site.name to other languages?

2016-12-29 Thread Uri Even-Chen
Hi, with django-modeltranslation you can add translations to any model, even if it's built-in in Django, but the problem is that migrations are being created in site-packages, outside our git repo, and this would cause issues upgrading Django itself. (speedy_net)net$ ./manage.py makemigrations Mi

Re: How to pass data between Django module/app functions without using database in asynchronous web service

2016-12-29 Thread Andrew Godwin
Hi Ken, I'm mostly clear on what's happening here (you should definitely not use global variables for the reasons you mention), but I have a few questions to try and clear things up: - Are the websocket and the AJAX calls going to different clients/pages entirely, rather than them both being in t

Re: django.template.exceptions.TemplateSyntaxError: 'static' is not a registered tag library. Must be one of:

2016-12-29 Thread jorrit787
Have you added *django.contrib.staticfiles* to *INSTALLED_APPS* in your settings.py? On Thursday, December 29, 2016 at 11:30:16 AM UTC+1, ragini dahihande wrote: > > Hello Guys, > I am new to django. > I created sample project while running it I am getting following error > > django.template.exce

Re: Django-Channels strange slowdowns - how to profile?

2016-12-29 Thread Andrew Godwin
Hi Jakub, There's no full profiling path yet - this is something I hope to work on as we start integrating ASGI code at work early next year. 400ms for a request is already very long; I'm slightly concerned by that (unless that's normal without Channels installed as well). If you want to do a ba

django.template.exceptions.TemplateSyntaxError: 'static' is not a registered tag library. Must be one of:

2016-12-29 Thread ragini dahihande
Hello Guys, I am new to django. I created sample project while running it I am getting following error django.template.exceptions.TemplateSyntaxError: *'static'* is not a registered tag library. Must be one of: *following is my index.html* {% load static %} {% if latest_question_list %}

Just added Python, Django and MySQL integration template for easier data visualization with AnyChart JS

2016-12-29 Thread andrey . khachaturov
Hi all, We at AnyChart JS Charts have just released a series of 20+ integration templates to help web developers add interactive charts, maps and dashboards to web apps much easier, no matter what your technology stack is. In particular, now there is a template for us

Re: Django doesn't email reporting an internal server error (HTTP status code 500)

2016-12-29 Thread Luis Zárate
try to change de django loggin https://docs.djangoproject.com/en/1.10/topics/logging/#examples 2016-12-28 9:45 GMT-06:00 Philip Lee : > Please help! The question are also posted here > http://stackoverflow.com/questions/41363888/django- > doesnt-email-reporting-an-internal-server-error-http-stat

Re: File/Folder Sync API?

2016-12-29 Thread Luis Zárate
Are you looking for something like webdav https://github.com/meteozond/djangodav http://django-webdav-storage.readthedocs.io/en/latest/ or something like dinamic dropbox storage https://github.com/andres-torres-marroquin/django-dropbox 2016-12-28 12:15 GMT-06:00 Alexander Joseph : > I'm build