Commits

Francisco Souza committed 2e122b4

Correção no arquivo de índices.

Comments (0)

Files changed (3)

 indexes:
 
-# AUTOGENERATED
-
-# This index.yaml is automatically updated whenever the dev_appserver
-# detects that a new type of query is run.  If you want to manage the
-# index.yaml file manually, remove the above marker line (the line
-# saying "# AUTOGENERATED").  If you want to manage some indexes
-# manually, move them above the marker line.  The index.yaml file is
-# automatically uploaded to the admin console when you next deploy
-# your application using appcfg.py.
+#AUTOGENERATED
 
 - kind: django_admin_log
   properties:
   - name: action_time
     direction: desc
 
-- kind: Projeto
+- kind: projetos_projeto
   properties:
+  - name: slug
   - name: titulo
-  - name: slug
+
+- kind: projetos_projeto
+  properties:
   - name: publish
-    direction: desc
+  - name: titulo

projetos/admin.py

         }
     form = ProjetoForm
     list_display = ('titulo', 'web_url', )
+    list_filter = ('publish', )
     search_field = ('titulo', 'descricao', )
 
 class ChicoFlatPageAdmin(FlatPageAdmin):

projetos/views.py

 from models import Projeto
 
 def lista(request):
-    projetos = Projeto.all().filter('publish = ', True).order('titulo',)
+#    projetos = Projeto.all().filter('publish =', True).order('titulo',)
+    query = Projeto.gql("WHERE publish = TRUE ORDER BY titulo ASC")
+    projetos = query.fetch(1000)
     return render_to_response('projetos/lista_projetos.html', locals(), RequestContext(request))
 
 def projeto(request, slug):