heavy refactoring

2015-06-09 Thread Mike Dewhirst
With Django 1.7 and Postgres I want to change the name of an app. From my initial investigation it looks like I need to create a new app with the desired name and then blow the old one away after pumping the data across. Then comes the refactoring. At the moment I just use a vanilla text edi

Re: heavy refactoring

2015-06-09 Thread Erik Cederstrand
> Den 09/06/2015 kl. 10.09 skrev Mike Dewhirst : > > Does anyone have any experience with app-renames and maybe some refactoring > advice for me? > > Maybe I don't even need to replace and destroy ... If you wanted, you could set Meta.db_table for all models to the current table name. Then yo

Re: heavy refactoring

2015-06-09 Thread Mike Dewhirst
On 9/06/2015 6:43 PM, Erik Cederstrand wrote: Den 09/06/2015 kl. 10.09 skrev Mike Dewhirst : Does anyone have any experience with app-renames and maybe some refactoring advice for me? Maybe I don't even need to replace and destroy ... If you wanted, you could set Meta.db_table for all model

Bug in Django? It throws server error when context processor raises Http404

2015-06-09 Thread Alexey Grigoriev
Django doesn't catch django.http.Http404 exception in my context processor when Debug=False and when I have custom '404.html' template. It just throws Internal Server Error. Is it Django bug? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

error while using ActionForm with django-grappelli

2015-06-09 Thread Ashish Gupta
I am using Django 1.7.6 and django-grappelli 2.6.4 I have written custom admin actions and Action form which were working well in Django admin. But in grappelli when i select a admin action from the dropdown the pages reloads before i can select the values from the ActionForm in admin panel. Is

How to test email-verification in django-registration-redux application on localhost?

2015-06-09 Thread akshat
I have made an django app which uses Django-Registration-redux application to registration and email verification of users.I am using 'Sites' framework also.How ever when I click register button email is not sent but instead I get this error message - You're using the Django "sites framework"

Re: Bug in Django? It throws server error when context processor raises Http404

2015-06-09 Thread Galia Ladiray
Maybe it does not find your custom 404.html (and gives you a 500 of not finding it)? Try to use this template elsewhere with debug=True, just to see On Tuesday, June 9, 2015 at 1:22:44 PM UTC+2, Alexey Grigoriev wrote: > > Django doesn't catch django.http.Http404 exception in my context proc

Re: Bug in Django? It throws server error when context processor raises Http404

2015-06-09 Thread Kapil Mangtani
have you written the handler correctly? -- 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 post to this group, send em

Re: How to test email-verification in django-registration-redux application on localhost?

2015-06-09 Thread Luis Zárate
Put SITE_ID = 1 in your settings file to fix this error 2015-06-09 7:01 GMT-06:00 akshat : > You're using the Django "sites framework" without having set the SITE_ID > setting. Create a site in your database and set the SITE_ID setting or pass a > request to Site.objects.get_current() to fix

Re: push yahoo finance json data into database

2015-06-09 Thread Oscar Buijten
Hi James, Thanks for such a detailed response. I looked at all your links (and already had come across some of them) I guess that my question wasn't specific enough :-( The table (and model) are existing. However, the keys that I retrieve in the output I shared do not correspond to (some of) the

Re: push yahoo finance json data into database

2015-06-09 Thread Oscar Buijten
Hi James, Thanks for such a detailed response. I looked at all your links (and already had come across some of them) I guess that my question wasn't specific enough :-( The table (and model) are existing. However, the keys that I retrieve in the output I shared do not correspond to (some of) the

Re: push yahoo finance json data into database

2015-06-09 Thread Oscar Buijten
Oh, here's a part of the model that I forgot to include. class MyichiHistoricalData(models.Model): id = models.IntegerField(db_column='ID', primary_key=True) # Field name made lowercase. symbol = models.CharField(max_length=10, blank=True, null=True) exchange = models.CharField(max_l

Re: Bug in Django? It throws server error when context processor raises Http404

2015-06-09 Thread Alexey Grigoriev
I found this issue in my big project. And then I started new Django project from scratch, and reproduced the problem. You can reproduce this bug: 1) start new Django project 2) create context processor that raises Http404 3) set Debug=False 4) create custom '404.html' template And then you get

