random
This commit is contained in:
parent
57fad37643
commit
0cf4c0512c
5 changed files with 20 additions and 17 deletions
|
@ -2,14 +2,16 @@
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
import random
|
import random
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
import oxweb.imdb
|
|
||||||
from oxlib import stripTags, findRe
|
from oxlib import stripTags, findRe
|
||||||
|
import oxweb.imdb
|
||||||
|
|
||||||
import models
|
import models
|
||||||
|
|
||||||
|
|
||||||
def debug(*msgs):
|
def debug(*msgs):
|
||||||
for m in msgs:
|
for m in msgs:
|
||||||
print m,
|
print m,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
import re
|
from datetime import datetime
|
||||||
import os.path
|
import os.path
|
||||||
import random
|
import random
|
||||||
from datetime import datetime
|
import re
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
@ -11,14 +11,15 @@ from django.contrib.auth.models import User
|
||||||
from django.core.files.base import ContentFile
|
from django.core.files.base import ContentFile
|
||||||
from django.utils import simplejson as json
|
from django.utils import simplejson as json
|
||||||
|
|
||||||
|
from oxdjango import fields
|
||||||
import oxlib
|
import oxlib
|
||||||
from oxlib import stripTags
|
from oxlib import stripTags
|
||||||
from oxlib.normalize import canonicalTitle, canonicalName
|
from oxlib.normalize import canonicalTitle, canonicalName
|
||||||
from oxdjango import fields
|
|
||||||
|
|
||||||
import utils
|
|
||||||
import managers
|
import managers
|
||||||
import load
|
import load
|
||||||
|
import utils
|
||||||
|
|
||||||
|
|
||||||
class MovieImdb(models.Model):
|
class MovieImdb(models.Model):
|
||||||
created = models.DateTimeField(auto_now_add=True)
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
|
@ -6,27 +6,29 @@ from datetime import datetime
|
||||||
from urllib2 import unquote
|
from urllib2 import unquote
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django.db.models import Q, Avg, Count
|
from django import forms
|
||||||
|
from django.core.paginator import Paginator
|
||||||
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.db.models import Q, Avg, Count
|
||||||
|
from django.http import HttpResponse
|
||||||
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
|
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.core.paginator import Paginator
|
|
||||||
from django import forms
|
|
||||||
from django.http import HttpResponse
|
|
||||||
from django.contrib.auth.decorators import login_required
|
|
||||||
try:
|
try:
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from django.utils import simplejson as json
|
from django.utils import simplejson as json
|
||||||
from oxdjango.shortcuts import render_to_json_response, get_object_or_404_json
|
|
||||||
from oxdjango.decorators import login_required_json
|
from oxdjango.decorators import login_required_json
|
||||||
|
from oxdjango.shortcuts import render_to_json_response, get_object_or_404_json
|
||||||
|
|
||||||
import models
|
import models
|
||||||
import utils
|
import utils
|
||||||
from daemon import send_bg_message
|
from daemon import send_bg_message
|
||||||
|
|
||||||
from oxuser.views import api_login, api_logout, api_register, api_recover, api_preferences
|
|
||||||
from oxuser.models import getUserJSON
|
from oxuser.models import getUserJSON
|
||||||
|
from oxuser.views import api_login, api_logout, api_register, api_recover, api_preferences
|
||||||
|
|
||||||
|
|
||||||
def api(request):
|
def api(request):
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
|
|
||||||
|
from django.contrib.auth.models import User
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.utils import simplejson as json
|
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.db.models import signals
|
from django.db.models import signals
|
||||||
from django.dispatch import dispatcher
|
from django.dispatch import dispatcher
|
||||||
|
from django.utils import simplejson as json
|
||||||
|
|
||||||
|
|
||||||
class UserProfile(models.Model):
|
class UserProfile(models.Model):
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
import uuid
|
import uuid
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
from django import forms
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.contrib.auth import authenticate, login, logout
|
from django.contrib.auth import authenticate, login, logout
|
||||||
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
|
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
|
||||||
from django.template import RequestContext, loader, Context
|
from django.template import RequestContext, loader, Context
|
||||||
from django.utils import simplejson as json
|
from django.utils import simplejson as json
|
||||||
from django import forms
|
|
||||||
|
|
||||||
from oxdjango.shortcuts import render_to_json_response
|
from oxdjango.shortcuts import render_to_json_response
|
||||||
from oxdjango.decorators import login_required_json
|
from oxdjango.decorators import login_required_json
|
||||||
|
|
Loading…
Reference in a new issue