models.py question for setting up multiple sql entries for 1 master sql entry

2014-11-23 Thread Bovine Devine
Hello, I am creating hardware database webapp in django and I have a question for how to setup my models.py to ensure I get the data entered into the mysql db that I have setup. I have my models.py setup this way: from django.db import models from django.utils import timezone # Create your

Re: Obtaining content from Git

2014-11-23 Thread Russell Keith-Magee
On Mon, Nov 24, 2014 at 1:45 PM, martin f krafft wrote: > also sprach Russell Keith-Magee [2014-11-24 > 00:42 +0100]: > > The problem is that there isn't one. There's several :-) > > > > I'm aware of at least 3: > > > >

Re: Obtaining content from Git

2014-11-23 Thread martin f krafft
also sprach Russell Keith-Magee [2014-11-24 00:42 +0100]: > The problem is that there isn't one. There's several :-) > > I'm aware of at least 3: > > https://pypi.python.org/pypi/GitPython/0.3.2.1 > https://pypi.python.org/pypi/pygit2 >

Re: Using Sum() for a models method inside a Query

2014-11-23 Thread Ethan Blackburn
related: https://groups.google.com/forum/#!topic/django-users/s9qgXC4TNrA Short answer: you can't. A raw query would be your best bet(i.e. "SELECT SUM(a + b) AS sum FROM app_X") On Sunday, November 23, 2014 4:42:48 PM UTC-6, Jorge Andrés Vergara Ebratt wrote: > > Hello everyone, > > Well, the

Auto-refresh the webpage in the  browser, after modify and save

2014-11-23 Thread Jose Regalado
Greetings... I need auto-refresh the webpage in the browser, after modify and save any file of my project, views: , css, jss, .*py, etc. I have 2 monitors. Exist some module or similar for django?, I am using 1.7 1.8-dev Thanks -- You received this message because you are subscribed to

Re: Using Sum() for a models method inside a Query

2014-11-23 Thread Vijay Khemlani
What do you mean by the sum or average of the method? As in the sum or average of the method applied to a list of objects "X"? On Sun, Nov 23, 2014 at 7:41 PM, Jorge Andrés Vergara Ebratt < javebr...@gmail.com> wrote: > Hello everyone, > > Well, the tittle says it all: > > I have a model X > >

Re: Obtaining content from Git

2014-11-23 Thread Russell Keith-Magee
On Sun, Nov 23, 2014 at 5:28 AM, martin f krafft wrote: > Hello, > > we have a Django project with a few pages that come from Git. > Currently, Apache rewrite rules serve those files statically (and > they make use of the same template/CSS as Django does, so the user > does

Using Sum() for a models method inside a Query

2014-11-23 Thread Jorge Andrés Vergara Ebratt
Hello everyone, Well, the tittle says it all: I have a model X class X(models.Model) a = models.IntegerField() b = models.IntegerField() def getC(self): return a + b So, when I'm inside a template I can call {{x.getC}} and it gets the method for the current instance it's in, but