This commit is contained in:
j 2009-07-13 14:32:01 +02:00
commit dd5ebf0ed5
10 changed files with 99 additions and 30 deletions

View file

@ -1,3 +1,16 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import os.path
from django.db import models
from django.db.models import Q
from django.contrib.auth.models import User
from oxdata.lookup.models import MovieId
class Poster(models.Model):
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
movie_id = models.ForeignKey(MovieId, related_name='poster')
url = models.CharField(max_length=255)
# Create your models here.

6
poster/urls.py Normal file
View file

@ -0,0 +1,6 @@
from django.conf.urls.defaults import *
urlpatterns = patterns('oxdata.poster.views',
(r'^$', 'poster'),
)

View file

@ -1 +1,13 @@
# Create your views here.
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import os.path
from django.db import models
from django.db.models import Q
from django.contrib.auth.models import User
from oxdata.utils.shortcuts import render_to_json_response
def poster(request):
#FIXME: get MovieId from provided id and redirect to poster url