Created
November 17, 2011 13:51
-
-
Save santiagobasulto/1373179 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# METODOS PARA AJAX | |
def ajax_get_subcategorias(request, id_categoria): | |
try: | |
padre = Categoria.objects.get(id = id_categoria) | |
categorias = padre.getSubcategorias() | |
json = serializers.serialize('json', categorias) | |
return HttpResponse(json, content_type='application/javascript; charset=utf-8') | |
except: | |
return HttpResponseNotFound() | |
<<<<<<< local | |
@login_required | |
def ajax_get_publicaciones_por_estado(request, estado_publicacion): | |
======= | |
def ajax_get_mis_publicaciones_por_estado(request, estado_publicacion): | |
>>>>>>> other | |
activas = Publicacion.objects.filter(estado=estado_publicacion, creador=request.user) | |
json = serializers.serialize('json', activas) | |
return HttpResponse(json, content_type='application/javascript; charset=utf-8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment