Re: Sum total by date

2021-03-08 Thread Lorenzo Prodon
CODE NOT TESTED You can do this in the get_context_data method, in the view: from django.db.models import Sum chart_data = {} for date in Expense.objects.all().distinct('date').values_list('date', flat=True): chart_data[date] = Expense.objects.filter(date=date).aggregate(Sum('amount'))['total_

Session backend for production

2019-11-25 Thread Lorenzo Peña
database for multi-tenant application, so I am expecting over-average db traffic. Thanks in advance! Lorenzo -- 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

Re: Django Channels and multi-tenant will this be a world of hurt?

2019-01-15 Thread Lorenzo Peña
> > > Hi Filbert, everyone! django-tenant-schemas has a way to infer the tenant from the request, and you could apply the same logic to extend Channel's scope with the tenant. With the tenant on the scope you can incrementally add in-channels multi-tenant logic. Not sure if this helps as you m

interaction between two django app

2017-01-24 Thread Lorenzo Bernardi
Hello, I don't know what is the best approach for the communication between two django applications. We have a website using django and django-cms. We have another application, the "seminar" app for managing some informations like seminars, news, people profiles They have both their

template or javascript

2016-10-10 Thread Lorenzo Bernardi
Hello, I'm making a website with bootstrap and I use some menu items (in fact nav bars) and I was wondering what is the best practice to make a menu item highlighted when I am on the page connected with this menu item. I mean in bootstrap the nav bar has a to highlight the fact that I'm on

Re: Questions about session

2016-01-27 Thread Lorenzo Bernardi
Hello, If you wish to keep some data always visible specially i the base template, then why not make the base template a single page app and then through ajax lode other pages? I thought of using ajax but I'm not very familiar with it. But I didn't think of making the base page a single app

Re: Questions about session

2016-01-27 Thread Lorenzo Bernardi
Hello, I answered a very similar question to this a few days ago: https://groups.google.com/forum/#!msg/django-users/L3pUwDYs6jw/bSYVs81tEwAJ thanks for the link. I agree with you for the fact that updating sess

Questions about session

2016-01-26 Thread Lorenzo Bernardi
Hello, I'm writing an app which needs authentication and I was wondering if the information about the user should be put in request.session. My app deals with the access to certain equipments and every user has a different set of equipment it can sees. Should I put the list of equipment in

Re: Model to create forms

2015-01-09 Thread Lorenzo Bernardi
On 01/09/2015 10:39 AM, Timothy W. Cook wrote: I think you are looking for a way to provide an abstraction like this http://django-forms-builder.readthedocs.org/en/latest/ yes it looks like I'll have to do something like that. Or see if the data collected from the form can be put in a model. Th

Re: Model to create forms

2015-01-08 Thread Lorenzo Bernardi
Hello, this is what _relational_ databases are built for. if you have two tables, one for the description of the experiment (one record per experiment), and another for the statistics (one record per data sample, with a foreign key to the experiment record); then fetching the description of the

Re: Model to create forms

2015-01-08 Thread Lorenzo Bernardi
Hello, 1) there is no other approach (like creating a model on the fly, that is not writing in models.py. But it looks against the way django works) and any idea is welcomed. Generally I've found that creating a real model to store the data is easiest in the long run and usually involves les

Model to create forms

2015-01-05 Thread Lorenzo Bernardi
Hello All, I'm rather new to django and also web and database stuff and so I might not use the correct term. i need to write an application which is a log book for experiments. The purpose is to store information about various experiments on different experiment to keep a trace and compu

question about userprofile

2014-10-07 Thread Lorenzo Bernardi
Hello, I'd like to emphasize that it is probably a newbie question but I don't know what are the keyword I should use for googling. So any information would be helpful. I'm trying to add a userprofile to my django app. The idea is to use a sign-in system so that the user depending on who

Re: How to find list of blocking issues for django releases?

2014-05-23 Thread Lorenzo Peña
https://code.djangoproject.com/query?status=!closed&severity=Release%20blocker&group=component -- 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+unsub

