diff --git a/README.md b/README.md index f975ecd..35acd5c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![Pinry](http://getpinry.com/theme/images/logo-dark.png) +# ![Pinry](https://raw.github.com/pinry/pinry/feeds/logo.png) The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim @@ -52,4 +52,5 @@ for production Django deployment found via Google. ## Current Master Build Status -[ ![Codeship Status for pinry/pinry](https://www.codeship.io/projects/461ebc50-70be-0130-073a-22000a9d07d8/status?branch=master)](https://www.codeship.io/projects/2005) \ No newline at end of file +[ ![Codeship Status for pinry/pinry](https://www.codeship.io/projects/461ebc50-70be-0130-073a-22000a9d07d8/status?branch=master)](https://www.codeship.io/projects/2005) + diff --git a/logo.png b/logo.png index e9ed14f..cf632bd 100644 Binary files a/logo.png and b/logo.png differ diff --git a/pinry/core/feeds.py b/pinry/core/feeds.py index 96fef4e..b56834b 100644 --- a/pinry/core/feeds.py +++ b/pinry/core/feeds.py @@ -31,10 +31,13 @@ class LatestPins(Feed): Doing this as a fix for Django's not including the domain name in enclosure urls. """ - request_type = 'http' - if request.is_secure(): request_type = 'https' - self.domain_name = ''.join([request_type, '://', - get_current_site(request).domain]) + try: + request_type = 'http' + if request.is_secure(): request_type = 'https' + self.domain_name = ''.join([request_type, '://', + get_current_site(request).domain]) + except: + pass def items(self): return Pin.objects.order_by('-published')[:15] diff --git a/pinry/core/tests/__init__.py b/pinry/core/tests/__init__.py index a547926..a2f2474 100644 --- a/pinry/core/tests/__init__.py +++ b/pinry/core/tests/__init__.py @@ -1,4 +1,5 @@ from .api import * from .forms import * from .helpers import PinFactoryTest -from .views import * \ No newline at end of file +from .views import * + diff --git a/pinry/core/tests/helpers.py b/pinry/core/tests/helpers.py index 67435ef..4abc37e 100644 --- a/pinry/core/tests/helpers.py +++ b/pinry/core/tests/helpers.py @@ -16,6 +16,8 @@ TEST_IMAGE_PATH = 'logo.png' class UserFactory(factory.Factory): + FACTORY_FOR = User + username = factory.Sequence(lambda n: 'user_{}'.format(n)) email = factory.Sequence(lambda n: 'user_{}@example.com'.format(n)) @@ -30,6 +32,8 @@ class UserFactory(factory.Factory): class TagFactory(factory.Factory): + FACTORY_FOR = Tag + name = factory.Sequence(lambda n: 'tag_{}'.format(n)) @@ -45,6 +49,8 @@ class ImageFactory(factory.Factory): class PinFactory(factory.Factory): + FACTORY_FOR = Pin + submitter = factory.SubFactory(UserFactory) image = factory.SubFactory(ImageFactory) diff --git a/pinry/urls.py b/pinry/urls.py index 2b044ba..cdcbb2f 100644 --- a/pinry/urls.py +++ b/pinry/urls.py @@ -4,14 +4,12 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns = patterns('', - url(r'', include('pinry.core.urls', namespace='core')), - url(r'', include('pinry.users.urls', namespace='users')), + url(r'', include('pinry.core.urls', namespace='core')), + url(r'', include('pinry.users.urls', namespace='users')), ) + if settings.DEBUG: urlpatterns += staticfiles_urlpatterns() - urlpatterns += patterns('', - url(r'^media/(?P.*)$', 'django.views.static.serve', { - 'document_root': settings.MEDIA_ROOT, - }), - ) \ No newline at end of file + urlpatterns += patterns('', url(r'^media/(?P.*)$', + 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,}),) diff --git a/requirements.txt b/requirements.txt index 9e106f3..1dbec71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ django-taggit django-images django-braces django_compressor -django-tastypie==0.9.12 +django-tastypie==0.9.14 # testing mock