Re: DecimalField Problem

2014-01-09 Thread Timothy W. Cook
On Wed, Jan 8, 2014 at 10:42 PM, Dennis Lee Bieber wrote: > If Django's "DecimalField" is NOT use Python's Decimal type, I'd be > concerned... Python's Decimal is NOT a "float". > > However, the conversion of a Decimal to/from PostgreSQL might > result in > a floating point value

Re: Deploying to Heroku for first time, Dynos is blank, not recognizing Procfile

2014-01-09 Thread Vibhu Rishi
Everything on Heroku is git based. So, you will have to do a git push heroku master for any updates. V. On Thu, Jan 9, 2014 at 7:18 AM, Scott Meyers wrote: > Thanks for the effort. Yes I do have a requirements.txt file, and yes, my > Procfile has no extensions. Heroku just isn't picking it up

Re: referencing choices tuples

2014-01-09 Thread trojactory
Hi Phil, Do you mean dropdown box which allow choices as well as free text input? I think you should use a normal textfield and a javascript based autocomplete solution like https://github.com/yourlabs/django-autocomplete-light Cheers, Arun On Thursday, 9 January 2014 03:21:11 UTC+5:30, Phil H

Re: Question about the __unicode__()

2014-01-09 Thread trojactory
Igor, Are you looking for a more meaningful label, say using string interpolation: def __unicode__(self): return "Manufacturer: %s, Serial no: %s" % (manufacturer, serial_number) On Thursday, 9 January 2014 12:10:07 UTC+5:30, Igor Korot wrote: > > Tundebabzy, > I understand that. > But a

Re: Question about the __unicode__()

2014-01-09 Thread Avraham Serour
ultimately it should make sense to you (or anyone using the system) so you can identify each object in general before opening it in full On Thu, Jan 9, 2014 at 12:23 PM, trojactory wrote: > Igor, > > Are you looking for a more meaningful label, say using string > interpolation: > > def __unicod

How to combine multiple querysets and remove duplicates?

2014-01-09 Thread Rodney Lewis
Please help with my question I posted to StackOverflow: http://stackoverflow.com/questions/21013973/how-to-combine-multiple-querysets-and-remove-duplicates Thank you! -- Rodney Lewis http://www.youtube.com/pyrodney -- You received this message because you are subscribed to the Google Groups

question about url

