您好我有如下一個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模型中獲取所有對象?任何想法的傢伙?提前致謝。