Re: Calculations in Queries

2012-08-15 Thread Callum Bonnyman
ror, i've tried googling it but not had much luck so far On Thursday, 16 August 2012 00:59:39 UTC+1, Melvyn Sopacua wrote: > > On 15-8-2012 23:01, Callum Bonnyman wrote: > > > > > > I am creating a popular page for my app and for the most part this is > just >

Calculations in Queries

2012-08-15 Thread Callum Bonnyman
I am creating a popular page for my app and for the most part this is just to gain an understanding. The idea is to divide the number of views by the days old, now i don't know if this will be successful or even working but like I said its go get an idea of how queries work... My fields are

How to avoid "no such column" error when I add a new property to a model?

2012-01-11 Thread callum
I created an "Article" model with a few simple properties. I ran syncdb, and set up the Django admin site, and added "admin.site.register(Article)" in admin.py. Using the Django admin site, I created an article by filling in the form. I then went into models.py and added another property. I ran sy

How to make a single 'special' m2m relationship?

2012-01-09 Thread callum
ument to the definition for 'tags'. I don't really understand the error message. Am I approaching this the wrong way? If I was doing this manually with SQL, I would probably make a table especially for the m2m relationship, called "articles_tags", and this table would