2014-01-09 Thread luca72
Hello i have defined an url as: (r'^tipi/(\w)', 'polls.views.tipi'), the template is: {% if variabile == "vino" %} {% for a in lista_vini %} {{a}} {% endfor %} {% endif %} the view is: def tipi(request,a): if a == 'Barbaresco': testo = ['Wine name: BARBARESCO','Region: Pie

Re: question about url

2014-01-09 Thread Avraham Serour
you are probably opening the wrong url, I also suggest using $ at the end of the regex On Thu, Jan 9, 2014 at 1:06 PM, luca72 wrote: > Hello > i have defined an url as: > > (r'^tipi/(\w)', 'polls.views.tipi'), > > the template is: > > > {% if variabile == "vino" %} > > {% for a in lista_v

Re: question about url

2014-01-09 Thread Tom Evans
On Thu, Jan 9, 2014 at 11:06 AM, luca72 wrote: > Hello > i have defined an url as: > > (r'^tipi/(\w)', 'polls.views.tipi'), The word 'tipi', followed by a forward slash, followed by a SINGLE 'word' character, and then any other characters before the end of the URL (but none of them will be captur

Re: How to combine multiple querysets and remove duplicates?

2014-01-09 Thread Erik Cederstrand
Den 09/01/2014 kl. 08.29 skrev Rodney Lewis : > Please help with my question I posted to StackOverflow: > > http://stackoverflow.com/questions/21013973/how-to-combine-multiple-querysets-and-remove-duplicates If the answer you got there doesn’t solve your problem, then please add a comment on SO

Re: How to combine multiple querysets and remove duplicates?

2014-01-09 Thread Jirka Vejrazka
Hi Lewis, looks like you already got the answer - using Q() objects helps a lot. I'll just add two things that might help: - it's possible to prepare filters in advance which helps readability and code structure. I often do something similar to this: from django.db.models import Q filters =

What is the preferred python-memcache library for django 1.6 apps deployed on python 3.3?

2014-01-09 Thread Toran Billups
I'm deploying my first python 3.3 app and noticed that a python-memcached isn't working and instead a python3-memcached https://pypi.python.org/pypi/python3-memcached If you are deploying a new django web app today what would you recommend? -- You received this message because you are subscrib

Re: Django Install Error: " SyntaxError: future feature unicode_literals is not defined "

2014-01-09 Thread Byron Price
I have Python 3.3.2 running and I'm trying to download Django-1.6.1 On Thursday, January 9, 2014 12:39:11 AM UTC-5, Mark Moss wrote: > > What's the version of python you are using? Django 1.5 has dropped > support for Python 2.5 (*see here >

Re: Django Install Error: " SyntaxError: future feature unicode_literals is not defined "

2014-01-09 Thread Xavier Ordoquy
Hi, Given the error it looks like you weren’t using python 3.3 For the record, I’m running on osx (10.9), using python 3.3.3 I had no issue with this import. Regards, Xavier Ordoquy. Le 9 janv. 2014 à 19:04, Byron Price a écrit : > I have Python 3.3.2 running and I'm trying to download Djang

need django.cache advice

2014-01-09 Thread Sells, Fred
I've got a queryset that is ~ a 6 table join of a lot of data that generates about 1000 records with about 25 fields each I've got ~100 terminals hitting this query every 1 minute looking for a subset of 25 records ~20 records change every minute I was thinking about updating the data (queryse

Re: need django.cache advice

2014-01-09 Thread Erik Cederstrand
Den 09/01/2014 kl. 21.28 skrev Sells, Fred : > I was thinking about updating the data (queryset) once a minute on a cron job > and saving that in the django.cache > > Then each terminal would access the cache and and get the subset that applies > to them. > > Does that make sense? Is there a

saving to two models from one class view

2014-01-09 Thread Brad Rice
I have been banging around trying to write to two models from one view for a couple days and just cannot figure it out. I am using a CreateView. I want to write to a model with just the created_by user and a default value of False in app_complete to. I'm getting this error: [u'ManagementForm d

RE: need django.cache advice

2014-01-09 Thread Sells, Fred
Thanks Erick, I was not aware of Varnish. Erik wrote: 1000 records from 6 tables shouldn't be a problem if your database is properly indexed. Databases are good at caching query results and not doing excess work when the data hasn't changed. Maybe the first request from a terminal will be slow

Re: need django.cache advice

2014-01-09 Thread Javier Guerra Giraldez
On Thu, Jan 9, 2014 at 4:43 PM, Sells, Fred wrote: > > Fred: I was unclear. The initial join is 1 x 1000 x 20 x 100 ... which > gets reduced to about 1000 records. A few records are changed every second. are the 'interesting' 1000 out-records always the same, or changing slowly? is it e

Re: How to migrate a project from one DB to another

2014-01-09 Thread Don Fox
Thanks for responding. Regarding the small project, I initial tried it but it appeared to no go well with sqlite3. I need to move over to postgresql soon but first need to resolve a couple of other issues first. Thanks again for the response. Don On Sun, Dec 29, 2013 at 3:53 AM, Timothy W. Cook

RE: need django.cache advice

2014-01-09 Thread Sells, Fred
Thanks, Javier. The interesting 1000 records are changing very slowly. A few records could be added/deleted every minute but mostly it's some field changes to the records in the set. No change is more or less worthwhile than any other change. All need to get into the database "eventually".

Re: need django.cache advice

2014-01-09 Thread Erik Cederstrand
Den 09/01/2014 kl. 22.43 skrev Sells, Fred : > Fred: I was unclear. The initial join is 1 x 1000 x 20 x 100 ... which > gets reduced to about 1000 records. This still shouldn’t be a problem as long as the database has proper indexes. Is the reduction to (at most) 25 records something you *

Re: How to approach this problem?

2014-01-09 Thread Rafael Durán Castañeda
You could also check http://yergler.net/blog/2009/09/27/nested-formsets-with-django/ HTH, Rafael El 09/01/2014, a las 01:05, César García Tapia escribió: > django-nested-inlines doesn't seem to work with Django 1.6 > > In case anyone is interested, I solved it with the info in this very valu

How to re-sync with Heroku?

2014-01-09 Thread Scott Meyers
Newbie here (obviously!). I'm starting a Django project in Cygwin. I push to Heroku. I'm playing around, checking heroku logs, and my power goes out. So I boot my computer, get back into Cygwin, go back into my project's root. How do I sync it with Heroku again? If I type heroku ps or hero

Re: saving to two models from one class view

2014-01-09 Thread trojactory
Hi Brad, At the moment, two models do not have any relationship. I think you made an error in Line 3: created_by = models.ForeignKey(User, unique=True) I think you meant "Applicant" instead of User. Regards, Arun On Friday, January 10, 2014 3:13:42 AM UTC+5:30, Brad Rice wrote: > > I have