[django-taggit] Recording additional tagging metadata with the admin

2012-02-02 Thread Lorenzo Franceschini
Hi, I have a question about ``django-taggit`` and the admin site. I have written a custom intermediate model [1] for storing additional tagging metadata, i.e. the user doing the tagging and when the tagging happen: class TaggedItem(GenericTaggedItemBase, TaggedItemBase): tagger = models.F

Re: djangoadvent.com is down ?

2011-08-04 Thread Lorenzo Franceschini
On 07/28/2011 04:55 PM, Lorenzo Franceschini wrote: Hi, some time ago I bookmarked some posts on http://djangoadvent.com that seemed very interesting to me; yesterday I wanted to read some of them, but I wasn't able to retrieve them. The website was unreacheable, and I was able to fo

djangoadvent.com is down ?

2011-07-28 Thread Lorenzo Franceschini
Hi, some time ago I bookmarked some posts on http://djangoadvent.com that seemed very interesting to me; yesterday I wanted to read some of them, but I wasn't able to retrieve them. The website was unreacheable, and I was able to found a cached version of only a few of them. Do you know anyt

Re: What do you use to build facebook applications with django?

2011-03-16 Thread OrazioPirataDelloSpazio (Lorenzo)
. Now I am using only javascript with fb official graph api the works well. Lorenzo Il 16/03/11 15:46, mongoose ha scritto: > Hi, > > I've been struggling so much trying to get a Facebook app to work on > the Django framework. Mostly battling with pyFacebook. For some > particu

Re: curious about model classes

2011-03-03 Thread Lorenzo Franceschini
e f.foobar; but when I try to save the instance to the db f.save() Django fails with an obscure (for me) error: ------ File "/home/lorenzo/.virtualenvs/virgo/lib/python2.6/site-packages/django/db/models/base.py", line 458, in sa

Dynamic nested forms

2011-01-15 Thread OrazioPirataDelloSpazio (Lorenzo)
, entry and tags), but code looks like a mess. Is there some easier way, as there is for Rails [1], for this quite common task? Lorenzo [1]http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes signature.asc Description: OpenPGP digital signature

Django book

2010-11-28 Thread Lorenzo Franceschini
I'm new on this group, so first of all... Hi to everybody! I'm a web developer, and I need to approach Django for a software project, so I would like to ask you an advice about the best book to read (in your opinion) in order to learn using this framework, given that: * I already have some ex

Re: djangoAMF: django and flash

2008-05-05 Thread Lorenzo
Thanks so much!! It did the trick! Lorenzo sserrano ha scritto: > Hi > If you are using a 64bit arch, there is a bug with a write function. > You can find the reported bug and a patch here: > http://sourceforge.jp/tracker/?atid=9591&group_id=2585&func=browse > &g

djangoAMF: django and flash

2008-05-03 Thread Lorenzo
essage_txt I find a strange number like "4.432432e-123" that seems somehow related to the string (if I change string the number change! otherwise it remain the same). Someone has experience with this kind of problem? Thanks, Lorenzo --~--~-~--~~~---~--~---

Errors in model validation

2006-09-25 Thread Lorenzo Bolognini
not import name Person liger.time: cannot import name Person liger.departments: cannot import name Department 4 errors found. Thanks, Lorenzo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: ReferenceError

2006-09-03 Thread Lorenzo
Andy Dustman wrote: > What versions of MySQL and MySQLdb/MySQL-python are you using? mysql Ver 14.12 Distrib 5.0.22 mysql-python 1.2.1_p2 So it could be caused by mysql/mysql-py, not django? Thanks, Lorenzo --~--~-~--~~~---~--~~ You received this mess

ReferenceError

2006-09-02 Thread Lorenzo
tion). Is there any patch to solve this issue (what about this one http://code.djangoproject.com/changeset/3379) ? May be switching to django0.95? Thanks, lorenzo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &qu