Parcourir la source

Now using compressor and trying to fix test CSRF issue.

tags/v0.4.1
Isaac Bythewood il y a 12 ans
Parent
révision
643224d575
6 fichiers modifiés avec 18 ajouts et 24 suppressions
  1. +10
    -17
      pinry/core/templates/core/base.html
  2. +0
    -3
      pinry/core/tests.py
  3. +0
    -4
      pinry/pins/tests.py
  4. +2
    -0
      pinry/pins/views.py
  5. +3
    -0
      pinry/settings/__init__.py
  6. +3
    -0
      requirements.txt

+ 10
- 17
pinry/core/templates/core/base.html Voir le fichier

@@ -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="http://fonts.googleapis.com/css?family=Monoton">
<link rel="stylesheet" href="/static/core/css/pinry.css">
{% endcompress %}

<link rel="stylesheet" href="/static/core/css/pinry.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Monoton">
</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>

+ 0
- 3
pinry/core/tests.py Voir le fichier

@@ -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()


+ 0
- 4
pinry/pins/tests.py Voir le fichier

@@ -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()


+ 2
- 0
pinry/pins/views.py Voir le fichier

@@ -7,6 +7,8 @@ from .forms import PinForm
from .models import Pin




def recent_pins(request):
return TemplateResponse(request, 'pins/recent_pins.html', None)



+ 3
- 0
pinry/settings/__init__.py Voir le fichier

@@ -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',


+ 3
- 0
requirements.txt Voir le fichier

@@ -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


Chargement…
Annuler
Enregistrer