"Just" use static files for logos.
This commit is contained in:
parent
7cd82ea3bb
commit
d6a07110b7
|
@ -49,7 +49,7 @@ INSTALLED_APPS = [
|
|||
'django_extensions',
|
||||
]
|
||||
|
||||
MEDIA_URL = '/media/'
|
||||
#MEDIA_URL = '/media/'
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = local_dir('static')
|
||||
STATICFILES_DIRS = [local_dir('static_src')]
|
||||
|
|
|
@ -334,5 +334,3 @@ if settings.DEBUG:
|
|||
urlpatterns = [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
] + urlpatterns
|
||||
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
|
|
@ -25,15 +25,15 @@ class Sponsor(CreatedUpdatedModel):
|
|||
help_text='A short description of the sponsorship'
|
||||
)
|
||||
|
||||
logo = models.ImageField(
|
||||
upload_to=get_sponsor_upload_path,
|
||||
help_text='A logo for the sponsor'
|
||||
logo = models.URLField(
|
||||
max_length=255,
|
||||
help_text='A URL to the logo'
|
||||
)
|
||||
|
||||
url = models.URLField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="A URL to the sponsor."
|
||||
help_text="An URL to the sponsor."
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
@ -25,7 +25,7 @@ Sponsors | {{ block.super }}
|
|||
</section>
|
||||
{% endif %}
|
||||
<div class="page-header">
|
||||
<h1>{{ sponsor.tier.name}} <small>{{ sponsor.tier.description}}</small></h1>
|
||||
<h1>{{ sponsor.tier.name}}</h1>
|
||||
</div>
|
||||
<section>
|
||||
|
||||
|
@ -35,7 +35,7 @@ Sponsors | {{ block.super }}
|
|||
{% if sponsor.url %}
|
||||
<a href="{{ sponsor.url }}">
|
||||
{% endif %}
|
||||
<img src="{{ sponsor.logo.url }}" />
|
||||
<img src="{{ sponsor.logo }}" />
|
||||
|
||||
<div class="caption">
|
||||
{{ sponsor.description }}
|
||||
|
|
Loading…
Reference in a new issue