diff --git a/.gitignore b/.gitignore
index ed297de..f4d81aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,8 +19,12 @@ etc/*
apps/*
cloth/lib/*
static/
+
+static/admin/*
+static/css/*
+static/js/*
+static/media/
node_modules/
dump/
-ltmo/media
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..656545c
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsLinters/jshint.xml b/.idea/jsLinters/jshint.xml
new file mode 100644
index 0000000..763153c
--- /dev/null
+++ b/.idea/jsLinters/jshint.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/js.xml b/.idea/libraries/js.xml
new file mode 100644
index 0000000..8ddfdf9
--- /dev/null
+++ b/.idea/libraries/js.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..89f6201
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,95 @@
+module.exports = function(grunt) {
+ 'use strict';
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ sass: {
+ options: {
+ includePaths: [
+ './node_modules/bootstrap-sass/assets/stylesheets',
+ './node_modules/font-awesome/scss/'
+ ]
+ },
+ dist: {
+ options: {
+ outputStyle: 'compressed'
+ },
+ files: {
+ './static/css/style.css': './cloth/scss/style.scss'
+ }
+ }
+ },
+ copy: {
+ main: {
+ files: [
+ {
+ flatten:true,
+ cwd: './node_modules/font-awesome/fonts/',
+ src: ['*.*'],
+ dest: './static/fonts/',
+ expand: true
+ },
+ {
+ flatten:true,
+ cwd: './cloth/img/',
+ src: ['*.png', '*.jpg', '*.gif'],
+ dest: './static/img/',
+ expand: true
+ },
+ ]
+ }
+ },
+ webpack: {
+ main: {
+ entry: {
+ main: "./cloth/main.js",
+ },
+ output: {
+ path: "./static/js",
+ publicPath: "/static/js",
+ filename: "main.js",
+
+ },
+ module: {
+ loaders: [
+ { test: /\.jsx?$/, exclude: /node_modules/, loader: "babel" }
+ ]
+ },
+ },
+ },
+ watch: {
+ scss: {
+ files: [
+ //watched files
+ './cloth/*.scss',
+ ],
+ tasks: ['sass'],
+ },
+ js : {
+ files: [
+ './cloth/**/*.jsx',
+ './cloth/**/*.js',
+ './cloth/*.js',
+ ],
+ tasks: ['copy:main', 'webpack:main'],
+ },
+ config: {
+ files: [
+ 'Gruntfile.js',
+ 'bower.json',
+ 'package.json'
+ ],
+ tasks: ['copy', 'sass', 'webpack'],
+ }
+ }
+ });
+ // Plugin loading
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-webpack');
+ grunt.loadNpmTasks('grunt-sass');
+
+ // Task definition
+ grunt.registerTask('build', ['copy', 'sass', 'webpack']);
+ grunt.registerTask('default', ['build', 'watch']);
+
+};
\ No newline at end of file
diff --git a/MANIFEST.in b/MANIFEST.in
index a188dc5..9bb9c25 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,4 @@
+include requirements.txt
recursive-include ltmo/static/ *
recursive-include ltmo/templates/ *
exclude ltmo/local_settings.py
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..79dcb5e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,49 @@
+¿Qué es lo que observa?
+=============
+
+Este repositorio contiene tanto el código del sitio.
+
+Asumimos una máquina en algún linux corriendo alguna versión reciente de python.
+Debería andar en cualquier lado que python sea instalable.
+
+El sitio está hecho en [django](http://djangoproject.com) y tiene muy pocas dependencias, la mejor manera de tener una instancia corriendo es:
+
+### para desarrollo:
+
+ $ virtualenv ltmo
+ $ source ltmo/bin/activate
+ (ltmo)$ cd /path/to/clone
+ (ltmo)$ pip install -r requirements.txt
+ (ltmo)$ python setup.py develop
+ (ltmo)$ ltmo migrate
+ (ltmo)$ ltmo runserver
+
+Una instancia queda corriendo en http://localhost:8000.
+
+### frontend
+
+Usamos un toolchain que consta de [npm](http://npm.io), [grunt](http://grunt.io), [bower](http://bower.io). Se instala más o menos así:
+
+ $ cd /path/to/clone
+ $ npm install # descarga dependencias de desarrollo.
+ $ bower install # descarga bibliotecas para el cliente.
+ $ grunt # observa cambios en una serie de archivos y ejecuta acciones.
+
+Esto resulta en una carpeta `static` en la raíz de tu copia local.
+
+### para producción:
+
+ $ pip install ltmo # sudo si es necesario.
+
+Vea [[notas de instalación|Deployment]] para saber como instalarlo en un servidor en particular.
+
+
+
+## ¿Y qué pasa con el resto?
+
+Todo lo que envíes con spill se manda a ltmo.com.ar ahí vamos a ir agregando cosas a medida que tengamos más tiempo para perder aceite.
+
+No sabemos muy bien de que se trata todo esto pero somos lo que hacemos
+
+
+[](https://bitdeli.com/free "Bitdeli Badge")
diff --git a/README.mkd b/README.mkd
deleted file mode 100644
index 036f24d..0000000
--- a/README.mkd
+++ /dev/null
@@ -1,33 +0,0 @@
-¿Qué es lo que observa?
-=============
-Nunca hay suficiente redundancia para garantizar la continuidad de la información.
-
-Este es un experimento, una herramienta para evitar perder cosas que en algún momento nos resultaron interesantes.
-Hay un [script de linea de comandos](http://github.com/etnalubma/spill) con el que envías cosas a algo que se parece a un blog y está hosteado en http://ltmo.com.ar/
-
-Este repositorio contiene tanto el código del sitio.
-
-El sitio está hecho en [django](http://djangoproject.com) y tiene muy pocas dependencias, la mejor manera de tener una instancia corriendo es con pip
-
- $ pip install -r requirements.txt -E ltmo_venv
-
-Si no tenés pip y virtualenv (por qué no???):
-
- $ sudo easy_install pip
- $ sudo easy_install virtualenv
-
-Ahora sólo debés sincronizar la base de datos y correr el sitio:
-
- $ ./manage.py syncdb
- $ ./manage.py runserver
-
-¿Y qué pasa con el resto?
----------------
-
-Todo lo que envíes con spill se manda a ltmo.com.ar ahí vamos a ir agregando cosas a medida que tengamos más tiempo para perder aceite.
-
-No sabemos muy bien de que se trata todo esto pero somos lo que hacemos
-
-
-[](https://bitdeli.com/free "Bitdeli Badge")
-
diff --git a/banners/__init__.py b/banners/__init__.py
new file mode 100644
index 0000000..eff2b26
--- /dev/null
+++ b/banners/__init__.py
@@ -0,0 +1 @@
+default_app_config = 'banners.apps.BannersAppConfig'
\ No newline at end of file
diff --git a/banners/admin.py b/banners/admin.py
new file mode 100644
index 0000000..fd473f9
--- /dev/null
+++ b/banners/admin.py
@@ -0,0 +1,5 @@
+from django.contrib import admin
+from . import models
+# Add your admin site registrations here, eg.
+# from banners.models import Author
+admin.site.register(models.Banner)
diff --git a/banners/apps.py b/banners/apps.py
new file mode 100644
index 0000000..000ecae
--- /dev/null
+++ b/banners/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class BannersAppConfig(AppConfig):
+ name = 'banners'
+ verbose_name = 'Banner'
diff --git a/banners/migrations/0001_initial.py b/banners/migrations/0001_initial.py
new file mode 100644
index 0000000..c4de856
--- /dev/null
+++ b/banners/migrations/0001_initial.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import taggit.managers
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('taggit', '0002_auto_20141128_0837'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Banner',
+ fields=[
+ ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
+ ('code', models.TextField(blank=True, null=True, max_length=1024)),
+ ('clicks', models.PositiveIntegerField(blank=True, default=0)),
+ ('views', models.PositiveIntegerField(blank=True, default=0)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='TemplateBanner',
+ fields=[
+ ('banner_ptr', models.OneToOneField(parent_link=True, to='banners.Banner', auto_created=True, serialize=False, primary_key=True)),
+ ('image', models.ImageField(upload_to='banners', null=True)),
+ ('url', models.URLField(blank=True)),
+ ('template', models.CharField(default='banner.html', max_length=70)),
+ ],
+ bases=('banners.banner',),
+ ),
+ migrations.AddField(
+ model_name='banner',
+ name='slot',
+ field=taggit.managers.TaggableManager(verbose_name='Tags', to='taggit.Tag', through='taggit.TaggedItem', help_text='A comma-separated list of tags.'),
+ ),
+ ]
diff --git a/ltmo/management/__init__.py b/banners/migrations/__init__.py
similarity index 100%
rename from ltmo/management/__init__.py
rename to banners/migrations/__init__.py
diff --git a/banners/models.py b/banners/models.py
new file mode 100644
index 0000000..ac0f1fb
--- /dev/null
+++ b/banners/models.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+
+from django.db import models
+from taggit.managers import TaggableManager
+from django.template.loader import render_to_string
+from django.template.defaultfilters import slugify
+from django.template import Context, Template
+
+
+class Banner(models.Model):
+ code = models.TextField(max_length=1024, blank=True, null=True)
+ slot = TaggableManager()
+ clicks = models.PositiveIntegerField(default=0, blank=True)
+ views = models.PositiveIntegerField(default=0, blank=True)
+
+ def __unicode__(self):
+ return "Banner #%s on %s" % (self.pk, self.slot)
+
+ def render_code(self):
+ template = Template(self.code)
+ return template.render(Context({'object': self, }))
+
+
+class TemplateBanner(Banner):
+ image = models.ImageField(upload_to='banners', null=True)
+ url = models.URLField(blank=True)
+ template = models.CharField(max_length=70, default='banner.html')
+
+ def __unicode__(self):
+ return "%s" % (slugify(self.pk, self.slot),)
+
+ def show_in_list(self):
+ self.views += 1
+ return render_to_string(
+ self.template,
+ {
+ 'object': self,
+ }
+ )
diff --git a/ltmo/management/commands/__init__.py b/banners/templates/__init__.py
similarity index 100%
rename from ltmo/management/commands/__init__.py
rename to banners/templates/__init__.py
diff --git a/ltmo/templates/banner.html b/banners/templates/banner.html
similarity index 100%
rename from ltmo/templates/banner.html
rename to banners/templates/banner.html
diff --git a/ltmo/templates/single.html b/banners/templates/single.html
similarity index 100%
rename from ltmo/templates/single.html
rename to banners/templates/single.html
diff --git a/ltmo/templates/slot.html b/banners/templates/slot.html
similarity index 61%
rename from ltmo/templates/slot.html
rename to banners/templates/slot.html
index 8ec1f50..ea3a300 100644
--- a/ltmo/templates/slot.html
+++ b/banners/templates/slot.html
@@ -1,4 +1,3 @@
{% for banner in banners %}
-{{banner.code|safe}}
+{{banner.code|safe}}
{% endfor %}
-
diff --git a/ltmo/migrations/__init__.py b/banners/templatetags/__init__.py
similarity index 100%
rename from ltmo/migrations/__init__.py
rename to banners/templatetags/__init__.py
diff --git a/banners/templatetags/banner_tags.py b/banners/templatetags/banner_tags.py
new file mode 100644
index 0000000..346d2e9
--- /dev/null
+++ b/banners/templatetags/banner_tags.py
@@ -0,0 +1,22 @@
+from django import template
+from banners.models import Banner
+from random import choice
+register = template.Library()
+
+
+@register.inclusion_tag('single.html')
+def pop_slot(slot):
+ banner = None
+ banners = Banner.objects.filter(slot__name=slot)
+ if banners:
+ banner = choice(banners)
+ return {'banner': banner}
+
+
+@register.inclusion_tag('slot.html')
+def lookup_banners(slot):
+ try:
+ banners = Banner.objects.filter(slot__name__icontains=slot)
+ except Banner.DoesNotExists:
+ banners = None
+ return {'banners': banners}
diff --git a/banners/views.py b/banners/views.py
new file mode 100644
index 0000000..60f00ef
--- /dev/null
+++ b/banners/views.py
@@ -0,0 +1 @@
+# Create your views here.
diff --git a/ltmo/sass/_pygments.scss b/cloth/_pygments.scss
similarity index 100%
rename from ltmo/sass/_pygments.scss
rename to cloth/_pygments.scss
diff --git a/ltmo/sass/_solarized.scss b/cloth/_solarized.scss
similarity index 100%
rename from ltmo/sass/_solarized.scss
rename to cloth/_solarized.scss
diff --git a/ltmo/sass/_base.scss b/cloth/_variables.scss
similarity index 83%
rename from ltmo/sass/_base.scss
rename to cloth/_variables.scss
index b687aaa..0a1116c 100644
--- a/ltmo/sass/_base.scss
+++ b/cloth/_variables.scss
@@ -1,28 +1,13 @@
-$base03: #010204;
-$base02: #4D2219;
-$base01: #586e75;
-$base00: #657b83;
-$base0: #AFDE9C;
-$base1: #E8F7EE;
-$base2: #eee8d5;
-$base3: #fdf6e3;
-$yellow: #b58900;
-$orange: #cb4b16;
-$red: #dc322f;
-$magenta: #d33682;
-$violet: #6c71c4;
-$blue: #268bd2;
-$cyan: #2aa198;
-$green: #859900;
-$fg_color: $blue;
-
+@import 'bootstrap';
+@import 'font-awesome';
+@import 'pygments';
@mixin transition ($time) {
-moz-transition: all $time;
-webkit-transition: all $time;
transition: all $time;
}
@mixin gradient($color, $direction:top) {
- background-image: -webkit-linear-gradient($direction, $color, darken($color, 10%));
+ background-image: -webkit-linear-gradient($direction, $color, darken($color, 10%));
background-image: -moz-linear-gradient($direction, $color, darken($color, 10%));
background-image: -ms-linear-gradient($direction, $color, darken($color, 10%));
background-image: -o-linear-gradient($direction, $color, darken($color, 10%));
@@ -38,9 +23,9 @@ $fg_color: $blue;
text-shadow: 0 1px 1px #333;
margin:0 0.3em;
color: $fg;
-
+
&:active {
- @include transition(0.1s);
+ @include transition(0.1s);
@include gradient($bg, 'bottom');
}
&:hover{
diff --git a/cloth/main.js b/cloth/main.js
new file mode 100644
index 0000000..901f842
--- /dev/null
+++ b/cloth/main.js
@@ -0,0 +1,66 @@
+var $ = require('jquery'),
+ utils = require('./utils');
+
+$(function () {
+ 'use strict';
+ var hash = window.location.hash;
+ if (hash) {
+ $(window).scrollTop($(hash).offset().top - 55);
+ }
+
+ $('.ui-autocomplete-input').on('autocompleteopen', function () {
+ var autocomplete = $(this).data('autocomplete'),
+ menu = autocomplete.menu;
+ menu.activate($.Event({ type: 'mouseenter' }), menu.element.children().first());
+ });
+ $('#id_tags').on('keydown', function (event) {
+ // don't navigate away from the field on tab when selecting an item
+ if (event.keyCode === $.ui.keyCode.TAB &&
+ $(this).data('autocomplete').menu.active) {
+ event.preventDefault();
+ }
+ }).autocomplete({
+ source: function (request, response) {
+ $.getJSON('/tags/', {
+ tag_name: utils.extractLast(request.term)
+ }, response);
+ },
+ search: function () {
+ var term = utils.extractLast(this.value);
+ if (term.length < 2) {
+ return false;
+ }
+ },
+ focus: function () {
+ return false;
+ },
+ select: function (event, ui) {
+ event.preventDefault();
+ var terms = split(this.value);
+ terms.pop();
+ terms.push(ui.item.value);
+ terms.push('');
+ this.value = terms.join('', '');
+ }
+ });
+ $('.control').on('click', function (event) {
+ event.preventDefault();
+ var target = $(this).attr('href');
+ $(target).toggle('blind', 300);
+ if (target === '#leak-form') {
+ window.setTimeout(function () {
+ $('#id_description').focus();
+ $('#leak-form').bind('keydown', function (event) {
+ if (event.keyCode === $.ui.keyCode.ESCAPE) {
+ $('#leak-form').hide('blind', 500)
+ .unbind('keydown');
+ }
+ });
+ }, 400);
+ }
+ });
+ utils.setLayout();
+ window.setTimeout(function () {
+ $('#messages .control').click();
+ }, 1000);
+});
diff --git a/cloth/style.scss b/cloth/style.scss
new file mode 100644
index 0000000..878d937
--- /dev/null
+++ b/cloth/style.scss
@@ -0,0 +1,2 @@
+@import 'variables';
+
diff --git a/cloth/utils.js b/cloth/utils.js
new file mode 100644
index 0000000..d1cef03
--- /dev/null
+++ b/cloth/utils.js
@@ -0,0 +1,71 @@
+function viewport() {
+ var e = window,
+ a = 'inner';
+ if (!('innerWidth' in window)) {
+ a = 'client';
+ e = document.documentElement || document.body;
+ }
+ return { width : e[a + 'Width'], height : e[a + 'Height']};
+}
+
+function setLayout() {
+ var vp = viewport(),
+ padding, visible_height, visible_width,
+ main_img, old_img_width, new_img_width, width_delta;
+
+ padding = $('header').height() * 7;
+ visible_height = vp.height - padding;
+ visible_width = $('#main article').width();
+ main_img = $('article img')[0];
+ if (main_img) {
+ fit(main_img, false, 15);
+ }
+}
+function split(val) {
+ return val.split(/,\s*/);
+}
+function extractLast(term) {
+ return split(term).pop();
+}
+
+
+function fit(selector, to, padding){
+ var visible_height, visible_width,
+ old_height, old_width,
+ delta, landscape;
+ padding = padding || 0;
+ if (to) {
+ visible_height = $(to).height() - padding;
+ visible_width = $(to).width() - padding;
+ } else {
+ var vp = viewport();
+ visible_height = vp.height - padding;
+ visible_width = vp.width - padding;
+
+ }
+ $(selector).each(function() {
+ var $el = $(this);
+ old_width = $el.width();
+ old_height = $el.height();
+ landscape = old_width > old_height;
+ if (landscape) {
+ $el.css({
+ width: Math.floor(visible_height / old_height * old_width),
+ height: 'auto'
+ });
+ } else {
+ $el.css({
+ height: visible_height,
+ width: 'auto'
+ });
+ }
+ /* delta = (visible_width - $el.width())/2;
+ $(this).css('margin-left', delta); */
+ });
+
+}
+
+module.exports.fit = fit;
+module.exports.viewport = viewport;
+module.exports.setLayout = setLayout;
+module.exports.extractLast = extractLast;
\ No newline at end of file
diff --git a/developer_requirements.txt b/developer_requirements.txt
new file mode 100644
index 0000000..e903ce8
--- /dev/null
+++ b/developer_requirements.txt
@@ -0,0 +1,3 @@
+-r requirements.txt
+ipdb==0.8
+django-debug-toolbar
\ No newline at end of file
diff --git a/leaks/__init__.py b/leaks/__init__.py
new file mode 100644
index 0000000..8a066ef
--- /dev/null
+++ b/leaks/__init__.py
@@ -0,0 +1 @@
+default_app_config = 'leaks.apps.LeakAppConfig'
diff --git a/leaks/admin.py b/leaks/admin.py
new file mode 100644
index 0000000..d22e986
--- /dev/null
+++ b/leaks/admin.py
@@ -0,0 +1,8 @@
+from django.contrib import admin
+from leaks.models import Leak
+
+class LeakAdmin(admin.ModelAdmin):
+ list_display = ('__unicode__', 'tags', 'author', 'created')
+ list_filter = ('author', 'created')
+
+admin.site.register(Leak, LeakAdmin)
diff --git a/leaks/apps.py b/leaks/apps.py
new file mode 100644
index 0000000..cd50b99
--- /dev/null
+++ b/leaks/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class LeakAppConfig(AppConfig):
+ name = 'leaks'
+ verbose_name = 'Oil Leaks'
diff --git a/ltmo/feeds.py b/leaks/feeds.py
similarity index 94%
rename from ltmo/feeds.py
rename to leaks/feeds.py
index 71118b2..94e6e92 100644
--- a/ltmo/feeds.py
+++ b/leaks/feeds.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.contrib.syndication.views import Feed
-from ltmo.models import Leak
+from leaks.models import Leak
class LeakFeed(Feed):
title = "Recientemente derramado"
diff --git a/ltmo/forms.py b/leaks/forms.py
similarity index 82%
rename from ltmo/forms.py
rename to leaks/forms.py
index 301f030..20cb719 100644
--- a/ltmo/forms.py
+++ b/leaks/forms.py
@@ -1,33 +1,29 @@
from django import forms
-from tagging.forms import TagField
-
-from ltmo.models import Leak
from django.contrib.auth.models import User
+from leaks.models import Leak
+
class LeakForm(forms.ModelForm):
- tags = TagField(required=True)
author = forms.CharField(widget=forms.HiddenInput, required=True)
class Meta:
model = Leak
exclude = ['rendered','metadata']
-from django import forms
-
class RegisterForm(forms.Form):
-
+ #XXX: Should not be here.
honeypot = forms.CharField(widget=forms.HiddenInput, required=False)
username = forms.SlugField()
email = forms.EmailField()
-
-
+
+
def clean_username(self):
data = self.cleaned_data['username']
try:
user = User.objects.get(username=data)
except User.DoesNotExist:
user = None
-
+
if user is not None:
raise forms.ValidationError("El usuario ya existe")
diff --git a/ltmo/templatetags/__init__.py b/leaks/management/__init__.py
similarity index 100%
rename from ltmo/templatetags/__init__.py
rename to leaks/management/__init__.py
diff --git a/leaks/management/commands/__init__.py b/leaks/management/commands/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/ltmo/management/commands/update.py b/leaks/management/commands/update.py
similarity index 100%
rename from ltmo/management/commands/update.py
rename to leaks/management/commands/update.py
diff --git a/ltmo/management/commands/updateleaks.py b/leaks/management/commands/updateleaks.py
similarity index 83%
rename from ltmo/management/commands/updateleaks.py
rename to leaks/management/commands/updateleaks.py
index 74c8a1a..4d6d9a9 100644
--- a/ltmo/management/commands/updateleaks.py
+++ b/leaks/management/commands/updateleaks.py
@@ -6,10 +6,10 @@ class Command(BaseCommand):
def handle(self, *args, **options):
for leak in Leak.objects.all():
-
+
try:
leak.save()
except Exception as e:
self.stdout.write(e.message+'\n')
else:
- self.stdout.write('Saving leak %s \n' %leak.id)
\ No newline at end of file
+ self.stdout.write('Saving leak %s \n' %leak.id)
\ No newline at end of file
diff --git a/leaks/management/management/__init__.py b/leaks/management/management/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/leaks/management/management/commands/__init__.py b/leaks/management/management/commands/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/leaks/management/management/commands/update.py b/leaks/management/management/commands/update.py
new file mode 100644
index 0000000..3cff3af
--- /dev/null
+++ b/leaks/management/management/commands/update.py
@@ -0,0 +1,13 @@
+from django.core.management.base import BaseCommand, CommandError
+from ltmo.models import Leak
+
+class Command(BaseCommand):
+ """docstring for Command"""
+ def handle(self, *args, **kwargs):
+ leaks = Leak.objects.all()
+ for l in leaks:
+ self.stderr.write("Updating %s" % l.pk)
+ try:
+ l.save()
+ except (Exception, ) as e:
+ self.stderr.write('%s' %e)
diff --git a/leaks/management/management/commands/updateleaks.py b/leaks/management/management/commands/updateleaks.py
new file mode 100644
index 0000000..4d6d9a9
--- /dev/null
+++ b/leaks/management/management/commands/updateleaks.py
@@ -0,0 +1,15 @@
+from django.core.management.base import BaseCommand
+from ltmo.models import Leak
+
+class Command(BaseCommand):
+ help = 'Updates leaks saving every leak available.'
+
+ def handle(self, *args, **options):
+ for leak in Leak.objects.all():
+
+ try:
+ leak.save()
+ except Exception as e:
+ self.stdout.write(e.message+'\n')
+ else:
+ self.stdout.write('Saving leak %s \n' %leak.id)
\ No newline at end of file
diff --git a/ltmo/mdx_urlize.py b/leaks/mdx_urlize.py
similarity index 63%
rename from ltmo/mdx_urlize.py
rename to leaks/mdx_urlize.py
index c01f5eb..940bd1a 100644
--- a/ltmo/mdx_urlize.py
+++ b/leaks/mdx_urlize.py
@@ -3,47 +3,12 @@
Inspired by Django's urlize function.
Positive examples:
-
->>> import markdown
->>> md = markdown.Markdown(extensions=['urlize'])
-
->>> md.convert('http://example.com/')
-u'
http://example.com/
'
-
->>> md.convert('go to http://example.com')
-u'go to http://example.com
'
-
->>> md.convert('example.com')
-u'example.com
'
-
->>> md.convert('example.net')
-u'example.net
'
-
->>> md.convert('www.example.us')
-u'www.example.us
'
-
->>> md.convert('(www.example.us/path/?name=val)')
-u'(www.example.us/path/?name=val)
'
-
->>> md.convert('go to now!')
-u'go to http://example.com now!
'
-
->>> md.convert('http://example.com/abc.png')
-u'
'
-
-Negative examples:
-
->>> md.convert('del.icio.us')
-u'del.icio.us
'
-
"""
import markdown
import urllib
import os
-from StringIO import StringIO
from hashlib import sha1
-from PIL import Image
from django.conf import settings
from markdown.util import etree, AtomicString
@@ -58,8 +23,6 @@
])
def process_image(image_url):
-
-
file_type = guess_type(image_url)
ext = file_type[0].split('/')[1]
image_name = '.'.join((sha1(image_url).hexdigest()[:6], ext))
@@ -68,19 +31,19 @@ def process_image(image_url):
if not os.path.exists(image_path):
from ipdb import set_trace; set_trace()
urllib.urlretrieve(image_url, image_path)
-
+
return '/'.join((settings.UPLOAD_URL, image_name))
class UrlizePattern(markdown.inlinepatterns.Pattern):
""" Return a link Element given an autolink (`http://example/com`). """
def handleMatch(self, m):
url = m.group(2)
-
+
if url.startswith('<'):
url = url[1:-1]
-
+
text = url
-
+
if not url.split('://')[0] in ('http','https','ftp'):
if '@' in url and not '/' in url:
url = 'mailto:' + url
@@ -101,11 +64,9 @@ class UrlizeExtension(markdown.Extension):
def extendMarkdown(self, md, md_globals):
""" Replace autolink with UrlizePattern """
+ md.registerExtension(self)
md.inlinePatterns['urlize'] = UrlizePattern(URLIZE_RE, md)
def makeExtension(configs=None):
+ if configs is None: configs = {}
return UrlizeExtension(configs=configs)
-
-if __name__ == "__main__":
- import doctest
- doctest.testmod()
diff --git a/leaks/mdx_video.py b/leaks/mdx_video.py
new file mode 100644
index 0000000..fde11f1
--- /dev/null
+++ b/leaks/mdx_video.py
@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+
+"""
+Embeds web videos using URLs. For instance, if a URL to an youtube video is
+found in the text submitted to markdown and it isn't enclosed in parenthesis
+like a normal link in markdown, then the URL will be swapped with a embedded
+youtube video.
+
+All resulting HTML is XHTML Strict compatible.
+"""
+
+import markdown
+from markdown.util import etree
+
+version = "0.1.6"
+
+class VideoExtension(markdown.Extension):
+ def __init__(self, configs):
+ self.config = {
+ 'bliptv_width': ['480', 'Width for Blip.tv videos'],
+ 'bliptv_height': ['300', 'Height for Blip.tv videos'],
+ 'dailymotion_width': ['480', 'Width for Dailymotion videos'],
+ 'dailymotion_height': ['405', 'Height for Dailymotion videos'],
+ 'gametrailers_width': ['480', 'Width for Gametrailers videos'],
+ 'gametrailers_height': ['392', 'Height for Gametrailers videos'],
+ 'metacafe_width': ['498', 'Width for Metacafe videos'],
+ 'metacafe_height': ['423', 'Height for Metacafe videos'],
+ 'veoh_width': ['410', 'Width for Veoh videos'],
+ 'veoh_height': ['341', 'Height for Veoh videos'],
+ 'vimeo_width': ['400', 'Width for Vimeo videos'],
+ 'vimeo_height': ['321', 'Height for Vimeo videos'],
+ 'yahoo_width': ['512', 'Width for Yahoo! videos'],
+ 'yahoo_height': ['322', 'Height for Yahoo! videos'],
+ 'youtube_width': ['425', 'Width for Youtube videos'],
+ 'youtube_height': ['344', 'Height for Youtube videos'],
+ }
+
+ # Override defaults with user settings
+ for key, value in configs:
+ self.setConfig(key, value)
+
+ def add_inline(self, md, name, klass, re):
+ pattern = klass(re)
+ pattern.md = md
+ pattern.ext = self
+ md.inlinePatterns.add(name, pattern, "\S+.flv)')
+ self.add_inline(md, 'dailymotion', Dailymotion,
+ r'([^(]|^)http://www\.dailymotion\.com/(?P\S+)')
+ self.add_inline(md, 'gametrailers', Gametrailers,
+ r'([^(]|^)http://www.gametrailers.com/video/[a-z0-9-]+/(?P\d+)')
+ self.add_inline(md, 'metacafe', Metacafe,
+ r'([^(]|^)http://www\.metacafe\.com/watch/(?P\S+)/')
+ self.add_inline(md, 'veoh', Veoh,
+ r'([^(]|^)http://www\.veoh\.com/\S*(#watch%3D|watch/)(?P\w+)')
+ self.add_inline(md, 'vimeo', Vimeo,
+ r'([^(]|^)http://(www.|)vimeo\.com/(?P\d+)\S*')
+ self.add_inline(md, 'yahoo', Yahoo,
+ r'([^(]|^)http://video\.yahoo\.com/watch/(?P\d+)/(?P\d+)')
+ # http://www.youtube.com/watch?v=R2fwHjLvvk4&feature=rec-LGOUT-exp_stronger_r2-2r-1-HM
+ # http://www.youtube.com/v/0Xfh5iBBh4Y?fs=1&hl=en_US
+ self.add_inline(md, 'youtube', Youtube,
+ r'([^("\']|^)http://www\.youtube\.com/(?:watch\?\S*v=|v\/)(?P[A-Za-z0-9_&=-]+)\S*')
+
+class Bliptv(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://blip.tv/scripts/flash/showplayer.swf?file=http://blip.tv/file/get/%s' % m.group('bliptvfile')
+ width = self.ext.config['bliptv_width'][0]
+ height = self.ext.config['bliptv_height'][0]
+ return flash_object(url, width, height)
+
+class Dailymotion(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://www.dailymotion.com/swf/%s' % m.group('dailymotionid').split('/')[-1]
+ width = self.ext.config['dailymotion_width'][0]
+ height = self.ext.config['dailymotion_height'][0]
+ return flash_object(url, width, height)
+
+class Gametrailers(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://www.gametrailers.com/remote_wrap.php?mid=%s' % \
+ m.group('gametrailersid').split('/')[-1]
+ width = self.ext.config['gametrailers_width'][0]
+ height = self.ext.config['gametrailers_height'][0]
+ return flash_object(url, width, height)
+
+class Metacafe(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://www.metacafe.com/fplayer/%s.swf' % m.group('metacafeid')
+ width = self.ext.config['metacafe_width'][0]
+ height = self.ext.config['metacafe_height'][0]
+ return flash_object(url, width, height)
+
+class Veoh(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://www.veoh.com/videodetails2.swf?permalinkId=%s' % m.group('veohid')
+ width = self.ext.config['veoh_width'][0]
+ height = self.ext.config['veoh_height'][0]
+ return flash_object(url, width, height)
+
+class Vimeo(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://vimeo.com/moogaloop.swf?clip_id=%s&server=vimeo.com' % m.group('vimeoid')
+ width = self.ext.config['vimeo_width'][0]
+ height = self.ext.config['vimeo_height'][0]
+ return flash_object(url, width, height)
+
+class Yahoo(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = "http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40"
+ width = self.ext.config['yahoo_width'][0]
+ height = self.ext.config['yahoo_height'][0]
+ obj = flash_object(url, width, height)
+ param = etree.Element('param')
+ param.set('name', 'flashVars')
+ param.set('value', "id=%s&vid=%s" % (m.group('yahooid'),
+ m.group('yahoovid')))
+ obj.append(param)
+ return obj
+
+class Youtube(markdown.inlinepatterns.Pattern):
+ def handleMatch(self, m):
+ url = 'http://www.youtube.com/v/%s' % m.group('youtubeargs')
+ width = self.ext.config['youtube_width'][0]
+ height = self.ext.config['youtube_height'][0]
+ return flash_object(url, width, height)
+
+def flash_object(url, width, height):
+ obj = etree.Element('object')
+ obj.set('type', 'application/x-shockwave-flash')
+ obj.set('width', width)
+ obj.set('height', height)
+ obj.set('data', url)
+ param = etree.Element('param')
+ param.set('name', 'movie')
+ param.set('value', url)
+ obj.append(param)
+ param = etree.Element('param')
+ param.set('name', 'wmode')
+ param.set('value', 'opaque')
+ obj.append(param)
+ param = etree.Element('param')
+ param.set('name', 'allowFullScreen')
+ param.set('value', 'true')
+ obj.append(param)
+ #param = etree.Element('param')
+ #param.set('name', 'allowScriptAccess')
+ #param.set('value', 'sameDomain')
+ #obj.append(param)
+ return obj
+
+def makeExtension(configs=None) :
+ if configs is None: configs = {}
+ return VideoExtension(configs=configs)
diff --git a/leaks/migrations/0001_initial.py b/leaks/migrations/0001_initial.py
new file mode 100644
index 0000000..53c0e84
--- /dev/null
+++ b/leaks/migrations/0001_initial.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import taggit.managers
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('taggit', '0002_auto_20141128_0837'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Leak',
+ fields=[
+ ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
+ ('slug', models.SlugField(null=True, blank=True, editable=False)),
+ ('title', models.CharField(max_length=126, null=True, blank=True)),
+ ('description', models.TextField()),
+ ('rendered', models.TextField(null=True, blank=True, editable=False)),
+ ('author', models.CharField(max_length=20, default='anon')),
+ ('created', models.DateTimeField(auto_now_add=True)),
+ ('changed', models.DateTimeField(auto_now=True)),
+ ('metadata', models.TextField(null=True, default='', blank=True)),
+ ('tags', taggit.managers.TaggableManager(to='taggit.Tag', help_text='A comma-separated list of tags.', through='taggit.TaggedItem', verbose_name='Tags')),
+ ],
+ ),
+ ]
diff --git a/leaks/migrations/__init__.py b/leaks/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/leaks/models.py b/leaks/models.py
new file mode 100644
index 0000000..5b58346
--- /dev/null
+++ b/leaks/models.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+from django.db import models
+from taggit.managers import TaggableManager
+from django.contrib.auth.models import User
+from django.template.defaultfilters import slugify
+from markdown import markdown
+from leaks.mdx_urlize import makeExtension as make_urlize
+from leaks.mdx_video import makeExtension as make_video
+
+
+class Leak(models.Model):
+ slug = models.SlugField(editable=False, blank=True, null=True)
+ title = models.CharField(max_length=126, blank=True, null=True)
+ description = models.TextField()
+ rendered = models.TextField(null=True, blank=True, editable=False)
+ author = models.CharField(max_length=20, default='anon')
+ created = models.DateTimeField(auto_now_add=True, editable=False)
+ changed = models.DateTimeField(auto_now=True, editable=False)
+ tags = TaggableManager()
+ metadata = models.TextField(default='', null=True, blank=True)
+
+ def __unicode__(self):
+ return self.title or u'sin título'
+
+ def get_user(self):
+ try:
+ user = User.objects.get(username=self.author)
+ except User.DoesNotExist:
+ user = None
+ return user
+
+ @models.permalink
+ def get_absolute_url(self):
+ return ('leak_detail', [self.id])
+
+ def save(self, *args, **kwargs):
+ self.rendered = markdown(
+ self.description,
+ [make_urlize(), make_video(), 'codehilite']
+ )
+ self.slug = '%s-%s' % (slugify(self.title[:30]) or 'sin-titulo', self.pk)
+ super(Leak, self).save(*args, **kwargs)
diff --git a/leaks/serializers.py b/leaks/serializers.py
new file mode 100644
index 0000000..60d9ffc
--- /dev/null
+++ b/leaks/serializers.py
@@ -0,0 +1,7 @@
+from rest_framework import serializers
+from .models import Leak
+
+
+class LeakSerializer(serializers.ModelSerializer):
+ class Meta:
+ model = Leak
diff --git a/leaks/templatetags/__init__.py b/leaks/templatetags/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/ltmo/templatetags/gravatar.py b/leaks/templatetags/gravatar.py
similarity index 99%
rename from ltmo/templatetags/gravatar.py
rename to leaks/templatetags/gravatar.py
index 6c10bfb..2bc35cc 100644
--- a/ltmo/templatetags/gravatar.py
+++ b/leaks/templatetags/gravatar.py
@@ -27,6 +27,5 @@ def gravatar(email, size=50, rating='g', default=None):
hash = hashlib.md5(email).hexdigest()
url = 'http://www.gravatar.com/avatar/%s?s=%s&r=%s' % (
hash, size, rating)
-
- return """
""" % (url, size, size)
+ return """
""" % (url, size, size)
diff --git a/leaks/tests.py b/leaks/tests.py
new file mode 100644
index 0000000..a28d525
--- /dev/null
+++ b/leaks/tests.py
@@ -0,0 +1,138 @@
+from django.test import TestCase
+from leaks.models import Leak
+import markdown
+
+
+class TestLeak(TestCase):
+ def setUp(self):
+ self.mock_content = {
+ 'title': 'This is a test leak',
+ 'description': '**some** [Markdown](http://markdown.org) text.',
+ 'author': 'pindonga'
+ }
+ self.expected_content = {
+ 'title': 'This is a test leak',
+ 'description': '**some** [Markdown](http://markdown.org) text.',
+ 'author': 'pindonga',
+ 'rendered': u'''some Markdown text.
'''
+ }
+ self.leak = Leak.objects.create(**self.mock_content)
+
+ def test_markdown_ok(self):
+ self.assertEquals(self.leak.rendered, self.expected_content['rendered'])
+
+
+class TestUrlize(TestCase):
+ def setUp(self):
+ self.md = markdown.Markdown(extensions=['urlize'])
+
+ def test_convert(self):
+ self.assertEqual(self.md.convert('http://example.com/'),
+ 'http://example.com/
', )
+
+ self.assertEqual(self.md.convert('go to http://example.com'),
+ u'go to http://example.com
')
+
+ self.assertEqual(self.md.convert('example.com'),
+ u'example.com)p>')
+
+ self.assertEqual(self.md.convert('example.net'),
+ u'
example.net)p>')
+
+ self.assertEqual(self.md.convert('www.example.us'),
+ u'
www.example.us
')
+
+ self.assertEqual(self.md.convert('(www.example.us/path/?name=val)'),
+ u'(www.example.us/pat)h/?name=val)
')
+
+ self.assertEqual(self.md.convert('go to now!'),
+ u'go to http://example.com now!
)')
+
+ self.assertEqual(self.md.convert('http://example.com/abc.png'),
+ u'
')
+
+ self.assertEqual(self.md.convert('del.icio.us'),
+ u'del.icio.us
')
+
+
+class TestVideo(TestCase):
+ def setUp(self):
+ self.md = markdown.Markdown(extensions=['video'])
+
+ def test_video(self):
+ s = "http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/"
+ self.assertEqual(self.md.convert(s),
+ u'')
+
+ # Test Metacafe with arguments
+ self.assertEqual(self.md.convert(s),
+ u'')
+
+ self.assertEqual(self.md.convert("[Metacafe link](http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/)"),
+ u'Metacafe link
')
+
+ self.assertEqual(self.md.convert("\\http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/"),
+ u'\\\\http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/
')
+
+ self.assertEqual(self.md.convert("`http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/`"),
+ u'http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/
')
+
+ # Test Youtube
+ self.assertEqual(self.md.convert("http://www.youtube.com/watch?v=u1mA-0w8XPo&hd=1&fs=1&feature=PlayList&p=34C6046F7FEACFD3&playnext=1&playnext_from=PL&index=1"),
+ u'')
+
+
+ # Test Youtube with argument
+
+ self.assertEqual(markdown.markdown(s, extensions=['video(youtube_width=200,youtube_height=100)']),
+ u'')
+
+ # Test Youtube Link
+
+ self.assertEqual(self.md.convert("[Youtube link](http://www.youtube.com/watch?v=u1mA-0w8XPo&feature=PlayList&p=34C6046F7FEACFD3&playnext=1&playnext_from=PL&index=1)"),
+ u'Youtube link
')
+
+ # Test HTML Youtube Link
+
+ self.assertEqual(self.md.convert('Here is a link to a YouTube movie.'),
+ u'Here is a link to a YouTube movie.
')
+
+ # Test Dailymotion
+ self.assertEqual(self.md.convert("http://www.dailymotion.com/relevance/search/ut2004/video/x3kv65_ut2004-ownage_videogames"),
+ u'')
+
+ # Test Dailymotion again (Dailymotion and their crazy URLs)
+ self.assertEqual(self.md.convert("http://www.dailymotion.com/us/video/x8qak3_iron-man-vs-bruce-lee_fun"),
+ u'')
+
+ # Test Yahoo! Video
+ self.assertEqual(self.md.convert("http://video.yahoo.com/watch/1981791/4769603"),
+ u'')
+
+ # Test Veoh Video
+ self.assertEqual(self.md.convert("http://www.veoh.com/search/videos/q/mario#watch%3De129555XxCZanYD"),
+ u'')
+
+ # Test Veoh Video Again (More fun URLs)
+ self.assertEqual(self.md.convert("http://www.veoh.com/group/BigCatRescuers#watch%3Dv16771056hFtSBYEr"),
+ u'')
+
+ # Test Veoh Video Yet Again (Even more fun URLs)
+ self.assertEqual(self.md.convert("http://www.veoh.com/browse/videos/category/anime/watch/v181645607JyXPWcQ"),
+ u'')
+ # Test Vimeo Video
+ self.assertEqual(self.md.convert("http://www.vimeo.com/1496152"),
+ u'')
+
+ # Test Vimeo Video with some GET values
+
+ self.assertEqual(self.md.convert("http://vimeo.com/1496152?test=test"),
+ u'')
+
+ # Test Blip.tv
+ self.assertEqual(self.md.convert("http://blip.tv/file/get/Pycon-PlenarySprintIntro563.flv"),
+ u'')
+
+ # Test Gametrailers
+ self.assertEqual(self.md.convert("http://www.gametrailers.com/video/console-comparison-borderlands/58079"),
+ u'')
diff --git a/ltmo/views.py b/leaks/views.py
similarity index 77%
rename from ltmo/views.py
rename to leaks/views.py
index ae62256..fb71ccd 100644
--- a/ltmo/views.py
+++ b/leaks/views.py
@@ -6,11 +6,13 @@
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.shortcuts import redirect, get_object_or_404, render
-from tagging.models import Tag
from django.contrib.auth.decorators import login_required
-from ltmo.forms import LeakForm, RegisterForm
-from ltmo.models import Leak
-
+from taggit.models import Tag
+from rest_framework import viewsets
+from rest_framework.permissions import IsAuthenticatedOrReadOnly
+from .forms import LeakForm, RegisterForm
+from .models import Leak
+from .serializers import LeakSerializer
def index(request):
try:
@@ -32,17 +34,15 @@ def index(request):
def edit(request, id=None):
if id:
leak = get_object_or_404(Leak, pk=id)
- form = LeakForm(instance=leak)
+ form = LeakForm(request.POST or None, instance=leak)
else:
- form = LeakForm(initial={'author':request.user.username})
leak = None
+ form = LeakForm(request.POST or None, initial={'author':request.user})
+
+ if form.is_valid():
+ leak = form.save()
+ return redirect(leak.get_absolute_url())
- if request.method == 'POST':
- form = LeakForm(request.POST, instance=leak)
- if form.is_valid():
- leak = form.save()
- return redirect(leak.get_absolute_url())
-
return render(
request,
'leak_form.html',
@@ -64,13 +64,13 @@ def leak_detail(request, id=None):
'object': leak,
}
)
-
+
def by_tag(request, tag_name=None):
queryset = Leak.objects.all().order_by('tags')
form = LeakForm()
if tag_name:
- queryset = queryset.filter(tags__icontains=tag_name)
+ queryset = queryset.filter(tags__name__contains=tag_name)
return render(
request,
@@ -88,10 +88,10 @@ def tags(request):
if tag_name:
queryset = queryset.filter(name__istartswith=tag_name)
return HttpResponse(
- json.dumps([x.name for x in queryset]),
+ json.dumps([x.name for x in queryset]),
mimetype="application/json"
)
-
+
def user_profile(request, username=None):
if username is not None:
author = get_object_or_404(User, username=username)
@@ -124,10 +124,15 @@ def register(request,):
return redirect('/')
return render(
- request,
+ request,
'register.html',
{
'form': form,
}
)
+class LeakViewset(viewsets.ModelViewSet):
+ queryset = Leak.objects.all()
+ serializer_class = LeakSerializer
+ permission_classes = (IsAuthenticatedOrReadOnly, )
+ paginate_by = 100
diff --git a/ltmo/config.rb b/ltmo/config.rb
deleted file mode 100644
index 61d4481..0000000
--- a/ltmo/config.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# Require any additional compass plugins here.
-
-# Set this to the root of your project when deployed:
-http_path = "/"
-css_dir = "static/css"
-sass_dir = "sass"
-images_dir = "static/img"
-javascripts_dir = "static/js"
-
-# You can select your preferred output style here (can be overridden via the command line):
-output_style = :compact
-
-# To enable relative paths to assets via compass helper functions. Uncomment:
-relative_assets = true
-
-# To disable debugging comments that display the original location of your selectors. Uncomment:
-line_comments = false
-
-# If you prefer the indented syntax, you might want to regenerate this
-# project again passing --syntax sass, or you can uncomment this:
-# preferred_syntax = :sass
-# and then run:
-# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
diff --git a/ltmo/manage.py b/ltmo/manage.py
index a7c847d..d4109c1 100755
--- a/ltmo/manage.py
+++ b/ltmo/manage.py
@@ -6,7 +6,7 @@ def do_manage():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ltmo.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
-
+
if __name__ == "__main__":
do_manage()
diff --git a/ltmo/mdx_video.py b/ltmo/mdx_video.py
deleted file mode 100644
index 9e61d74..0000000
--- a/ltmo/mdx_video.py
+++ /dev/null
@@ -1,285 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Embeds web videos using URLs. For instance, if a URL to an youtube video is
-found in the text submitted to markdown and it isn't enclosed in parenthesis
-like a normal link in markdown, then the URL will be swapped with a embedded
-youtube video.
-
-All resulting HTML is XHTML Strict compatible.
-
->>> import markdown
-
-Test Metacafe
-
->>> s = "http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Metacafe with arguments
-
->>> markdown.markdown(s, ['video(metacafe_width=500,metacafe_height=425)'])
-u''
-
-
-Test Link To Metacafe
-
->>> s = "[Metacafe link](http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/)"
->>> markdown.markdown(s, ['video'])
-u'Metacafe link
'
-
-
-Test Markdown Escaping
-
->>> s = "\\http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/"
->>> markdown.markdown(s, ['video'])
-u'\\\\http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/
'
->>> s = "`http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/`"
->>> markdown.markdown(s, ['video'])
-u'http://www.metacafe.com/watch/yt-tZMsrrQCnx8/pycon_2008_django_sprint_room/
'
-
-
-Test Youtube
-
->>> s = "http://www.youtube.com/watch?v=u1mA-0w8XPo&hd=1&fs=1&feature=PlayList&p=34C6046F7FEACFD3&playnext=1&playnext_from=PL&index=1"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Youtube with argument
-
->>> markdown.markdown(s, ['video(youtube_width=200,youtube_height=100)'])
-u''
-
-
-Test Youtube Link
-
->>> s = "[Youtube link](http://www.youtube.com/watch?v=u1mA-0w8XPo&feature=PlayList&p=34C6046F7FEACFD3&playnext=1&playnext_from=PL&index=1)"
->>> markdown.markdown(s, ['video'])
-u'Youtube link
'
-
-
-Test HTML Youtube Link
-
->>> s = 'Here is a link to a YouTube movie.'
->>> markdown.markdown(s, ['video'])
-u'Here is a link to a YouTube movie.
'
-
-
-Test Dailymotion
-
->>> s = "http://www.dailymotion.com/relevance/search/ut2004/video/x3kv65_ut2004-ownage_videogames"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Dailymotion again (Dailymotion and their crazy URLs)
-
->>> s = "http://www.dailymotion.com/us/video/x8qak3_iron-man-vs-bruce-lee_fun"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Yahoo! Video
-
->>> s = "http://video.yahoo.com/watch/1981791/4769603"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Veoh Video
-
->>> s = "http://www.veoh.com/search/videos/q/mario#watch%3De129555XxCZanYD"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Veoh Video Again (More fun URLs)
-
->>> s = "http://www.veoh.com/group/BigCatRescuers#watch%3Dv16771056hFtSBYEr"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Veoh Video Yet Again (Even more fun URLs)
-
->>> s = "http://www.veoh.com/browse/videos/category/anime/watch/v181645607JyXPWcQ"
->>> markdown.markdown(s, ['video'])
-u''
-
-
-Test Vimeo Video
-
->>> s = "http://www.vimeo.com/1496152"
->>> markdown.markdown(s, ['video'])
-u''
-
-Test Vimeo Video with some GET values
-
->>> s = "http://vimeo.com/1496152?test=test"
->>> markdown.markdown(s, ['video'])
-u''
-
-Test Blip.tv
-
->>> s = "http://blip.tv/file/get/Pycon-PlenarySprintIntro563.flv"
->>> markdown.markdown(s, ['video'])
-u''
-
-Test Gametrailers
-
->>> s = "http://www.gametrailers.com/video/console-comparison-borderlands/58079"
->>> markdown.markdown(s, ['video'])
-u''
-"""
-
-import markdown
-from markdown.util import etree
-
-version = "0.1.6"
-
-class VideoExtension(markdown.Extension):
- def __init__(self, configs):
- self.config = {
- 'bliptv_width': ['480', 'Width for Blip.tv videos'],
- 'bliptv_height': ['300', 'Height for Blip.tv videos'],
- 'dailymotion_width': ['480', 'Width for Dailymotion videos'],
- 'dailymotion_height': ['405', 'Height for Dailymotion videos'],
- 'gametrailers_width': ['480', 'Width for Gametrailers videos'],
- 'gametrailers_height': ['392', 'Height for Gametrailers videos'],
- 'metacafe_width': ['498', 'Width for Metacafe videos'],
- 'metacafe_height': ['423', 'Height for Metacafe videos'],
- 'veoh_width': ['410', 'Width for Veoh videos'],
- 'veoh_height': ['341', 'Height for Veoh videos'],
- 'vimeo_width': ['400', 'Width for Vimeo videos'],
- 'vimeo_height': ['321', 'Height for Vimeo videos'],
- 'yahoo_width': ['512', 'Width for Yahoo! videos'],
- 'yahoo_height': ['322', 'Height for Yahoo! videos'],
- 'youtube_width': ['425', 'Width for Youtube videos'],
- 'youtube_height': ['344', 'Height for Youtube videos'],
- }
-
- # Override defaults with user settings
- for key, value in configs:
- self.setConfig(key, value)
-
- def add_inline(self, md, name, klass, re):
- pattern = klass(re)
- pattern.md = md
- pattern.ext = self
- md.inlinePatterns.add(name, pattern, "\S+.flv)')
- self.add_inline(md, 'dailymotion', Dailymotion,
- r'([^(]|^)http://www\.dailymotion\.com/(?P\S+)')
- self.add_inline(md, 'gametrailers', Gametrailers,
- r'([^(]|^)http://www.gametrailers.com/video/[a-z0-9-]+/(?P\d+)')
- self.add_inline(md, 'metacafe', Metacafe,
- r'([^(]|^)http://www\.metacafe\.com/watch/(?P\S+)/')
- self.add_inline(md, 'veoh', Veoh,
- r'([^(]|^)http://www\.veoh\.com/\S*(#watch%3D|watch/)(?P\w+)')
- self.add_inline(md, 'vimeo', Vimeo,
- r'([^(]|^)http://(www.|)vimeo\.com/(?P\d+)\S*')
- self.add_inline(md, 'yahoo', Yahoo,
- r'([^(]|^)http://video\.yahoo\.com/watch/(?P\d+)/(?P\d+)')
- # http://www.youtube.com/watch?v=R2fwHjLvvk4&feature=rec-LGOUT-exp_stronger_r2-2r-1-HM
- # http://www.youtube.com/v/0Xfh5iBBh4Y?fs=1&hl=en_US
- self.add_inline(md, 'youtube', Youtube,
- r'([^("\']|^)http://www\.youtube\.com/(?:watch\?\S*v=|v\/)(?P[A-Za-z0-9_&=-]+)\S*')
-
-class Bliptv(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://blip.tv/scripts/flash/showplayer.swf?file=http://blip.tv/file/get/%s' % m.group('bliptvfile')
- width = self.ext.config['bliptv_width'][0]
- height = self.ext.config['bliptv_height'][0]
- return flash_object(url, width, height)
-
-class Dailymotion(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://www.dailymotion.com/swf/%s' % m.group('dailymotionid').split('/')[-1]
- width = self.ext.config['dailymotion_width'][0]
- height = self.ext.config['dailymotion_height'][0]
- return flash_object(url, width, height)
-
-class Gametrailers(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://www.gametrailers.com/remote_wrap.php?mid=%s' % \
- m.group('gametrailersid').split('/')[-1]
- width = self.ext.config['gametrailers_width'][0]
- height = self.ext.config['gametrailers_height'][0]
- return flash_object(url, width, height)
-
-class Metacafe(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://www.metacafe.com/fplayer/%s.swf' % m.group('metacafeid')
- width = self.ext.config['metacafe_width'][0]
- height = self.ext.config['metacafe_height'][0]
- return flash_object(url, width, height)
-
-class Veoh(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://www.veoh.com/videodetails2.swf?permalinkId=%s' % m.group('veohid')
- width = self.ext.config['veoh_width'][0]
- height = self.ext.config['veoh_height'][0]
- return flash_object(url, width, height)
-
-class Vimeo(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://vimeo.com/moogaloop.swf?clip_id=%s&server=vimeo.com' % m.group('vimeoid')
- width = self.ext.config['vimeo_width'][0]
- height = self.ext.config['vimeo_height'][0]
- return flash_object(url, width, height)
-
-class Yahoo(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = "http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40"
- width = self.ext.config['yahoo_width'][0]
- height = self.ext.config['yahoo_height'][0]
- obj = flash_object(url, width, height)
- param = etree.Element('param')
- param.set('name', 'flashVars')
- param.set('value', "id=%s&vid=%s" % (m.group('yahooid'),
- m.group('yahoovid')))
- obj.append(param)
- return obj
-
-class Youtube(markdown.inlinepatterns.Pattern):
- def handleMatch(self, m):
- url = 'http://www.youtube.com/v/%s' % m.group('youtubeargs')
- width = self.ext.config['youtube_width'][0]
- height = self.ext.config['youtube_height'][0]
- return flash_object(url, width, height)
-
-def flash_object(url, width, height):
- obj = etree.Element('object')
- obj.set('type', 'application/x-shockwave-flash')
- obj.set('width', width)
- obj.set('height', height)
- obj.set('data', url)
- param = etree.Element('param')
- param.set('name', 'movie')
- param.set('value', url)
- obj.append(param)
- param = etree.Element('param')
- param.set('name', 'wmode')
- param.set('value', 'opaque')
- obj.append(param)
- param = etree.Element('param')
- param.set('name', 'allowFullScreen')
- param.set('value', 'true')
- obj.append(param)
- #param = etree.Element('param')
- #param.set('name', 'allowScriptAccess')
- #param.set('value', 'sameDomain')
- #obj.append(param)
- return obj
-
-def makeExtension(configs=None) :
- return VideoExtension(configs=configs)
-
-if __name__ == "__main__":
- import doctest
- doctest.testmod()
diff --git a/ltmo/migrations/0001_initial.py b/ltmo/migrations/0001_initial.py
deleted file mode 100644
index 7bde476..0000000
--- a/ltmo/migrations/0001_initial.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding model 'Leak'
- db.create_table('ltmo_leak', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=126, null=True, blank=True)),
- ('description', self.gf('django.db.models.fields.TextField')()),
- ('author', self.gf('django.db.models.fields.CharField')(default='Anonymous', max_length=20)),
- ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
- ('changed', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
- ('tags', self.gf('tagging.fields.TagField')(default='random')),
- ('metadata', self.gf('django.db.models.fields.TextField')()),
- ))
- db.send_create_signal('ltmo', ['Leak'])
-
-
- def backwards(self, orm):
-
- # Deleting model 'Leak'
- db.delete_table('ltmo_leak')
-
-
- models = {
- 'ltmo.leak': {
- 'Meta': {'object_name': 'Leak'},
- 'author': ('django.db.models.fields.CharField', [], {'default': "'Anonymous'", 'max_length': '20'}),
- 'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'metadata': ('django.db.models.fields.TextField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
- 'tags': ('tagging.fields.TagField', [], {'default': "'random'"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '126', 'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['ltmo']
diff --git a/ltmo/migrations/0002_auto__add_field_leak_rendered.py b/ltmo/migrations/0002_auto__add_field_leak_rendered.py
deleted file mode 100644
index f84b763..0000000
--- a/ltmo/migrations/0002_auto__add_field_leak_rendered.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Leak.rendered'
- db.add_column('ltmo_leak', 'rendered', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'Leak.rendered'
- db.delete_column('ltmo_leak', 'rendered')
-
-
- models = {
- 'ltmo.leak': {
- 'Meta': {'object_name': 'Leak'},
- 'author': ('django.db.models.fields.CharField', [], {'default': "'Anonymous'", 'max_length': '20'}),
- 'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'metadata': ('django.db.models.fields.TextField', [], {}),
- 'rendered': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
- 'tags': ('tagging.fields.TagField', [], {'default': "'random'"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '126', 'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['ltmo']
diff --git a/ltmo/migrations/0003_auto__chg_field_leak_slug__del_unique_leak_slug__chg_field_leak_metada.py b/ltmo/migrations/0003_auto__chg_field_leak_slug__del_unique_leak_slug__chg_field_leak_metada.py
deleted file mode 100644
index 8f1e845..0000000
--- a/ltmo/migrations/0003_auto__chg_field_leak_slug__del_unique_leak_slug__chg_field_leak_metada.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Removing unique constraint on 'Leak', fields ['slug']
- db.delete_unique('ltmo_leak', ['slug'])
-
- # Changing field 'Leak.slug'
- db.alter_column('ltmo_leak', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=50, null=True))
-
- # Changing field 'Leak.metadata'
- db.alter_column('ltmo_leak', 'metadata', self.gf('django.db.models.fields.TextField')(null=True))
-
-
- def backwards(self, orm):
-
- # Changing field 'Leak.slug'
- db.alter_column('ltmo_leak', 'slug', self.gf('django.db.models.fields.SlugField')(default='random', max_length=50, unique=True))
-
- # Adding unique constraint on 'Leak', fields ['slug']
- db.create_unique('ltmo_leak', ['slug'])
-
- # Changing field 'Leak.metadata'
- db.alter_column('ltmo_leak', 'metadata', self.gf('django.db.models.fields.TextField')(default='{}'))
-
-
- models = {
- 'ltmo.leak': {
- 'Meta': {'object_name': 'Leak'},
- 'author': ('django.db.models.fields.CharField', [], {'default': "'Anonymous'", 'max_length': '20'}),
- 'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'metadata': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
- 'rendered': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
- 'tags': ('tagging.fields.TagField', [], {}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '126', 'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['ltmo']
diff --git a/ltmo/migrations/0004_auto__chg_field_leak_author.py b/ltmo/migrations/0004_auto__chg_field_leak_author.py
deleted file mode 100644
index 3f48b55..0000000
--- a/ltmo/migrations/0004_auto__chg_field_leak_author.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Renaming column for 'Leak.author' to match new field type.
- db.rename_column('ltmo_leak', 'author', 'author_id')
- # Changing field 'Leak.author'
- db.alter_column('ltmo_leak', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True))
-
- # Adding index on 'Leak', fields ['author']
- db.create_index('ltmo_leak', ['author_id'])
-
-
- def backwards(self, orm):
-
- # Removing index on 'Leak', fields ['author']
- db.delete_index('ltmo_leak', ['author_id'])
-
- # Renaming column for 'Leak.author' to match new field type.
- db.rename_column('ltmo_leak', 'author_id', 'author')
- # Changing field 'Leak.author'
- db.alter_column('ltmo_leak', 'author', self.gf('django.db.models.fields.CharField')(max_length=20))
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'ltmo.leak': {
- 'Meta': {'object_name': 'Leak'},
- 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
- 'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'metadata': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
- 'rendered': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
- 'tags': ('tagging.fields.TagField', [], {}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '126', 'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['ltmo']
diff --git a/ltmo/migrations/0005_auto__chg_field_leak_title.py b/ltmo/migrations/0005_auto__chg_field_leak_title.py
deleted file mode 100644
index e56a98f..0000000
--- a/ltmo/migrations/0005_auto__chg_field_leak_title.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Changing field 'Leak.title'
- db.alter_column('ltmo_leak', 'title', self.gf('django.db.models.fields.CharField')(max_length=126))
-
-
- def backwards(self, orm):
-
- # Changing field 'Leak.title'
- db.alter_column('ltmo_leak', 'title', self.gf('django.db.models.fields.CharField')(max_length=126, null=True))
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'ltmo.leak': {
- 'Meta': {'object_name': 'Leak'},
- 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
- 'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'metadata': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
- 'rendered': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
- 'tags': ('tagging.fields.TagField', [], {}),
- 'title': ('django.db.models.fields.CharField', [], {'default': "'sin-titulo'", 'max_length': '126'})
- }
- }
-
- complete_apps = ['ltmo']
diff --git a/ltmo/models.py b/ltmo/models.py
index 8d820c9..e69de29 100644
--- a/ltmo/models.py
+++ b/ltmo/models.py
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.db import models
-from tagging.fields import TagField
-from tagging.utils import parse_tag_input
-from django.contrib.auth.models import User
-from django.contrib import admin
-from django.template.defaultfilters import slugify
-from markdown import markdown
-
-
-
-class Leak(models.Model):
- slug = models.SlugField(editable=False, blank=True, null=True)
- title = models.CharField(max_length=126, blank=True, null=True)
- description = models.TextField()
- rendered = models.TextField(null=True, blank=True, editable = False)
- author = models.SlugField(max_length=20, default='anon')
- created = models.DateTimeField(auto_now_add=True, editable = False)
- changed = models.DateTimeField(auto_now=True, editable = False)
- tags = TagField()
- metadata = models.TextField(default='', null=True, blank=True)
-
- def __unicode__(self):
- return self.title or u'sin título'
-
- def get_user(self):
- try:
- user = User.objects.get(username=self.author)
- except User.DoesNotExist:
- user = None
- return user
-
- @models.permalink
- def get_absolute_url(self):
- return ('leak_detail', [self.id])
-
- def save(self, *args, **kwargs):
- self.rendered = markdown(
- self.description,
- ['ltmo.mdx_urlize', 'ltmo.mdx_video', 'codehilite']
- )
- self.tags = ','.join([slugify(x) for x in parse_tag_input(self.tags)])
- self.slug = '%s-%s' %(slugify(self.title[:30]) or 'sin-titulo', self.pk)
- super(Leak, self).save(*args, **kwargs)
-
-class LeakAdmin(admin.ModelAdmin):
- list_display = ('__unicode__', 'tags','author', 'created')
- list_filter = ('author', 'created')
-
-admin.site.register(Leak, LeakAdmin)
diff --git a/ltmo/sass/_fonts.scss b/ltmo/sass/_fonts.scss
deleted file mode 100644
index 8144726..0000000
--- a/ltmo/sass/_fonts.scss
+++ /dev/null
@@ -1,271 +0,0 @@
-/*!
- * Font Awesome 3.0.2
- * the iconic font designed for use with Twitter Bootstrap
- * -------------------------------------------------------
- * The full suite of pictographic icons, examples, and documentation
- * can be found at: http://fortawesome.github.com/Font-Awesome/
- *
- * License
- * -------------------------------------------------------
- * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL
- * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License -
- * http://opensource.org/licenses/mit-license.html
- * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/
- * - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
- *
- * Contact
- * -------------------------------------------------------
- * Email: dave@davegandy.com
- * Twitter: http://twitter.com/fortaweso_me
- * Work: Lead Product Designer @ http://kyruus.com
- */
-
-$fontAwesomePath: "../fonts" !default;
-$borderColor: #eee;
-$iconMuted: #eee;
-@mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; border-radius: $radius; }
-
-
-@font-face {
- font-family: 'FontAwesome';
- src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?v=3.0.1');
- src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?#iefix&v=3.0.1') format("embedded-opentype"),
- url('#{$fontAwesomePath}/fontawesome-webfont.woff?v=3.0.1') format("woff"),
- url('#{$fontAwesomePath}/fontawesome-webfont.ttf?v=3.0.1') format("truetype");
- font-weight: normal;
- font-style: normal;
-}
-
-/* Font Awesome styles
- ------------------------------------------------------- */
-[class^="icon-"],
-[class*=" icon-"] {
- font-family: FontAwesome;
- font-weight: normal;
- font-style: normal;
- text-decoration: inherit;
- -webkit-font-smoothing: antialiased;
-
- /* sprites.less reset */
- display: inline;
- width: auto;
- height: auto;
- line-height: normal;
- vertical-align: baseline;
- background-image: none;
- background-position: 0% 0%;
- background-repeat: repeat;
- margin-top: 0;
-}
-
-/* more sprites.less reset */
-.icon-white,
-.nav-pills > .active > a > [class^="icon-"],
-.nav-pills > .active > a > [class*=" icon-"],
-.nav-list > .active > a > [class^="icon-"],
-.nav-list > .active > a > [class*=" icon-"],
-.navbar-inverse .nav > .active > a > [class^="icon-"],
-.navbar-inverse .nav > .active > a > [class*=" icon-"],
-.dropdown-menu > li > a:hover > [class^="icon-"],
-.dropdown-menu > li > a:hover > [class*=" icon-"],
-.dropdown-menu > .active > a > [class^="icon-"],
-.dropdown-menu > .active > a > [class*=" icon-"],
-.dropdown-submenu:hover > a > [class^="icon-"],
-.dropdown-submenu:hover > a > [class*=" icon-"] {
- background-image: none;
-}
-
-[class^="icon-"]:before,
-[class*=" icon-"]:before {
- text-decoration: inherit;
- display: inline-block;
- speak: none;
-}
-
-/* makes sure icons active on rollover in links */
-a {
- [class^="icon-"],
- [class*=" icon-"] {
- display: inline-block;
- }
-}
-
-/* makes the font 33% larger relative to the icon container */
-.icon-large:before {
- vertical-align: -10%;
- font-size: 1.3333333333333333em;
-}
-
-.btn, .nav {
- [class^="icon-"],
- [class*=" icon-"] {
- display: inline;
- /* keeps button heights with and without icons the same */
- &.icon-large { line-height: .9em; }
- &.icon-spin { display: inline-block; }
- }
-}
-
-.nav-tabs, .nav-pills {
- [class^="icon-"],
- [class*=" icon-"] {
- /* keeps button heights with and without icons the same */
- &, &.icon-large { line-height: .9em; }
- }
-}
-
-li, .nav li {
- [class^="icon-"],
- [class*=" icon-"] {
- display: inline-block;
- width: 1.25em;
- text-align: center;
- &.icon-large {
- /* increased font size for icon-large */
- width: 1.5625em;
- }
- }
-}
-
-ul.icons {
- list-style-type: none;
- text-indent: -.75em;
-
- li {
- [class^="icon-"],
- [class*=" icon-"] {
- width: .75em;
- }
- }
-}
-
-.icon-muted {
- color: $iconMuted;
-}
-
-// Icon Borders
-// -------------------------
-
-.icon-border {
- border: solid 1px $borderColor;
- padding: .2em .25em .15em;
- @include border-radius(3px);
-}
-
-// Icon Sizes
-// -------------------------
-
-.icon-2x {
- font-size: 2em;
- &.icon-border {
- border-width: 2px;
- @include border-radius(4px);
- }
-}
-.icon-3x {
- font-size: 3em;
- &.icon-border {
- border-width: 3px;
- @include border-radius(5px);
- }
-}
-.icon-4x {
- font-size: 4em;
- &.icon-border {
- border-width: 4px;
- @include border-radius(6px);
- }
-}
-
-// Floats
-// -------------------------
-
-// Quick floats
-.pull-right { float: right; }
-.pull-left { float: left; }
-
-[class^="icon-"],
-[class*=" icon-"] {
- &.pull-left {
- margin-right: .3em;
- }
- &.pull-right {
- margin-left: .3em;
- }
-}
-
-.btn {
- [class^="icon-"],
- [class*=" icon-"] {
- &.pull-left, &.pull-right {
- &.icon-2x { margin-top: .18em; }
- }
- &.icon-spin.icon-large { line-height: .8em; }
- }
-}
-
-.btn.btn-small {
- [class^="icon-"],
- [class*=" icon-"] {
- &.pull-left, &.pull-right {
- &.icon-2x { margin-top: .25em; }
- }
- }
-}
-
-.btn.btn-large {
- [class^="icon-"],
- [class*=" icon-"] {
- margin-top: 0; // overrides bootstrap default
- &.pull-left, &.pull-right {
- &.icon-2x { margin-top: .05em; }
- }
- &.pull-left.icon-2x { margin-right: .2em; }
- &.pull-right.icon-2x { margin-left: .2em; }
- }
-}
-
-
-.icon-spin {
- display: inline-block;
- -moz-animation: spin 2s infinite linear;
- -o-animation: spin 2s infinite linear;
- -webkit-animation: spin 2s infinite linear;
- animation: spin 2s infinite linear;
-}
-
-@-moz-keyframes spin {
- 0% { -moz-transform: rotate(0deg); }
- 100% { -moz-transform: rotate(359deg); }
-}
-@-webkit-keyframes spin {
- 0% { -webkit-transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(359deg); }
-}
-@-o-keyframes spin {
- 0% { -o-transform: rotate(0deg); }
- 100% { -o-transform: rotate(359deg); }
-}
-@-ms-keyframes spin {
- 0% { -ms-transform: rotate(0deg); }
- 100% { -ms-transform: rotate(359deg); }
-}
-@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(359deg); }
-}
-
-@-moz-document url-prefix() {
- .icon-spin { height: .9em; }
- .btn .icon-spin { height: auto; }
- .icon-spin.icon-large { height: 1.25em; }
- .btn .icon-spin.icon-large { height: .75em; }
-}
-.icon-user:before { content: "\f021"; }
-.icon-home:before { content: "\f022"; }
-.icon-tag:before { content: "\f023"; }
-.icon-tint:before { content: "\f024"; }
-.icon-question-sign:before { content: "\f025"; }
-.icon-angle-left:before { content: "\f026"; }
-.icon-angle-right:before { content: "\f027"; }
diff --git a/ltmo/sass/fontawesome.scss b/ltmo/sass/fontawesome.scss
deleted file mode 100644
index 384ee77..0000000
--- a/ltmo/sass/fontawesome.scss
+++ /dev/null
@@ -1,270 +0,0 @@
-/*!
- * Font Awesome 3.0.2
- * the iconic font designed for use with Twitter Bootstrap
- * -------------------------------------------------------
- * The full suite of pictographic icons, examples, and documentation
- * can be found at: http://fortawesome.github.com/Font-Awesome/
- *
- * License
- * -------------------------------------------------------
- * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL
- * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License -
- * http://opensource.org/licenses/mit-license.html
- * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/
- * - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
- *
- * Contact
- * -------------------------------------------------------
- * Email: dave@davegandy.com
- * Twitter: http://twitter.com/fortaweso_me
- * Work: Lead Product Designer @ http://kyruus.com
- */
-
-$fontAwesomePath: "" !default;
-$borderColor: #eee;
-$iconMuted: #eee;
-@mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; border-radius: $radius; }
-
-
-@font-face {
- font-family: 'FontAwesome';
- src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?v=3.0.1');
- src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?#iefix&v=3.0.1') format("embedded-opentype"),
- url('#{$fontAwesomePath}/fontawesome-webfont.woff?v=3.0.1') format("woff"),
- url('#{$fontAwesomePath}/fontawesome-webfont.ttf?v=3.0.1') format("truetype");
- font-weight: normal;
- font-style: normal;
-}
-
-/* Font Awesome styles
- ------------------------------------------------------- */
-[class^="icon-"],
-[class*=" icon-"] {
- font-family: FontAwesome;
- font-weight: normal;
- font-style: normal;
- text-decoration: inherit;
- -webkit-font-smoothing: antialiased;
-
- /* sprites.less reset */
- display: inline;
- width: auto;
- height: auto;
- line-height: normal;
- vertical-align: baseline;
- background-image: none;
- background-position: 0% 0%;
- background-repeat: repeat;
- margin-top: 0;
-}
-
-/* more sprites.less reset */
-.icon-white,
-.nav-pills > .active > a > [class^="icon-"],
-.nav-pills > .active > a > [class*=" icon-"],
-.nav-list > .active > a > [class^="icon-"],
-.nav-list > .active > a > [class*=" icon-"],
-.navbar-inverse .nav > .active > a > [class^="icon-"],
-.navbar-inverse .nav > .active > a > [class*=" icon-"],
-.dropdown-menu > li > a:hover > [class^="icon-"],
-.dropdown-menu > li > a:hover > [class*=" icon-"],
-.dropdown-menu > .active > a > [class^="icon-"],
-.dropdown-menu > .active > a > [class*=" icon-"],
-.dropdown-submenu:hover > a > [class^="icon-"],
-.dropdown-submenu:hover > a > [class*=" icon-"] {
- background-image: none;
-}
-
-[class^="icon-"]:before,
-[class*=" icon-"]:before {
- text-decoration: inherit;
- display: inline-block;
- speak: none;
-}
-
-/* makes sure icons active on rollover in links */
-a {
- [class^="icon-"],
- [class*=" icon-"] {
- display: inline-block;
- }
-}
-
-/* makes the font 33% larger relative to the icon container */
-.icon-large:before {
- vertical-align: -10%;
- font-size: 1.3333333333333333em;
-}
-
-.btn, .nav {
- [class^="icon-"],
- [class*=" icon-"] {
- display: inline;
- /* keeps button heights with and without icons the same */
- &.icon-large { line-height: .9em; }
- &.icon-spin { display: inline-block; }
- }
-}
-
-.nav-tabs, .nav-pills {
- [class^="icon-"],
- [class*=" icon-"] {
- /* keeps button heights with and without icons the same */
- &, &.icon-large { line-height: .9em; }
- }
-}
-
-li, .nav li {
- [class^="icon-"],
- [class*=" icon-"] {
- display: inline-block;
- width: 1.25em;
- text-align: center;
- &.icon-large {
- /* increased font size for icon-large */
- width: 1.5625em;
- }
- }
-}
-
-ul.icons {
- list-style-type: none;
- text-indent: -.75em;
-
- li {
- [class^="icon-"],
- [class*=" icon-"] {
- width: .75em;
- }
- }
-}
-
-.icon-muted {
- color: $iconMuted;
-}
-
-// Icon Borders
-// -------------------------
-
-.icon-border {
- border: solid 1px $borderColor;
- padding: .2em .25em .15em;
- @include border-radius(3px);
-}
-
-// Icon Sizes
-// -------------------------
-
-.icon-2x {
- font-size: 2em;
- &.icon-border {
- border-width: 2px;
- @include border-radius(4px);
- }
-}
-.icon-3x {
- font-size: 3em;
- &.icon-border {
- border-width: 3px;
- @include border-radius(5px);
- }
-}
-.icon-4x {
- font-size: 4em;
- &.icon-border {
- border-width: 4px;
- @include border-radius(6px);
- }
-}
-
-// Floats
-// -------------------------
-
-// Quick floats
-.pull-right { float: right; }
-.pull-left { float: left; }
-
-[class^="icon-"],
-[class*=" icon-"] {
- &.pull-left {
- margin-right: .3em;
- }
- &.pull-right {
- margin-left: .3em;
- }
-}
-
-.btn {
- [class^="icon-"],
- [class*=" icon-"] {
- &.pull-left, &.pull-right {
- &.icon-2x { margin-top: .18em; }
- }
- &.icon-spin.icon-large { line-height: .8em; }
- }
-}
-
-.btn.btn-small {
- [class^="icon-"],
- [class*=" icon-"] {
- &.pull-left, &.pull-right {
- &.icon-2x { margin-top: .25em; }
- }
- }
-}
-
-.btn.btn-large {
- [class^="icon-"],
- [class*=" icon-"] {
- margin-top: 0; // overrides bootstrap default
- &.pull-left, &.pull-right {
- &.icon-2x { margin-top: .05em; }
- }
- &.pull-left.icon-2x { margin-right: .2em; }
- &.pull-right.icon-2x { margin-left: .2em; }
- }
-}
-
-
-.icon-spin {
- display: inline-block;
- -moz-animation: spin 2s infinite linear;
- -o-animation: spin 2s infinite linear;
- -webkit-animation: spin 2s infinite linear;
- animation: spin 2s infinite linear;
-}
-
-@-moz-keyframes spin {
- 0% { -moz-transform: rotate(0deg); }
- 100% { -moz-transform: rotate(359deg); }
-}
-@-webkit-keyframes spin {
- 0% { -webkit-transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(359deg); }
-}
-@-o-keyframes spin {
- 0% { -o-transform: rotate(0deg); }
- 100% { -o-transform: rotate(359deg); }
-}
-@-ms-keyframes spin {
- 0% { -ms-transform: rotate(0deg); }
- 100% { -ms-transform: rotate(359deg); }
-}
-@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(359deg); }
-}
-
-@-moz-document url-prefix() {
- .icon-spin { height: .9em; }
- .btn .icon-spin { height: auto; }
- .icon-spin.icon-large { height: 1.25em; }
- .btn .icon-spin.icon-large { height: .75em; }
-}.icon-user:before { content: "\f021"; }
-.icon-home:before { content: "\f022"; }
-.icon-tag:before { content: "\f023"; }
-.icon-tint:before { content: "\f024"; }
-.icon-question-sign:before { content: "\f025"; }
-.icon-angle-left:before { content: "\f026"; }
-.icon-angle-right:before { content: "\f027"; }
diff --git a/ltmo/sass/style.scss b/ltmo/sass/style.scss
deleted file mode 100644
index 14b6ebc..0000000
--- a/ltmo/sass/style.scss
+++ /dev/null
@@ -1,477 +0,0 @@
-@import "pygments";
-@import "base";
-@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono);
-* {
- box-sizing: content-box;
-}
-.wrapper {
- padding: 0.5em 1em;
- overflow:overlay;
-}
-body {
- font: 100% "Droid Sans", sans-serif;
- background: #EEE;
- padding:0;
- margin: 0;
-}
-header, section, footer, article, aside {
- display: block;
- padding: 0;
- margin-bottom: 2em;
-
-}
-header {
- width:100%;
- padding:0;
- margin: 0;
- position: fixed;
- @include gradient(rgba(255,255,255,0.7));
- top:0;
- left: 0;
- z-index:9999;
- box-shadow: 0 1px 2px #555;
- @include gradient(rgba(255,255,255,.7));
- .wrapper {
- padding: 0 1em;
- }
-}
-
-footer {
- clear: both;
- padding: 5em 1em 1em;
- font-size: 80%;
-}
-#main{
- margin:4em 0 0;
- clear: both;
- position: relative;
-}
-#help {
- padding: 1em;
- background: white;
- width: 25em;
- float:none;
- position:absolute;
- top: 1em;
- right:0;
- box-shadow: 0 1px 1px #000;
- border-radius: 3px;
- border: 1px solid #EEE;
- background: #FFF;
-}
-section {
- display:block;
- text-align:center;
- article {
- text-align: left;
- position:relative;
- margin:2em auto;
- width:40em;
- p {
- color: #000;
- text-shadow: 0 1px 1px #FFF;
- }
- }
- .leak{
- &:before {
- content: '';
- display: inline-block;
- height: 100%;
- vertical-align: middle;
- margin-right: -0.25em; /* Adjusts for spacing */
- }
- article {
- display: inline-block;
- vertical-align: middle;
- margin:2em auto 0;
- }
- }
-
-}
-article img, article object {
- display:block;
- margin: 0.5em auto;
-}
-
-article object {
- max-width: 90%;
-}
-.slot {
- text-align: center;
-}
-.detail {
- text-align: right;
- font-size:80%;
- display:block;
- color: #555;
-}
-#detail {
- position: fixed;
- font-size:80%;
- bottom:0;
- width: 100%;
- padding: 0;
- left: 0;
- margin: 0;
- p {
- padding: 0 3em;
- margin: 0;
-
- }
-}
-#metadata {
- float:right;
- text-align:right;
-
-}
-#tagcloud {
- position: absolute;
- bottom: 0;
- text-align:left;
- margin-top: -1em !important;
-}
-aside {
- text-align: left;
- width: 20%;
- position: absolute;
- font-size: 80%;
- top: 4em;
- right:1em;
-}
-pre, code {
- font: 110% "Droid Sans Mono",monospace;
- white-space: pre-wrap;
- color:$solarized_base1;
-}
-
-blockquote{
- font: italic 150% "Georgia-MS", Georgia, serif;
- width: 70%;
- margin: 1em auto;
-}
-
-a{
- border: 1px solid transparent;
- text-decoration:none;
- color :$fg_color;
- &:hover {
- text-shadow: 0 -1px 0 #FFF, 0 1px 1px #000;
- }
-}
-
-a img{
- border: 0;
-}
-em {
- font: italic 100% "Georgia-MS", Georgia, serif;
-}
-h1, h2, h3, h1 a, h2 a, h3 a {
- font-weight: normal;
-}
-h1 {
- font-weight: normal;
-}
-h1 .pilcrow {
- font-size:70%;
- display:none;
- vertical-align: top;
-}
-h1:hover .pilcrow {
- display:inline;
-}
-h2 {
- font-size:180%;
-}
-#wrapper {
- margin: 0 auto;
- text-align:left;
- background: rgba(255, 255, 255, 0.8);
- border-radius: 15px 15px 0 0;
-}
-#logo {
- margin:0;
- padding: 0.2em 0;
- color: #555;
- font-size: 1.6em;
-}
-#banner-header {
- float:right;
- margin: 0.5em 0;
-}
-#banner-content {
- text-align:center;
- width: 730px;
- margin: 0 auto;
-
-}
-#banner-aside {
- margin-top:15px;
-}
-#author {
- margin:1em 0;
-}
-#author details {
- font-size:13px;
- margin: -1.5em 0;
- text-align:left;
-}
-#messages {
- text-align:left;
- background: #FE9;
- border: 1px solid #FC0;
- font-size:80%;
- margin:0;
- padding:0 1em;
- position:fixed;
- left:0;
- top:0;
- width:100%;
- z-index:100;
- list-style:none;
-}
-#messages li {
- padding: 0.25em 2em;
- position: relative;
-}
-#messages .control {
- position: absolute;
- right: 4em;
-}
-
-.rewind {
- position: absolute;
- bottom: 5em;
- right: 10em;
-
-}
-.banner {
- clear: both;
- position:relative;
- padding: 1em;
-}
-.gravatar {
- float:left;
- margin-right:0.5em;
-}
-.caption {
- margin:0;
- padding: 1em;
- border-color: transparent transparent #EEEEEE;
- border-style: solid;
- border-width: 0 0 1px;
-}
-.clear {
- display:block;
- clear:both;
-}
-.pager {
- display: block;
- position: fixed;
- top: 0;
- padding: 0;
- height: 100%;
- width:3em;
- outline: 0;
- strong {
- @include transition(0.3s);
- position: fixed;
- display: block;
- padding:2px 5px;
- margin-top: 0;
- top: 50%;
- font-size:2em;
- color: rgba(100,100,100, 0.5);
- font-size:4em;
- }
- &:hover strong {
- @include transition(0.1s);
- font-size:8em;
- margin-top:-0.25em;
- color: $green;
- }
-
-}
-.prev {
- left: 1em;
-}
-.next {
- right:1em;
-}
-
-.tags {
- background: url(../img/bg-tags.png) left no-repeat;
- color: #666666;
- font-family: Arial,sans-serif;
- font-size: 11px;
- line-height: 32px;
- margin: 2px 2px 2px 0;
- overflow: visible;
- padding: 4px 4px 4px 16px;
- text-decoration: none;
- min-width:30px;
- white-space: nowrap;
-}
-
-.hide {
- display:none;
-}
-
-nav {
- float: right;
- font-size:1.5em ;
- padding: 0.25em 0.5em;
- .user {
- font-size:0.5em;
- }
-}
-.session {
- font-size: 100%;
-}
-.session a:hover {
- background:transparent;
-}
-form {
- padding: 1em 2em;
- margin: 0 1em;
- text-align:left;
- p {
- position:relative;
- }
- section{
- margin-bottom:1em;
- width:50%;
- position:relative;
- text-align: left;
- }
-}
-.submit {
- text-align: right;
- padding: 0 1em;
- a {
- line-height:2.5em;
- }
-}
-#formating-help {
- float:right;
- width: 30%;
- font-size: 80%;
- border: 1px solid #FFF;
- border-width:1px 0;
- border-color: #CCC transparent #FFF;
-
-}
-#formating-help caption {
- margin: 0 0 1em -2em;
- text-align: left;
-}
-#formating-help td {
- vertical-align: top;
- border: 1px solid #FFF;
- border-width:1px 0;
- border-color: #FFF transparent #CCC;
- padding: 0.25em;
-}
-
-
-input,
-textarea{
- border: 1px solid #000;
- font: 1em sans-serif;
- padding: 0.25em;
- border-radius: 3px;
-}
-textarea {
- font-size:1.5em;
- height:5em;
- width:20em;
-}
-input[type='email']:focus,
-input[type='password']:focus,
-input[type='text']:focus,
-textarea:focus{
- border: 1px solid #0C6;
- outline:0 !important;
- box-shadow: 0 0 2px #FC0;
-}
-.error input,
-.error textarea {
- border: 1px solid #C60!important;
- box-shadow: 0 0 2px #F00!important;
-}
-.errorlist{
- @include tooltip();
-}
-
-label {
- display:block;
- margin: 0.5em 0 0;
- font-size:80%;
-}
-form span {
- font-size:80%;
-}
-.required label {
- font-weight:bold;
- color:#C60;
-}
-input[type='submit'] {
- @include button;
-}
-#leak-form input[type='submit'] {
- float:left;
-}
-#id_title, #id_description {
- width: 100%;
-}
-.ui-autocomplete {
- list-style: none;
- position:fixed !important;
- background: #FFF;
- width: 10em;
- padding:0;
- margin:0;
-}
-.ui-autocomplete a {
- display:block;
- font-size:80%;
- padding: 0.5em;
-}
-.ui-state-hover {
- background:#0C6;
- color:#FFF;
-}
-#login-form {
- float:left;
-}
-#register-form {
- float:left;
- width: 40%;
- padding:1em;
- h3 {
- text-align: center;
- }
-}
-#id_description.hover {
- border:3px solid #900;
- background: #EEE;
-}
-.hidden-detail {
- display:none !important;
-}
-.login {
- display:inline-block;
- padding: 0.25em 1em ;
- font-weight: bold;
- border-radius:3px;
- color: white;
- &:hover {
- text-shadow: none;
- }
-}
-.login.facebook {
- @include gradient(#3B5998)
-
-}
-.login.google {
- @include gradient(#F90101)
-}
\ No newline at end of file
diff --git a/ltmo/settings.py b/ltmo/settings.py
index b9a5eb6..5c5577e 100644
--- a/ltmo/settings.py
+++ b/ltmo/settings.py
@@ -1,11 +1,13 @@
# -*- coding: utf-8 -*-
import os
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
-BASE_DIR = os.path.dirname(__file__)
+BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+
ADMINS = (
('etnalubma', 'francisco.herrero@gmail.com'),
@@ -18,25 +20,19 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'ltmo.db'),
- 'TEST_NAME': os.path.join(BASE_DIR, 'test_ltmo.db'),
+ 'NAME': os.path.join(BASE_DIR, 'ltmo.sqlite3'),
}
}
-SOUTH_TESTS_MIGRATE = False
-
+ALLOWED_HOSTS = []
TIME_ZONE = 'America/Chicago'
-LANGUAGE_CODE = 'es-AR' # Using Guarani, Of Course
-
-SITE_ID = 1
+SECRET_KEY = '7$57#ttr-tzqr*dt$l7vac0xt&1+i=gi^-y8bnsba$i%ci^nrd'
+LANGUAGE_CODE = 'es-AR' # Using Guarani, Of Course
USE_I18N = True
-
USE_L10N = True
-ROOT_URLCONF = 'ltmo.urls'
-
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
UPLOAD_DIR = os.path.join(MEDIA_ROOT, 'upload')
@@ -45,75 +41,68 @@
MEDIA_URL = '/media/'
-ADMIN_MEDIA_PREFIX = '/static/admin/'
-
-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
-
STATIC_URL = '/static/'
-
-# Additional locations of static files
-STATICFILES_DIRS = (
-)
-
-STATICFILES_FINDERS = (
- 'django.contrib.staticfiles.finders.FileSystemFinder',
- 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
-# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
-)
+STATIC_ROOT = os.path.join(BASE_DIR, 'staic')
AUTH_PROFILE_MODULE = 'auth.User'
LOGIN_REDIRECT_URL = '/~'
-REGISTRATION_BACKEND = 'registration.backends.default.DefaultBackend'
-SOCIAL_AUTH_CREATE_USERS = True
-SOCIAL_AUTH_FORCE_RANDOM_USERNAME = False
-LOGIN_ERROR_URL = '/login/error/'
-SOCIAL_AUTH_ERROR_KEY = 'socialauth_error'
-SOCIAL_AUTH_ENABLED_BACKENDS=('facebook', 'google')
-SOCIAL_AUTH_COMPLETE_URL_NAME='socialauth_complete'
-SOCIAL_AUTH_ASSOCIATE_URL_NAME='associate_complete'
-SOCIAL_AUTH_DEFAULT_USERNAME= lambda u: slugify(u)
-SOCIAL_AUTH_EXTRA_DATA=False
-SOCIAL_AUTH_CHANGE_SIGNAL_ONLY=True
-SOCIAL_AUTH_ASSOCIATE_BY_MAIL=True
-
ACCOUNT_ACTIVATION_DAYS = 2
-SECRET_KEY = '7$57#ttr-tzqr*dt$l7vac0xt&1+i=gi^-y8bnsba$i%ci^nrd'
PAGINATION_DEFAULT_WINDOW = 2
-
FORCE_LOWERCASE_TAGS = True
-
AUTHENTICATION_BACKENDS = (
- 'social_auth.backends.facebook.FacebookBackend',
- 'social_auth.backends.google.GoogleBackend',
+ 'social.backends.facebook.FacebookOAuth2',
+ 'social.backends.google.GoogleOAuth2',
'django.contrib.auth.backends.ModelBackend',
)
MIDDLEWARE_CLASSES = (
'debug_toolbar.middleware.DebugToolbarMiddleware',
- 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
- 'pagination.middleware.PaginationMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
-TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.Loader',
- 'django.template.loaders.app_directories.Loader',
+MIDDLEWARE_CLASSES = (
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+ 'django.middleware.security.SecurityMiddleware',
)
-TEMPLATE_CONTEXT_PROCESSORS = (
- 'django.core.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'social_auth.context_processors.social_auth_backends',
- 'django.contrib.messages.context_processors.messages',
-)
+ROOT_URLCONF = 'ltmo.urls'
-TEMPLATE_DIRS = (
- 'templates',
- os.path.join(BASE_DIR, 'templates')
-)
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [
+ 'templates',
+ os.path.join(BASE_DIR, 'templates')
+ ],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'social.apps.django_app.context_processors.backends',
+ 'social.apps.django_app.context_processors.login_redirect',
+
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
+WSGI_APPLICATION = 'ltmo.wsgi.application'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
@@ -122,29 +111,28 @@
LOGOUT_URL = '/logout'
INSTALLED_APPS = (
- 'django.contrib.auth',
'django.contrib.admin',
+ 'django.contrib.auth',
'django.contrib.contenttypes',
- 'django.contrib.sessions',
'django.contrib.sites',
- 'django.contrib.staticfiles',
- 'django.contrib.sitemaps',
+ 'django.contrib.sessions',
'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'social.apps.django_app.default',
+ 'rest_framework',
'registration',
- 'social_auth',
'debug_toolbar',
- 'south',
- 'pagination',
- 'tagging',
- 'banners',
- 'ltmo',
+ 'endless_pagination',
+ 'taggit',
+ 'taggit_templatetags',
+ 'banners.apps.BannersAppConfig',
+ 'leaks.apps.LeakAppConfig',
)
-# XXX: Remove this
-# Modify temporarily the session serializer because the json serializer in
-# Django 1.6 can't serialize openid.yadis.manager.YadisServiceManager objects
-SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
+TAGGIT_TAGCLOUD_MIN = 1.0
+TAGGIT_TAGCLOUD_MAX = 0.6
+SOCIAL_AUTH_CLEAN_USERNAMES = False
try:
- from local_settings import *
+ from .local_settings import *
except ImportError:
pass
diff --git a/ltmo/static/css/fontawesome.css b/ltmo/static/css/fontawesome.css
deleted file mode 100644
index 364f97a..0000000
--- a/ltmo/static/css/fontawesome.css
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Font Awesome 3.0.2
- * the iconic font designed for use with Twitter Bootstrap
- * -------------------------------------------------------
- * The full suite of pictographic icons, examples, and documentation
- * can be found at: http://fortawesome.github.com/Font-Awesome/
- *
- * License
- * -------------------------------------------------------
- * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL
- * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License -
- * http://opensource.org/licenses/mit-license.html
- * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/
- * - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
- *
- * Contact
- * -------------------------------------------------------
- * Email: dave@davegandy.com
- * Twitter: http://twitter.com/fortaweso_me
- * Work: Lead Product Designer @ http://kyruus.com
- */
-@font-face { font-family: 'FontAwesome'; src: url("/fontawesome-webfont.eot?v=3.0.1"); src: url("/fontawesome-webfont.eot?#iefix&v=3.0.1") format("embedded-opentype"), url("/fontawesome-webfont.woff?v=3.0.1") format("woff"), url("/fontawesome-webfont.ttf?v=3.0.1") format("truetype"); font-weight: normal; font-style: normal; }
-
-/* Font Awesome styles ------------------------------------------------------- */
-[class^="icon-"], [class*=" icon-"] { font-family: FontAwesome; font-weight: normal; font-style: normal; text-decoration: inherit; -webkit-font-smoothing: antialiased; /* sprites.less reset */ display: inline; width: auto; height: auto; line-height: normal; vertical-align: baseline; background-image: none; background-position: 0% 0%; background-repeat: repeat; margin-top: 0; }
-
-/* more sprites.less reset */
-.icon-white, .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], .nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], .dropdown-submenu:hover > a > [class*=" icon-"] { background-image: none; }
-
-[class^="icon-"]:before, [class*=" icon-"]:before { text-decoration: inherit; display: inline-block; speak: none; }
-
-/* makes sure icons active on rollover in links */
-a [class^="icon-"], a [class*=" icon-"] { display: inline-block; }
-
-/* makes the font 33% larger relative to the icon container */
-.icon-large:before { vertical-align: -10%; font-size: 1.3333333333333333em; }
-
-.btn [class^="icon-"], .btn [class*=" icon-"], .nav [class^="icon-"], .nav [class*=" icon-"] { display: inline; /* keeps button heights with and without icons the same */ }
-.btn [class^="icon-"].icon-large, .btn [class*=" icon-"].icon-large, .nav [class^="icon-"].icon-large, .nav [class*=" icon-"].icon-large { line-height: .9em; }
-.btn [class^="icon-"].icon-spin, .btn [class*=" icon-"].icon-spin, .nav [class^="icon-"].icon-spin, .nav [class*=" icon-"].icon-spin { display: inline-block; }
-
-.nav-tabs [class^="icon-"], .nav-tabs [class*=" icon-"], .nav-pills [class^="icon-"], .nav-pills [class*=" icon-"] { /* keeps button heights with and without icons the same */ }
-.nav-tabs [class^="icon-"], .nav-tabs [class^="icon-"].icon-large, .nav-tabs [class*=" icon-"], .nav-tabs [class*=" icon-"].icon-large, .nav-pills [class^="icon-"], .nav-pills [class^="icon-"].icon-large, .nav-pills [class*=" icon-"], .nav-pills [class*=" icon-"].icon-large { line-height: .9em; }
-
-li [class^="icon-"], li [class*=" icon-"], .nav li [class^="icon-"], .nav li [class*=" icon-"] { display: inline-block; width: 1.25em; text-align: center; }
-li [class^="icon-"].icon-large, li [class*=" icon-"].icon-large, .nav li [class^="icon-"].icon-large, .nav li [class*=" icon-"].icon-large { /* increased font size for icon-large */ width: 1.5625em; }
-
-ul.icons { list-style-type: none; text-indent: -0.75em; }
-ul.icons li [class^="icon-"], ul.icons li [class*=" icon-"] { width: .75em; }
-
-.icon-muted { color: #eeeeee; }
-
-.icon-border { border: solid 1px #eeeeee; padding: .2em .25em .15em; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
-
-.icon-2x { font-size: 2em; }
-.icon-2x.icon-border { border-width: 2px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; }
-
-.icon-3x { font-size: 3em; }
-.icon-3x.icon-border { border-width: 3px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
-
-.icon-4x { font-size: 4em; }
-.icon-4x.icon-border { border-width: 4px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; }
-
-.pull-right { float: right; }
-
-.pull-left { float: left; }
-
-[class^="icon-"].pull-left, [class*=" icon-"].pull-left { margin-right: .3em; }
-[class^="icon-"].pull-right, [class*=" icon-"].pull-right { margin-left: .3em; }
-
-.btn [class^="icon-"].pull-left.icon-2x, .btn [class^="icon-"].pull-right.icon-2x, .btn [class*=" icon-"].pull-left.icon-2x, .btn [class*=" icon-"].pull-right.icon-2x { margin-top: .18em; }
-.btn [class^="icon-"].icon-spin.icon-large, .btn [class*=" icon-"].icon-spin.icon-large { line-height: .8em; }
-
-.btn.btn-small [class^="icon-"].pull-left.icon-2x, .btn.btn-small [class^="icon-"].pull-right.icon-2x, .btn.btn-small [class*=" icon-"].pull-left.icon-2x, .btn.btn-small [class*=" icon-"].pull-right.icon-2x { margin-top: .25em; }
-
-.btn.btn-large [class^="icon-"], .btn.btn-large [class*=" icon-"] { margin-top: 0; }
-.btn.btn-large [class^="icon-"].pull-left.icon-2x, .btn.btn-large [class^="icon-"].pull-right.icon-2x, .btn.btn-large [class*=" icon-"].pull-left.icon-2x, .btn.btn-large [class*=" icon-"].pull-right.icon-2x { margin-top: .05em; }
-.btn.btn-large [class^="icon-"].pull-left.icon-2x, .btn.btn-large [class*=" icon-"].pull-left.icon-2x { margin-right: .2em; }
-.btn.btn-large [class^="icon-"].pull-right.icon-2x, .btn.btn-large [class*=" icon-"].pull-right.icon-2x { margin-left: .2em; }
-
-.icon-spin { display: inline-block; -moz-animation: spin 2s infinite linear; -o-animation: spin 2s infinite linear; -webkit-animation: spin 2s infinite linear; animation: spin 2s infinite linear; }
-
-@-moz-keyframes spin { 0% { -moz-transform: rotate(0deg); }
- 100% { -moz-transform: rotate(359deg); } }
-
-@-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(359deg); } }
-
-@-o-keyframes spin { 0% { -o-transform: rotate(0deg); }
- 100% { -o-transform: rotate(359deg); } }
-
-@-ms-keyframes spin { 0% { -ms-transform: rotate(0deg); }
- 100% { -ms-transform: rotate(359deg); } }
-
-@keyframes spin { 0% { transform: rotate(0deg); }
- 100% { transform: rotate(359deg); } }
-
-@-moz-document url-prefix() { .icon-spin { height: .9em; }
- .btn .icon-spin { height: auto; }
- .icon-spin.icon-large { height: 1.25em; }
- .btn .icon-spin.icon-large { height: .75em; } }
-
-.icon-user:before { content: "\f021"; }
-
-.icon-home:before { content: "\f022"; }
-
-.icon-tag:before { content: "\f023"; }
-
-.icon-tint:before { content: "\f024"; }
-
-.icon-question-sign:before { content: "\f025"; }
-
-.icon-angle-left:before { content: "\f026"; }
-
-.icon-angle-right:before { content: "\f027"; }
diff --git a/ltmo/static/css/style.css b/ltmo/static/css/style.css
deleted file mode 100644
index e8589c7..0000000
--- a/ltmo/static/css/style.css
+++ /dev/null
@@ -1,211 +0,0 @@
-@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono);
-.codehilite { background-color: #002b36; padding: 0.5em 2em; margin: 0 -2em; border-radius: 3px; }
-.codehilite .ge { font-style: italic; }
-.codehilite .gs { font-weight: bold; }
-.codehilite .hll { background-color: #073642; }
-.codehilite .err { border: 1px solid #dc322f; }
-.codehilite .gr { color: #dc322f; }
-.codehilite .gd { color: #dc322f; }
-.codehilite .gi { color: #859900; }
-.codehilite .o, .codehilite .p { color: #657b83; }
-.codehilite .go { color: #839496; }
-.codehilite .w { color: #93a1a1; }
-.codehilite .nd { color: #586e75; font-weight: bold; }
-.codehilite .cm, .codehilite .c1, .codehilite .c { color: #2aa198; font-style: italic; }
-.codehilite .cs { color: #2aa198; background-color: #073642; }
-.codehilite .gh, .codehilite .nt { color: #cb4b16; font-weight: bold; }
-.codehilite .nf { color: #d33682; }
-.codehilite .m, .codehilite .mf, .codehilite .mh, .codehilite .mi, .codehilite .mo, .codehilite .il { color: #b58900; }
-.codehilite .s, .codehilite .sh, .codehilite .s2, .codehilite .s1, .codehilite .sc, .codehilite .sb { color: #859900; }
-.codehilite .na, .codehilite .sd, .codehilite .se { color: #b58900; }
-.codehilite .sd { font-style: italic; }
-.codehilite .se { font-weight: bold; }
-.codehilite .ss { color: #cb4b16; }
-.codehilite .si { color: #cb4b16; font-style: italic; }
-.codehilite .cp { color: #268bd2; }
-.codehilite .bp, .codehilite .nb, .codehilite .ne { color: #268bd2; }
-.codehilite .ow { color: #268bd2; font-weight: bold; }
-.codehilite .nn, .codehilite .nx, .codehilite .nc, .codehilite .nl { color: #268bd2; font-weight: bold; }
-.codehilite .k, .codehilite .kc, .codehilite .kd, .codehilite .kn, .codehilite .kr { color: #6c71c4; font-weight: bold; }
-.codehilite .kp { color: #6c71c4; }
-.codehilite .nv, .codehilite .vc, .codehilite .vg, .codehilite .vi, .codehilite .ni { color: #cb4b16; }
-.codehilite .ni { font-weight: bold; }
-.codehilite .gt { color: #0040d0; }
-.codehilite .sr { color: #235388; }
-.codehilite .no { color: #60add5; }
-.codehilite .gu { color: #800080; font-weight: bold; }
-.codehilite .kt { color: #902000; }
-.codehilite .sx { color: #c65d09; }
-.codehilite .gp { color: #c65d09; font-weight: bold; }
-
-* { box-sizing: content-box; }
-
-.wrapper { padding: 0.5em 1em; overflow: overlay; }
-
-body { font: 100% "Droid Sans", sans-serif; background: #EEE; padding: 0; margin: 0; }
-
-header, section, footer, article, aside { display: block; padding: 0; margin-bottom: 2em; }
-
-header { width: 100%; padding: 0; margin: 0; position: fixed; background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); background-image: -ms-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); top: 0; left: 0; z-index: 9999; box-shadow: 0 1px 2px #555555; background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); background-image: -ms-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(230, 230, 230, 0.7)); }
-header .wrapper { padding: 0 1em; }
-
-footer { clear: both; padding: 5em 1em 1em; font-size: 80%; }
-
-#main { margin: 4em 0 0; clear: both; position: relative; }
-
-#help { padding: 1em; background: white; width: 25em; float: none; position: absolute; top: 1em; right: 0; box-shadow: 0 1px 1px black; border-radius: 3px; border: 1px solid #eeeeee; background: #FFF; }
-
-section { display: block; text-align: center; }
-section article { text-align: left; position: relative; margin: 2em auto; width: 40em; }
-section article p { color: #000; text-shadow: 0 1px 1px white; }
-section .leak:before { content: ''; display: inline-block; height: 100%; vertical-align: middle; margin-right: -0.25em; /* Adjusts for spacing */ }
-section .leak article { display: inline-block; vertical-align: middle; margin: 2em auto 0; }
-
-article img, article object { display: block; margin: 0.5em auto; }
-
-article object { max-width: 90%; }
-
-.slot { text-align: center; }
-
-.detail { text-align: right; font-size: 80%; display: block; color: #555; }
-
-#detail { position: fixed; font-size: 80%; bottom: 0; width: 100%; padding: 0; left: 0; margin: 0; }
-#detail p { padding: 0 3em; margin: 0; }
-
-#metadata { float: right; text-align: right; }
-
-#tagcloud { position: absolute; bottom: 0; text-align: left; margin-top: -1em !important; }
-
-aside { text-align: left; width: 20%; position: absolute; font-size: 80%; top: 4em; right: 1em; }
-
-pre, code { font: 110% "Droid Sans Mono", monospace; white-space: pre-wrap; color: #93a1a1; }
-
-blockquote { font: italic 150% "Georgia-MS", Georgia, serif; width: 70%; margin: 1em auto; }
-
-a { border: 1px solid transparent; text-decoration: none; color: #268bd2; }
-a:hover { text-shadow: 0 -1px 0 white, 0 1px 1px black; }
-
-a img { border: 0; }
-
-em { font: italic 100% "Georgia-MS", Georgia, serif; }
-
-h1, h2, h3, h1 a, h2 a, h3 a { font-weight: normal; }
-
-h1 { font-weight: normal; }
-
-h1 .pilcrow { font-size: 70%; display: none; vertical-align: top; }
-
-h1:hover .pilcrow { display: inline; }
-
-h2 { font-size: 180%; }
-
-#wrapper { margin: 0 auto; text-align: left; background: rgba(255, 255, 255, 0.8); border-radius: 15px 15px 0 0; }
-
-#logo { margin: 0; padding: 0.2em 0; color: #555; font-size: 1.6em; }
-
-#banner-header { float: right; margin: 0.5em 0; }
-
-#banner-content { text-align: center; width: 730px; margin: 0 auto; }
-
-#banner-aside { margin-top: 15px; }
-
-#author { margin: 1em 0; }
-
-#author details { font-size: 13px; margin: -1.5em 0; text-align: left; }
-
-#messages { text-align: left; background: #FE9; border: 1px solid #ffcc00; font-size: 80%; margin: 0; padding: 0 1em; position: fixed; left: 0; top: 0; width: 100%; z-index: 100; list-style: none; }
-
-#messages li { padding: 0.25em 2em; position: relative; }
-
-#messages .control { position: absolute; right: 4em; }
-
-.rewind { position: absolute; bottom: 5em; right: 10em; }
-
-.banner { clear: both; position: relative; padding: 1em; }
-
-.gravatar { float: left; margin-right: 0.5em; }
-
-.caption { margin: 0; padding: 1em; border-color: transparent transparent #eeeeee; border-style: solid; border-width: 0 0 1px; }
-
-.clear { display: block; clear: both; }
-
-.pager { display: block; position: fixed; top: 0; padding: 0; height: 100%; width: 3em; outline: 0; }
-.pager strong { -moz-transition: all 0.3s; -webkit-transition: all 0.3s; transition: all 0.3s; position: fixed; display: block; padding: 2px 5px; margin-top: 0; top: 50%; font-size: 2em; color: rgba(100, 100, 100, 0.5); font-size: 4em; }
-.pager:hover strong { -moz-transition: all 0.1s; -webkit-transition: all 0.1s; transition: all 0.1s; font-size: 8em; margin-top: -0.25em; color: #859900; }
-
-.prev { left: 1em; }
-
-.next { right: 1em; }
-
-.tags { background: url(../img/bg-tags.png) left no-repeat; color: #666666; font-family: Arial,sans-serif; font-size: 11px; line-height: 32px; margin: 2px 2px 2px 0; overflow: visible; padding: 4px 4px 4px 16px; text-decoration: none; min-width: 30px; white-space: nowrap; }
-
-.hide { display: none; }
-
-nav { float: right; font-size: 1.5em; padding: 0.25em 0.5em; }
-nav .user { font-size: 0.5em; }
-
-.session { font-size: 100%; }
-
-.session a:hover { background: transparent; }
-
-form { padding: 1em 2em; margin: 0 1em; text-align: left; }
-form p { position: relative; }
-form section { margin-bottom: 1em; width: 50%; position: relative; text-align: left; }
-
-.submit { text-align: right; padding: 0 1em; }
-.submit a { line-height: 2.5em; }
-
-#formating-help { float: right; width: 30%; font-size: 80%; border: 1px solid white; border-width: 1px 0; border-color: #cccccc transparent white; }
-
-#formating-help caption { margin: 0 0 1em -2em; text-align: left; }
-
-#formating-help td { vertical-align: top; border: 1px solid white; border-width: 1px 0; border-color: white transparent #cccccc; padding: 0.25em; }
-
-input, textarea { border: 1px solid black; font: 1em sans-serif; padding: 0.25em; border-radius: 3px; }
-
-textarea { font-size: 1.5em; height: 5em; width: 20em; }
-
-input[type='email']:focus, input[type='password']:focus, input[type='text']:focus, textarea:focus { border: 1px solid #00cc66; outline: 0 !important; box-shadow: 0 0 2px #ffcc00; }
-
-.error input, .error textarea { border: 1px solid #cc6600 !important; box-shadow: 0 0 2px red !important; }
-
-.errorlist { list-style: none; font-size: 80%; margin: 0; background: #dc322f; padding: 2px 4px; border-radius: 5px; color: #FFF; text-shadow: 0 1px 0 black; z-index: 99999; position: absolute; left: 8em; border: 1px solid transparent; }
-.errorlist:after, .errorlist:before { right: 100%; top: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; }
-.errorlist:after { border-color: rgba(136, 183, 213, 0); border-right-color: #dc322f; border-width: 5px; margin-top: -5px; }
-.errorlist:before { border-color: rgba(194, 225, 245, 0); border-right-color: transparent; border-width: 7px; margin-top: -7px; }
-
-label { display: block; margin: 0.5em 0 0; font-size: 80%; }
-
-form span { font-size: 80%; }
-
-.required label { font-weight: bold; color: #C60; }
-
-input[type='submit'] { background-image: -webkit-linear-gradient(top, #859900, #596600); background-image: -moz-linear-gradient(top, #859900, #596600); background-image: -ms-linear-gradient(top, #859900, #596600); background-image: -o-linear-gradient(top, #859900, #596600); -moz-transition: all 0.3s; -webkit-transition: all 0.3s; transition: all 0.3s; border: none; border-radius: 5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 1px rgba(0, 0, 0, 0.05); padding: 2px 6px; font-size: 1.2em; text-shadow: 0 1px 1px #333333; margin: 0 0.3em; color: white; }
-input[type='submit']:active { -moz-transition: all 0.1s; -webkit-transition: all 0.1s; transition: all 0.1s; background-image: -webkit-linear-gradient("bottom", #859900, #596600); background-image: -moz-linear-gradient("bottom", #859900, #596600); background-image: -ms-linear-gradient("bottom", #859900, #596600); background-image: -o-linear-gradient("bottom", #859900, #596600); }
-input[type='submit']:hover { -moz-transition: all 0.4s; -webkit-transition: all 0.4s; transition: all 0.4s; text-shadow: 0 1px 0 black; cursor: pointer!important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), -1px 1px 3px rgba(0, 0, 0, 0.5); }
-
-#leak-form input[type='submit'] { float: left; }
-
-#id_title, #id_description { width: 100%; }
-
-.ui-autocomplete { list-style: none; position: fixed !important; background: #FFF; width: 10em; padding: 0; margin: 0; }
-
-.ui-autocomplete a { display: block; font-size: 80%; padding: 0.5em; }
-
-.ui-state-hover { background: #0C6; color: #FFF; }
-
-#login-form { float: left; }
-
-#register-form { float: left; width: 40%; padding: 1em; }
-#register-form h3 { text-align: center; }
-
-#id_description.hover { border: 3px solid #990000; background: #EEE; }
-
-.hidden-detail { display: none !important; }
-
-.login { display: inline-block; padding: 0.25em 1em; font-weight: bold; border-radius: 3px; color: white; }
-.login:hover { text-shadow: none; }
-
-.login.facebook { background-image: -webkit-linear-gradient(top, #3b5998, #2d4373); background-image: -moz-linear-gradient(top, #3b5998, #2d4373); background-image: -ms-linear-gradient(top, #3b5998, #2d4373); background-image: -o-linear-gradient(top, #3b5998, #2d4373); }
-
-.login.google { background-image: -webkit-linear-gradient(top, #f90101, #c60101); background-image: -moz-linear-gradient(top, #f90101, #c60101); background-image: -ms-linear-gradient(top, #f90101, #c60101); background-image: -o-linear-gradient(top, #f90101, #c60101); }
diff --git a/ltmo/static/favicon.ico b/ltmo/static/favicon.ico
deleted file mode 100644
index 8b75168..0000000
Binary files a/ltmo/static/favicon.ico and /dev/null differ
diff --git a/ltmo/static/fonts/fontawesome-webfont.afm b/ltmo/static/fonts/fontawesome-webfont.afm
deleted file mode 100644
index c285706..0000000
--- a/ltmo/static/fonts/fontawesome-webfont.afm
+++ /dev/null
@@ -1,25 +0,0 @@
-StartFontMetrics 2.0
-Comment Generated by FontForge 20120731
-Comment Creation Date: Sun Nov 10 23:21:22 2013
-FontName fontawesome
-FullName fontawesome
-FamilyName fontawesome
-Weight Book
-Notice (Created by root with FontForge 2.0 (http://fontforge.sf.net))
-ItalicAngle 0
-IsFixedPitch false
-UnderlinePosition -170.667
-UnderlineThickness 85.3333
-Version 001.000
-EncodingScheme ISO10646-1
-FontBBox 0 -75 960 863
-StartCharMetrics 7
-C -1 ; WX 824 ; N user ; B 0 -75 825 825 ;
-C -1 ; WX 974 ; N home ; B 15 0 960 752 ;
-C -1 ; WX 899 ; N tag ; B 0 -63 888 825 ;
-C -1 ; WX 599 ; N tint ; B 0 0 600 863 ;
-C -1 ; WX 899 ; N question-sign ; B 0 -75 900 825 ;
-C -1 ; WX 374 ; N angle-left ; B 26 45 368 630 ;
-C -1 ; WX 374 ; N angle-right ; B 7 45 349 630 ;
-EndCharMetrics
-EndFontMetrics
diff --git a/ltmo/static/fonts/fontawesome-webfont.eot b/ltmo/static/fonts/fontawesome-webfont.eot
deleted file mode 100644
index 28c5267..0000000
Binary files a/ltmo/static/fonts/fontawesome-webfont.eot and /dev/null differ
diff --git a/ltmo/static/fonts/fontawesome-webfont.ttf b/ltmo/static/fonts/fontawesome-webfont.ttf
deleted file mode 100644
index a9e8c81..0000000
Binary files a/ltmo/static/fonts/fontawesome-webfont.ttf and /dev/null differ
diff --git a/ltmo/static/fonts/fontawesome-webfont.woff b/ltmo/static/fonts/fontawesome-webfont.woff
deleted file mode 100644
index 6d13796..0000000
Binary files a/ltmo/static/fonts/fontawesome-webfont.woff and /dev/null differ
diff --git a/ltmo/static/img/add.png b/ltmo/static/img/add.png
deleted file mode 100644
index 62bc974..0000000
Binary files a/ltmo/static/img/add.png and /dev/null differ
diff --git a/ltmo/static/img/apply.png b/ltmo/static/img/apply.png
deleted file mode 100644
index a3ea7ff..0000000
Binary files a/ltmo/static/img/apply.png and /dev/null differ
diff --git a/ltmo/static/img/arrows.png b/ltmo/static/img/arrows.png
deleted file mode 100644
index 5ddad0c..0000000
Binary files a/ltmo/static/img/arrows.png and /dev/null differ
diff --git a/ltmo/static/img/bg-tags.png b/ltmo/static/img/bg-tags.png
deleted file mode 100644
index 0533498..0000000
Binary files a/ltmo/static/img/bg-tags.png and /dev/null differ
diff --git a/ltmo/static/img/favicon.ico b/ltmo/static/img/favicon.ico
deleted file mode 100644
index 8b75168..0000000
Binary files a/ltmo/static/img/favicon.ico and /dev/null differ
diff --git a/ltmo/static/img/help.png b/ltmo/static/img/help.png
deleted file mode 100644
index d886f24..0000000
Binary files a/ltmo/static/img/help.png and /dev/null differ
diff --git a/ltmo/static/img/home.png b/ltmo/static/img/home.png
deleted file mode 100644
index fe5ee78..0000000
Binary files a/ltmo/static/img/home.png and /dev/null differ
diff --git a/ltmo/static/img/login.png b/ltmo/static/img/login.png
deleted file mode 100644
index 891b739..0000000
Binary files a/ltmo/static/img/login.png and /dev/null differ
diff --git a/ltmo/static/img/logout.png b/ltmo/static/img/logout.png
deleted file mode 100644
index cec193c..0000000
Binary files a/ltmo/static/img/logout.png and /dev/null differ
diff --git a/ltmo/static/js/jquery.js b/ltmo/static/js/jquery.js
deleted file mode 100644
index 198b3ff..0000000
--- a/ltmo/static/js/jquery.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.1 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;ca",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o=""+"",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
-f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
-{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>$2>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/
diff --git a/templates/banner.html b/templates/banner.html
new file mode 100644
index 0000000..e69de29
diff --git a/ltmo/templates/banners.html b/templates/banners.html
similarity index 96%
rename from ltmo/templates/banners.html
rename to templates/banners.html
index 914c1b9..0328621 100644
--- a/ltmo/templates/banners.html
+++ b/templates/banners.html
@@ -13,7 +13,7 @@ Publicidad
-
+
{% endmacro %}
{% macro content %}
@@ -46,7 +46,7 @@
Publicidad
{% endmacro %}
-{% macro twitter %}
+{% macro twitter %}
{% endmacro %}
diff --git a/ltmo/templates/detail.html b/templates/detail.html
similarity index 71%
rename from ltmo/templates/detail.html
rename to templates/detail.html
index 0aa8f7c..60431d4 100644
--- a/ltmo/templates/detail.html
+++ b/templates/detail.html
@@ -1,5 +1,5 @@
{% extends 'layout.html' %}
-{% load banner_tags tagging_tags %}
+{% load banner_tags %}
{% block title %}
{{object.title}}
{% endblock %}
@@ -16,21 +16,12 @@
{{object.rendered|safe}}
-
-
- {% tag_cloud_for_model ltmo.Leak as cloud with steps=20 min_count=8 distribution=log %}
- {% for tag in cloud %}
- {{tag}}
- {% endfor %}
-
+
{{object.title}}
- {% tags_for_object object as tag_list %}
- ~{{object.author}},
- {{object.created|date}},
- {% for tag in tag_list %}{{tag}}, {%endfor%}
+ ~{{object.author}},
+ {{object.created|date}},
+ {% for tag in object.tags.all %}{{tag}}, {%endfor%}
#{{object.pk}}
{{object.metadata}}
{% if user.is_staff %}editar{% endif %}
@@ -57,4 +48,3 @@
No hay derrames ahún
{% pop_slot 'content' %}
{% endblock %}
-
diff --git a/templates/feeds/description.html b/templates/feeds/description.html
new file mode 100644
index 0000000..b06acd3
--- /dev/null
+++ b/templates/feeds/description.html
@@ -0,0 +1,8 @@
+
+ ~{{obj.author}},
+ {{obj.created|date}},
+ {% for tag in object.tags %}{{tag}}, {%endfor%}
+ #{{obj.pk}}
+ {{obj.metadata}}
+
+ {{obj.rendered|safe|truncatewords_html:'150'}}
diff --git a/ltmo/templates/help.html b/templates/help.html
similarity index 100%
rename from ltmo/templates/help.html
rename to templates/help.html
diff --git a/ltmo/templates/index.html b/templates/index.html
similarity index 84%
rename from ltmo/templates/index.html
rename to templates/index.html
index bdd11f8..e6b8c62 100644
--- a/ltmo/templates/index.html
+++ b/templates/index.html
@@ -1,6 +1,6 @@
{% extends "layout.html" %}
{% block content %}
- {% autopaginate object_list 10 %}
+ {% paginate object_list 10 %}
{% for object in object_list %}
{% include 'leak.html' %}
{% if forloop.counter == 5 %}{% pop_slot 'content' %}{% endif %}
@@ -9,5 +9,5 @@
No hay derrames ahún
{% endfor %}
- {% paginate %}
+ {% show_pages %}
{% endblock %}
diff --git a/ltmo/templates/layout.html b/templates/layout.html
similarity index 61%
rename from ltmo/templates/layout.html
rename to templates/layout.html
index 9b389c7..b8eb3a8 100644
--- a/ltmo/templates/layout.html
+++ b/templates/layout.html
@@ -1,5 +1,7 @@
-{% load tagging_tags pagination_tags banner_tags %}
+{% load banner_tags %}
+{% load staticfiles %}
+
@@ -10,14 +12,12 @@
-
-
-
-
-
+
+
{% pop_slot 'analytics' %}
+
-
+
+
-
-
+
+
+ {% if 'GET' in allowed_methods %}
+
+ {% endif %}
+
+ {% if options_form %}
+
+ {% endif %}
+
+ {% if delete_form %}
+
+ {% endif %}
+
+
+
+
+ {% block description %}
+ {{ description }}
+ {% endblock %}
+
+
+ {% if paginator %}
+
+ {% endif %}
+
+
+
{{ request.method }} {{ request.get_full_path }}
+
+
+
HTTP {{ response.status_code }} {{ response.status_text }}{% autoescape off %}
+{% for key, val in response_headers.items %}{{ key }}: {{ val|break_long_headers|urlize_quoted_links }}
+{% endfor %}
+{{ content|urlize_quoted_links }}{% endautoescape %}
+
+
+
+ {% if display_edit_forms %}
+
+ {% if post_form or raw_data_post_form %}
+
+ {% if post_form %}
+
+ {% endif %}
+
+ {% if post_form %}
+
+ {% with form=post_form %}
+
+ {% endwith %}
+
+ {% endif %}
+
+ {% with form=raw_data_post_form %}
+
+ {% endwith %}
+
+
+
+ {% endif %}
+
+ {% if put_form or raw_data_put_form or raw_data_patch_form %}
+
+ {% if put_form %}
+
+ {% endif %}
+
+ {% if put_form %}
+
+ {% endif %}
+
+ {% with form=raw_data_put_or_patch_form %}
+
+ {% endwith %}
+
+
+
+ {% endif %}
+ {% endif %}
+
+
+
+
+
+ {% block script %}
+
+
+
+
+ {% endblock %}
+
+ {% endblock %}
+
diff --git a/templates/single.html b/templates/single.html
new file mode 100644
index 0000000..16a6372
--- /dev/null
+++ b/templates/single.html
@@ -0,0 +1 @@
+{{banner.render_code}}
diff --git a/templates/slot.html b/templates/slot.html
new file mode 100644
index 0000000..ea3a300
--- /dev/null
+++ b/templates/slot.html
@@ -0,0 +1,3 @@
+{% for banner in banners %}
+{{banner.code|safe}}
+{% endfor %}
diff --git a/ltmo/templates/success.json b/templates/success.json
similarity index 97%
rename from ltmo/templates/success.json
rename to templates/success.json
index 8f22e7b..8ce917a 100644
--- a/ltmo/templates/success.json
+++ b/templates/success.json
@@ -1,6 +1,6 @@
{% if form.errors %}
"form":[
"errors": [{% for error in form.errors %}"{{error|safe}}", {%empty%}"No errors"{% endfor %}],
-{% for field in form %}{"{{field}}":[{% for error in field.errors %}"{{error|safe}}", {%empty%}"No errors"{% endfor %}}{% endfor %}
+{% for field in form %}{"{{field}}":[{% for error in field.errors %}"{{error|safe}}", {%empty%}"No errors"{% endfor %}}{% endfor %}
]{% else %}
{"messages":"No hubo errores, no hubo excesos, son todos asesinos los milicos del proceso", "object_id":"{{object_id}}"}{% endif %}
diff --git a/ltmo/templates/tags.html b/templates/tags.html
similarity index 86%
rename from ltmo/templates/tags.html
rename to templates/tags.html
index 1511460..3d468af 100644
--- a/ltmo/templates/tags.html
+++ b/templates/tags.html
@@ -1,11 +1,11 @@
{% extends 'layout.html' %}
-{% load pagination_tags banner_tags tagging_tags %}
+{% load endless banner_tags %}
{% block logo %}
{{block.super}}{{tag_name|default:'leaks'}}
{% endblock %}
{% block content %}
{% regroup object_list by tags as object_list %}
-{% autopaginate object_list 10 %}
+{% paginate object_list %}
{% for tag in object_list %}
{%if not tag_name%}
@@ -16,5 +16,5 @@
{% endfor %}
{% if forloop.counter == 5 %}{% pop_slot 'content' %}{% endif %}
{% endfor %}
-{% paginate %}
+{% show_pages %}
{% endblock %}