Re: Django runserver needs restart on psql data changes

2015-04-29 Thread Arnab Banerji
Hi Carl - that was *exactly* what I was doing - thanks a ton for finding that issue even without requiring the code. Now that I think about it, putting that definition in the global section makes absolutely no sense. Appreciate your feedback, -AB On Wednesday, April 29, 2015 at 5:10:21 PM

upload csv file from different directories

2015-04-29 Thread sum abiut
Hi I am writing an app that upload csv file and write csv data to models. So far everything is working fine. What i want to do now is to be able get the users to be able to upload csv files from different directories. I cannot seem to figure this out, i need directions. form the function*

Re: RemovedInDjango19Warning: Model class %s doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS ..

2015-04-29 Thread Carl Meyer
Hi, On 04/29/2015 11:13 AM, Bumyong Choi wrote: > I am trying to understand this warning better. I understand that we want > to make sure that a model has an explicit app_label or it is in > INSTALLED_APPS. I spent some time trying to remove warnings from my code > because I was getting these

Re: Django runserver needs restart on psql data changes

2015-04-29 Thread Carl Meyer
Hi Arnab, On 04/29/2015 03:13 PM, Arnab Banerji wrote: > Hi Javier - thanks for the response. Yes - I am storing the data in a > dictionary - then having django_tables2 API render the dictionary as a > table. How do I force a read of that variable for every browser refresh > on the client side?

Re: Django runserver needs restart on psql data changes

2015-04-29 Thread Arnab Banerji
Hi Javier - thanks for the response. Yes - I am storing the data in a dictionary - then having django_tables2 API render the dictionary as a table. How do I force a read of that variable for every browser refresh on the client side? Thanks for your time, -AB On Wednesday, April 29, 2015 at

Re: Django runserver needs restart on psql data changes

2015-04-29 Thread Javier Guerra Giraldez
On Wed, Apr 29, 2015 at 12:35 PM, Arnab Banerji wrote: > The rendering happens perfectly, but the problem is - when the client user > does a browser refresh, the new data does not get reloaded until I restart > the runserver. Is there something I am doing wrong with respect to

RemovedInDjango19Warning: Model class %s doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS ..

2015-04-29 Thread Bumyong Choi
I am trying to understand this warning better. I understand that we want to make sure that a model has an explicit app_label or it is in INSTALLED_APPS. I spent some time trying to remove warnings from my code because I was getting these warning messages even though my model was defined in an

Django runserver needs restart on psql data changes

2015-04-29 Thread Arnab Banerji
Hi all - I am working on a Django app that interacts with a psql database via a set of models. (1) There is a backend job which keeps updating the database via the same models. (2) I am creating a table with a view using django_tables2 - and giving it a custom dictionary to render using

Re: clear database (drop all tables)

2015-04-29 Thread Derek
As usual, StackOverflow to the rescue ... http://stackoverflow.com/questions/3414247/django-drop-all-tables-from-database On Wednesday, 29 April 2015 12:11:51 UTC+2, lars van Gemerden wrote: > > Hi all, > > Is there a simple programmatic way to drop all tables in the database > (e.g. for

Django BooleanField Checkbox Returns Empty

2015-04-29 Thread Ken Nguyen
I read every corner of the documentation but couldn't figure out why the BooleanField Form doesn't return 'True' when the checkbox is checked. Is this a valid test? Shouldn't formset.cleaned_data = [{True}, {False}]? >>> from django import forms >>> from django.forms.formsets import

Re: clear database (drop all tables)

2015-04-29 Thread Bill Freeman
With suitable privileges, you can drop the database and recreate it. In at least some databases the user privilege grants are not lost with the database and don't have to be recreated when the database is. And, if you're using SQLite, just remove the file. On Wed, Apr 29, 2015 at 6:10 AM, lars

Re: Require code explaination

2015-04-29 Thread François Schiettecatte
Well the response does not seem to contain the audio file, to the best of my knowledge Django does not implement X-Accel-Redirect, are you running all this on the same machine? Maybe your browser is getting the file ? Seems unlikely. Have you tried something like ‘curl’ to make the request in

Re: selectfilter2 javascript and django

2015-04-29 Thread Dimitris Kougioumtzis
ok i found it in the urls.py i add the (r'^jsi18n/$', 'django.views.i18n.javascript_catalog'), and in template Τη Τετάρτη, 29 Απριλίου 2015 - 4:12:56 μ.μ. UTC+3, ο χρήστης Dimitris Kougioumtzis έγραψε: > > i want to use the selectfilter widget for a view , the user in my django

selectfilter2 javascript and django