Re: Bug in Django? It throws server error when context processor raises Http404

2015-06-09 Thread Erik Cederstrand
> Den 09/06/2015 kl. 18.54 skrev Alexey Grigoriev : > > I found this issue in my big project. And then I started new Django project > from scratch, and reproduced the problem. > You can reproduce this bug: > 1) start new Django project > 2) create context processor that raises Http404 > 3) se

Simulating REMOTE_USER login with the test server

2015-06-09 Thread Gergely Polonkai
Hello, I’m about to use the test server with REMOTE_USER based logins. I already know how to set it up with my Apache based server, but I can see no way of doing the same with the dev server (manage.py runserver). I have tried setting the environment variable REMOTE_USER to a desired value, as I s

Re: generating pdf report with django-easy-pdf

2015-06-09 Thread sum abiut
Thanks Jose, i will try that out and see how it goes. Cheers, Sum On Mon, Jun 1, 2015 at 9:44 AM, Jose Aguirre wrote: > > *You need to add the get method this:* >> > > def get(self, request, *args, **kwargs): > > """ > Handles GET request and returns HTTP response. > """ > cont

How to DRY, define a set of model-fields and reuse them as multiple instances

2015-06-09 Thread ThomasTheDjangoFan
Hi guys, now this is kind of hard for me to explain, I hope that somebody understands what I actually want. I am a python newbie and wonder if there is an easy solution. *They say: DRY!!* *My question is:How do a define an (abstract?) class including methods and fieldsand then attach it to

Keep selected option after form submission

2015-06-09 Thread julio . lacerda
Hi, I have the same problem of this guy (http://stackoverflow.com/questions/21884631/keeping-option-selected-after-form-is-submitted-in-django), but I do not want to render a field like Daniel Roseman said in the answer. Here is the code:

Re: Simulating REMOTE_USER login with the test server

2015-06-09 Thread Mike Dewhirst
On 10/06/2015 7:07 AM, Gergely Polonkai wrote: Hello, I’m about to use the test server with REMOTE_USER based logins. I already know how to set it up with my Apache based server, but I can see no way of doing the same with the dev server (manage.py runserver). I have tried setting the environm

Re: Keep selected option after form submission

2015-06-09 Thread Vijay Khemlani
It doesn't answer the question, but why don't you want to render the field automatically? On Tue, Jun 9, 2015 at 6:47 PM, wrote: > Hi, > > I have the same problem of this guy ( > http://stackoverflow.com/questions/21884631/keeping-option-selected-after-form-is-submitted-in-django), > but I do no

Re: Keep selected option after form submission

2015-06-09 Thread James Schneider
You can remove that entire pasted section of code and replace it with {{ form.activity }}, Django will render it with the behavior you described. -James On Jun 9, 2015 5:02 PM, "Vijay Khemlani" wrote: > It doesn't answer the question, but why don't you want to render the field > automatically? >

Have mercy please!

2015-06-09 Thread Jon Foster
I've been involved with Django, on and off, since v0.96 or so. I love Django and think its the most productive way to build rich websites with custom defined content types. Throw in Django-CMS and things get pretty darn cool. I was thrilled when Django reached v1.0 since it came with the promis

Re: Have mercy please!

2015-06-09 Thread Tim Graham
Hi Jon, Please see a recent discussion on django-developers with similar complaints: https://groups.google.com/d/topic/django-developers/WKpkv1hdVWU/discussion There is also discussion on django-developers about revising the deprecation schedule to make it easier to upgrade from one LTS release

Best Practices for Migrations in Reusable Apps?

2015-06-09 Thread Jonathan Barratt
Hi All, I'm interested to know what the community's opinions are on how best to package migrations with reusable apps (I'm thinking of the built-in migrations, but it seems the same principles would apply for pre-1.8 south migrations). My current approach is to squash all schema migrations each

Re: Best Practices for Migrations in Reusable Apps?

2015-06-09 Thread Avraham Serour
usually people will upgrade using pip install -U if your lib needs more than that it should be the least complicated possible, I believe making people make their own migrations would be a burden On Wed, Jun 10, 2015 at 9:24 AM, Jonathan Barratt < jonathan.barr...@gmail.com> wrote: > Hi All, > > I