您好我有如下一个Django模型过滤器在Django模型(DATABSE表)中的所有对象:如何获得基于使用AngularJs
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Journal(models.Model):
name = models.CharField(max_length=120)
created_by = models.ForeignKey(User, related_name='+')
date_created = models.DateTimeField(auto_now=False, auto_now_add=True)
date_modified = models.DateTimeField(auto_now=True, auto_now_add=False)
def __unicode__(self):
return (self.name)
下面我angularJs和:
var app = angular.module("journalApp", []);
app.controller("myCtrl", function($scope) {
});
我如何在AngularJs中进行查询,以便基于登录的用户从我的Django模型中获取所有对象?任何想法的家伙?提前致谢。