mirror of
https://github.com/pinry/pinry.git
synced 2026-03-05 03:31:09 +01:00
Now using compressor and trying to fix test CSRF issue.
This commit is contained in:
@@ -1,21 +1,19 @@
|
||||
{% load new_pin %}
|
||||
{% load compress %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ site_name }} - {% block title %}{% endblock %}</title>
|
||||
|
||||
{% if debug %}
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" href="/static/vendor/bootstrap/2.0.3/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/static/vendor/fancybox/2.0.6/jquery.fancybox.css">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="/static/vendor/bootstrap/2.0.3/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/vendor/fancybox/2.0.6/jquery.fancybox.css">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="/static/core/css/pinry.css">
|
||||
{% endcompress %}
|
||||
|
||||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Monoton">
|
||||
|
||||
<link rel="stylesheet" href="/static/core/css/pinry.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top">
|
||||
@@ -46,21 +44,16 @@
|
||||
|
||||
{% new_pin request %}
|
||||
|
||||
{% if debug %}
|
||||
{% compress js %}
|
||||
<script src="/static/vendor/jquery/1.7.2/jquery.js"></script>
|
||||
<script src="/static/vendor/bootstrap/2.0.3/js/bootstrap.js"></script>
|
||||
<script src="/static/vendor/wookmark/0.5/jquery.wookmark.js"></script>
|
||||
<script src="/static/vendor/fancybox/2.0.6/jquery.fancybox.js"></script>
|
||||
<script src="/static/vendor/imagesloaded/2.0.1/jquery.imagesloaded.js"></script>
|
||||
{% else %}
|
||||
<script src="/static/vendor/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script src="/static/vendor/bootstrap/2.0.3/js/bootstrap.min.js"></script>
|
||||
<script src="/static/vendor/wookmark/0.5/jquery.wookmark.min.js"></script>
|
||||
<script src="/static/vendor/fancybox/2.0.6/jquery.fancybox.pack.js"></script>
|
||||
<script src="/static/vendor/imagesloaded/2.0.1/jquery.imagesloaded.min.js"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/core/js/pinry.js"></script>
|
||||
<script src="/static/core/js/messages.js"></script>
|
||||
<script src="/static/core/js/pinry.js"></script>
|
||||
<script src="/static/core/js/messages.js"></script>
|
||||
{% endcompress %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,9 +3,6 @@ from django.test.client import Client
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
|
||||
# pylint: disable-msg=E1103
|
||||
|
||||
|
||||
class HomeTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.client = Client()
|
||||
|
||||
@@ -3,10 +3,6 @@ from django.test.client import Client
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
|
||||
# pylint: disable-msg=E1103
|
||||
# pylint: disable-msg=R0904
|
||||
|
||||
|
||||
class RecentPinsTest(TestCase):
|
||||
def setUp(self):
|
||||
self.client = Client()
|
||||
|
||||
@@ -7,6 +7,8 @@ from .forms import PinForm
|
||||
from .models import Pin
|
||||
|
||||
|
||||
|
||||
|
||||
def recent_pins(request):
|
||||
return TemplateResponse(request, 'pins/recent_pins.html', None)
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ STATIC_URL = '/static/'
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
'compressor.finders.CompressorFinder',
|
||||
)
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
@@ -53,6 +54,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
"pinry.core.context_processors.template_settings",
|
||||
)
|
||||
|
||||
COMPRESS_CSS_FILTERS = ['compressor.filters.cssmin.CSSMinFilter']
|
||||
ROOT_URLCONF = 'pinry.urls'
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
INTERNAL_IPS = ['127.0.0.1']
|
||||
@@ -71,6 +73,7 @@ INSTALLED_APPS = (
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'south',
|
||||
'compressor',
|
||||
'pinry.vendor',
|
||||
'pinry.core',
|
||||
'pinry.pins',
|
||||
|
||||
@@ -2,4 +2,7 @@ Django==1.4
|
||||
South==0.7.4
|
||||
Pillow==1.7.7
|
||||
django-tastypie==0.9.11
|
||||
django_compressor==1.1.2
|
||||
cssmin==0.1.4
|
||||
jsmin==2.0.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user