Base template doesnt get the context

2010-04-19 Thread Thales
Good evening, I am learning django with the django book. I decided to develop a simple news system just to practice, The base layout should show all the news categories in a block, and each other page should modify another block. Here is the base: Titulo {% block categories %} CATEGORIES {

Re: Base template doesnt get the context

2010-04-20 Thread Thales
e template to the other template, but it doesnt seem to me like an elegant solution. On 19 abr, 23:46, Adam Patterson wrote: > What does the other template look like? Are you overridding the > categories block? > > > > On Tue, Apr 20, 2010 at 5:17 AM, Thales wrote: > >

Re: Base template doesnt get the context

2010-04-20 Thread Thales
of categories. > > > > On Tue, Apr 20, 2010 at 9:04 PM, Thales wrote: > > The other templates doesnt override the categories block... Its just > > like: > > {% extends "base.html" %} > > > {% block content %} > > some content here > &g

Distinct Field

2010-05-03 Thread Thales
Hi everybody, I have a model called "Project" with the field "year". I have something about 1200 rows all of them with the year value "2010". But, I'll start adding projects for other years. I want to show the years that has projects, now it should just be: 2010 I am trying to do this: p = Proje

Re: Distinct Field

2010-05-03 Thread Thales
ote: > To use distinct in this context is not a good idea. > > Better use aggregate and count the years. > > http://docs.djangoproject.com/en/dev/topics/db/aggregation/#generatin... > > On May 3, 12:27 pm, Thales wrote: > > > > > Hi everybody, > > > I have

Re: Distinct Field

2010-05-03 Thread Thales
Thank you very much. It worked fine. On 3 maio, 07:50, "ge...@aquarianhouse.com" wrote: > Did you try: > > Projct.objects.all().values('year').annotate(count=Count('year')) > > On May 3, 12:45 pm, Thales wrote: > > > > > I t

Admin custom filters

2010-05-03 Thread Thales
r selected) and the avaiable options (maybe I dont want to show all the years there). I am sorry it sounds very easy, but I couldn't find inside the documentation how can I do it. Thanks Thales -- You received this message because you are subscribed to the Google Groups "Django user

Custom filterspec

2010-05-24 Thread Thales
Good afternoon, I am trying to make this snippet work: http://djangosnippets.org/snippets/1051/ My files are like this: ## admin.py from django.contrib import admin from models import Pessoa import filterspec class AdminPessoa(admin.ModelAdmin): list_filter = ['name'] pass admin.sit

Django is not creating all the tables

2010-08-06 Thread Thales
Hi everybody, I am working in a project using django, which has about 20 apps's. There is no tests written and It was decided that tests would have to be written for the whole project. To start testing, I runned: "python manage.py test" And a database was created, tables and stuff... But one tab

Re: Django is not creating all the tables

2010-08-06 Thread Thales
It seems to be a django bug. I changed the apps order in INSTALED_APPS in settings.py and everything started to work correctly. On 6 ago, 11:55, Thales wrote: > Hi everybody, > > I am working in a project using django, which has about 20 apps's. > There is no tests written a