rename
This commit is contained in:
parent
183c7fb497
commit
dd5ebf0ed5
10 changed files with 99 additions and 30 deletions
|
|
@ -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
6
poster/urls.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from django.conf.urls.defaults import *
|
||||
|
||||
urlpatterns = patterns('oxdata.poster.views',
|
||||
(r'^$', 'poster'),
|
||||
)
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue