Compare commits

..

No commits in common. "bc33331889695379a02d49b7dcfe014217fa1d19" and "b797e8e90d294b14d774cb82b174e8cf0cc9bbd6" have entirely different histories.

7 changed files with 11 additions and 14 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/static
static
data
*.pyc
__pycache__

View File

@ -146,7 +146,7 @@ ul.clearing-thumbs li {
.admin-menu {
position: absolute;
top: 15px;
right: 320px;
right: 65px;
}
.admin-menu a {
@ -163,7 +163,7 @@ table thead, table tbody, table tfoot {
border: 0.125rem solid #e6e6e6;
box-shadow: 0 0 3.125rem rgba(0, 0, 0, 0.18);
border-radius: 0;
background-image: url("/static/png/searchicon.png");
background-image: url("http://media.yardhouse.com/images/site/searchicon.png");
background-position: 4px center;
background-repeat: no-repeat;
background-color: #111111;
@ -172,7 +172,7 @@ table thead, table tbody, table tfoot {
color: #ffffff !important;
font-size: 10px !important;
top: 13px;
right: 65px;
right: 110px;
height: 25px;
padding-top: 0;
padding-bottom: 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -52,7 +52,7 @@ class GalleryAdmin(GalleryAdminDefault):
class ContentAdmin(admin.ModelAdmin):
save_on_top = True
list_display = ('id', '__str__', 'datestart', 'shortname', 'type')
list_display = ('__str__', 'datestart', 'shortname', 'type')
list_filter = ['datestart', 'type']
search_fields = ['title', 'body', 'header', 'shortname']
inlines = [ContentParentsInline, FileInline, LinkInline]

View File

@ -110,7 +110,7 @@ class Content(models.Model):
@property
def formatted_teaser(self):
if self.teaser:
value = markdownify(self.teaser)
value = self.teaser
elif self.header:
value = ox.strip_tags(ox.decode_html(markdownify(self.header)))[:100]
else:
@ -124,8 +124,6 @@ class Content(models.Model):
@property
def image_url(self):
if self.image:
if self.image.startswith('http') or self.image.startswith('/'):
return self.image
return settings.IMAGE_PREFIX + self.image
def images(self):

View File

@ -16,7 +16,6 @@
<h4 class="sidebar-h4"> Past Events </h4>
{% include "event_preview.html" with events=past_events %}
{% endif %}
<a href="index/">more</a>
</div>
</div>
{% endblock %}

View File

@ -16,7 +16,7 @@ from photologue.models import Photo, Gallery
from .models import Content, ContentContent
ITEMS_PER_PAGE = 30
# Create your views here.
def index(request):
now = datetime.now()
@ -73,7 +73,7 @@ def section_list(request, section):
content = limit_content(content, q)
page = request.GET.get('page', 1)
paginator = Paginator(content, ITEMS_PER_PAGE)
paginator = Paginator(content, 5)
try:
content = paginator.page(page)
except PageNotAnInteger:
@ -103,7 +103,7 @@ def event(request):
upcoming_events = base.filter(datestart__gt=now).order_by('-datestart')
ongoing_events = base.filter(datestart__lt=now, dateend__gte=now).order_by('-datestart')
past_events = base.filter(Q(dateend__lt=now) | Q(dateend=None, datestart__lt=now)).order_by('-datestart')[:10]
past_events = base.filter(Q(dateend__lt=now) | Q(dateend=None, datestart__lt=now))[:10]
context = {
'upcoming_events': upcoming_events,
@ -178,7 +178,7 @@ def search(request):
q = request.GET.get('q')
content = limit_content(content, q)
page = request.GET.get('page', 1)
paginator = Paginator(content, ITEMS_PER_PAGE)
paginator = Paginator(content, 5)
try:
content = paginator.page(page)
except PageNotAnInteger:
@ -199,7 +199,7 @@ def search(request):
class GalleryListViews(ListView):
queryset = Gallery.objects.on_site().is_public()
paginate_by = ITEMS_PER_PAGE
paginate_by = 20
template_name = 'gallery_list.html'
def get_or_none(classmodel, **kwargs):