2015-04-29 Thread Dimitris Kougioumtzis
i want to use the selectfilter widget for a view , the user in my django application is only active not staff because i want to restrict access to django admin pages. But selectfilter widget dosen't work the error i get is SyntaxError: expected expression, got '<' /admin/jsi18n/

Re: Require code explaination

2015-04-29 Thread Anubhav Kaushik
yes i am working on this code but i havnt wrote this code otherwise i would not have required the explaination i guess. and for your second question , i am not sure coz as you said it looked like nginx directive , but i am running it on default wsgi server included in django . so i am asking

Re: Require code explaination

2015-04-29 Thread François Schiettecatte
You need to be a little more specific about what the context is, and what you are observing, rather than just plastering up some code. - Is this code in an app you are working with ? Did you write this code ? - Is the audio file being served by your application through the default wsgi server

Re: Require code explaination

2015-04-29 Thread Anubhav Kaushik
but i am not running ny nginx server , m just running default wsgi server with django ,and files are still served file ,can you explain how that is happening? On Wednesday, April 29, 2015 at 5:10:56 PM UTC+5:30, François Schiettecatte wrote: > > I found this page which was pretty clear I

Re: Require code explaination

2015-04-29 Thread François Schiettecatte
I found this page which was pretty clear I think: http://wiki.nginx.org/XSendfile Looks like an nginx directive to serve a file as the content of the response. F. > On Apr 29, 2015, at 7:28 AM, Anubhav Kaushik wrote: > > yes francois ,when i searched the

Re: Require code explaination

2015-04-29 Thread Anubhav Kaushik
yes francois ,when i searched the term ,all i got was links related to nginx. On Wednesday, April 29, 2015 at 4:55:58 PM UTC+5:30, François Schiettecatte wrote: > > Which part do you mean? The 'X-Accel-Redirect’ ? > > François > > > On Apr 29, 2015, at 6:08 AM, Anubhav Kaushik

Re: Require code explaination

2015-04-29 Thread François Schiettecatte
Which part do you mean? The 'X-Accel-Redirect’ ? François > On Apr 29, 2015, at 6:08 AM, Anubhav Kaushik wrote: > > response = HttpResponse() > > protected = settings.PROTECTED_AUDIO_ROOT + path > > logger.info('Protected path: %s', protected) > >

Re: "RuntimeError: Error creating new content types."

2015-04-29 Thread Shubham Goyal
Facing the same problem. Any leads..?? On Saturday, April 18, 2015 at 2:38:56 AM UTC+5:30, Christophe Pettus wrote: > > Well, django_content_type.name definitely in my database. :) This is a > project that was migrated from 1.6. > > The underlying exception was a null value complaint about >

Re: How to get the complement in django?

2015-04-29 Thread 田福顿
在 2015年4月29日星期三 UTC+8下午6:32:09,Tom Evans写道: > > On Wed, Apr 29, 2015 at 11:06 AM, 田福顿 > wrote: > > I want to connect to tables than get their complment, but I don't know > how > > to do it? Plaea give me some suggestion. I have wasted two days in this > > problem.BTW

Re: How to get the complement in django?

2015-04-29 Thread Tom Evans
On Wed, Apr 29, 2015 at 11:06 AM, 田福顿 wrote: > I want to connect to tables than get their complment, but I don't know how > to do it? Plaea give me some suggestion. I have wasted two days in this > problem.BTW this way didn't work:Django: Getting complement of queryset That

Django "Add to Cart"

2015-04-29 Thread Hasit Mamtora
Please help me in building* Add to Cart *module for my E-commerce portal. I am not able to build one. Suppose I include *django-carton * app to my project than how do i proceed further. Can anyone help me in my problem? -- You received this message

How to get the complement in django?

2015-04-29 Thread 田福顿
I want to connect to tables than get their complment, but I don't know how to do it? Plaea give me some suggestion. I have wasted two days in this problem.BTW this way didn't work:Django: Getting complement of queryset

clear database (drop all tables)

2015-04-29 Thread lars van Gemerden
Hi all, Is there a simple programmatic way to drop all tables in the database (e.g. for testing purposes), also without input prompts? Cheers, Lars -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Require code explaination

2015-04-29 Thread Anubhav Kaushik
response = HttpResponse() protected = settings.PROTECTED_AUDIO_ROOT + path logger.info('Protected path: %s', protected) response["X-Accel-Redirect"] = protected response["Content-Type"] = "audio/mpeg" return response -- You received this message because you

Re: SQL Server Support - Does it Exist

2015-04-29 Thread Alex-droid AD
We try to use django-pyodbc on CentOS (python 2.7 + Django 1.8, connection to MS SQL Server 2012) While running 'migrare' I get the same error as mentioned above: 'django_pyodbc' isn't an available database backend Can't understand what has been done wrong... On Sunday, March 24, 2013 at