mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 16:45:41 +01:00
Updated requirements and other items in preps of new pinry version
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# 
|
# 
|
||||||
|
|
||||||
The open-source core of Pinry, a tiling image board system for people who
|
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
|
want to save, tag, and share images, videos and webpages in an easy to skim
|
||||||
@@ -53,3 +53,4 @@ for production Django deployment found via Google.
|
|||||||
## Current Master Build Status
|
## Current Master Build Status
|
||||||
|
|
||||||
[ ](https://www.codeship.io/projects/2005)
|
[ ](https://www.codeship.io/projects/2005)
|
||||||
|
|
||||||
|
|||||||
BIN
logo.png
BIN
logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 32 KiB |
@@ -31,10 +31,13 @@ class LatestPins(Feed):
|
|||||||
Doing this as a fix for Django's not including the domain name in
|
Doing this as a fix for Django's not including the domain name in
|
||||||
enclosure urls.
|
enclosure urls.
|
||||||
"""
|
"""
|
||||||
request_type = 'http'
|
try:
|
||||||
if request.is_secure(): request_type = 'https'
|
request_type = 'http'
|
||||||
self.domain_name = ''.join([request_type, '://',
|
if request.is_secure(): request_type = 'https'
|
||||||
get_current_site(request).domain])
|
self.domain_name = ''.join([request_type, '://',
|
||||||
|
get_current_site(request).domain])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
return Pin.objects.order_by('-published')[:15]
|
return Pin.objects.order_by('-published')[:15]
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ from .api import *
|
|||||||
from .forms import *
|
from .forms import *
|
||||||
from .helpers import PinFactoryTest
|
from .helpers import PinFactoryTest
|
||||||
from .views import *
|
from .views import *
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ TEST_IMAGE_PATH = 'logo.png'
|
|||||||
|
|
||||||
|
|
||||||
class UserFactory(factory.Factory):
|
class UserFactory(factory.Factory):
|
||||||
|
FACTORY_FOR = User
|
||||||
|
|
||||||
username = factory.Sequence(lambda n: 'user_{}'.format(n))
|
username = factory.Sequence(lambda n: 'user_{}'.format(n))
|
||||||
email = factory.Sequence(lambda n: 'user_{}@example.com'.format(n))
|
email = factory.Sequence(lambda n: 'user_{}@example.com'.format(n))
|
||||||
|
|
||||||
@@ -30,6 +32,8 @@ class UserFactory(factory.Factory):
|
|||||||
|
|
||||||
|
|
||||||
class TagFactory(factory.Factory):
|
class TagFactory(factory.Factory):
|
||||||
|
FACTORY_FOR = Tag
|
||||||
|
|
||||||
name = factory.Sequence(lambda n: 'tag_{}'.format(n))
|
name = factory.Sequence(lambda n: 'tag_{}'.format(n))
|
||||||
|
|
||||||
|
|
||||||
@@ -45,6 +49,8 @@ class ImageFactory(factory.Factory):
|
|||||||
|
|
||||||
|
|
||||||
class PinFactory(factory.Factory):
|
class PinFactory(factory.Factory):
|
||||||
|
FACTORY_FOR = Pin
|
||||||
|
|
||||||
submitter = factory.SubFactory(UserFactory)
|
submitter = factory.SubFactory(UserFactory)
|
||||||
image = factory.SubFactory(ImageFactory)
|
image = factory.SubFactory(ImageFactory)
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
|||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
url(r'', include('pinry.core.urls', namespace='core')),
|
url(r'', include('pinry.core.urls', namespace='core')),
|
||||||
url(r'', include('pinry.users.urls', namespace='users')),
|
url(r'', include('pinry.users.urls', namespace='users')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
urlpatterns += staticfiles_urlpatterns()
|
urlpatterns += staticfiles_urlpatterns()
|
||||||
urlpatterns += patterns('',
|
urlpatterns += patterns('', url(r'^media/(?P<path>.*)$',
|
||||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
|
'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,}),)
|
||||||
'document_root': settings.MEDIA_ROOT,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ django-taggit
|
|||||||
django-images
|
django-images
|
||||||
django-braces
|
django-braces
|
||||||
django_compressor
|
django_compressor
|
||||||
django-tastypie==0.9.12
|
django-tastypie==0.9.14
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
mock
|
mock
|
||||||
|
|||||||
Reference in New Issue
Block a user