Make static media play nice with the debug server. For the lovely @cz.
parent
3b25563018
commit
632240829c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,17 +6,17 @@ $Rockwell: 'Rockwell', 'Courier Bold', Courier, Georgia, Times, 'Times New Roman
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Rockwell';
|
font-family: 'Rockwell';
|
||||||
src: url('/static/fonts/rockwell-standard.eot');
|
src: url('../fonts/rockwell-standard.eot');
|
||||||
src: url('/static/fonts/rockwell-standard.eot?#iefix') format('embedded-opentype'),
|
src: url('../fonts/rockwell-standard.eot?#iefix') format('embedded-opentype'),
|
||||||
url('/static/fonts/rockwell-standard.woff') format('woff'),
|
url('../fonts/rockwell-standard.woff') format('woff'),
|
||||||
url('/static/fonts/rockwell-standard.ttf') format('truetype');
|
url('../fonts/rockwell-standard.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Rockwell Bold Italic';
|
font-family: 'Rockwell Bold Italic';
|
||||||
src: url('/static/fonts/rockwell-bold-italic.eot');
|
src: url('../fonts/rockwell-bold-italic.eot');
|
||||||
src: url('/static/fonts/rockwell-bold-italic.eot?#iefix') format('embedded-opentype'),
|
src: url('../fonts/rockwell-bold-italic.eot?#iefix') format('embedded-opentype'),
|
||||||
url('/static/fonts/rockwell-bold-italic.woff') format('woff'),
|
url('../fonts/rockwell-bold-italic.woff') format('woff'),
|
||||||
url('/static/fonts/rockwell-bold-italic.ttf') format('truetype');
|
url('../fonts/rockwell-bold-italic.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mixins
|
// Mixins
|
||||||
|
@ -106,7 +106,7 @@ body {
|
||||||
|
|
||||||
// Global
|
// Global
|
||||||
header.main {
|
header.main {
|
||||||
background: #12343D url('/static/img/header-bg.gif') top left repeat-x;
|
background: #12343D url('../img/header-bg.gif') top left repeat-x;
|
||||||
border-bottom: 1px solid #DDDDDD;
|
border-bottom: 1px solid #DDDDDD;
|
||||||
height: 66px;
|
height: 66px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -120,7 +120,7 @@ header.main {
|
||||||
width: 939px;
|
width: 939px;
|
||||||
|
|
||||||
div.shadey {
|
div.shadey {
|
||||||
background: transparent url('/static/img/header-inner-bg.png') top left no-repeat;
|
background: transparent url('../img/header-inner-bg.png') top left no-repeat;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
left: -157px;
|
left: -157px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -135,8 +135,8 @@ header.main {
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
background: #17484F url('/static/img/search-icon.png') top left no-repeat;
|
background: #17484F url('../img/search-icon.png') top left no-repeat;
|
||||||
background: rgba(43, 82, 93, .5) url('/static/img/search-icon.png') 8px center no-repeat;
|
background: rgba(43, 82, 93, .5) url('../img/search-icon.png') 8px center no-repeat;
|
||||||
border: 1px solid #3A5E67;
|
border: 1px solid #3A5E67;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
font: normal 12px $Helvetica;
|
font: normal 12px $Helvetica;
|
||||||
|
@ -272,7 +272,7 @@ header.main {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
background: transparent url('/static/img/aside-nav-open-bottom-bg.gif') top left repeat;
|
background: transparent url('../img/aside-nav-open-bottom-bg.gif') top left repeat;
|
||||||
display: none;
|
display: none;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -305,7 +305,7 @@ header.main {
|
||||||
}
|
}
|
||||||
&.open {
|
&.open {
|
||||||
a.mini-profile {
|
a.mini-profile {
|
||||||
background: transparent url('/static/img/aside-nav-open-top-bg.gif') top left repeat-x;
|
background: transparent url('../img/aside-nav-open-top-bg.gif') top left repeat-x;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
span.avatar {
|
span.avatar {
|
||||||
|
@ -398,7 +398,7 @@ header.sub {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
background: transparent url('/static/img/rss-icon.png') center left no-repeat;
|
background: transparent url('../img/rss-icon.png') center left no-repeat;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
|
@ -526,7 +526,7 @@ section.main {
|
||||||
margin: 0 0 30px 15px;
|
margin: 0 0 30px 15px;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
background: transparent url('/static/img/tags-icon.png') 0 0 no-repeat;
|
background: transparent url('../img/tags-icon.png') 0 0 no-repeat;
|
||||||
color: #3BAAF3;
|
color: #3BAAF3;
|
||||||
font: bold 12px $Helvetica;
|
font: bold 12px $Helvetica;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
@ -594,7 +594,7 @@ section.main {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
background: transparent url('/static/img/api-icon.png') center left no-repeat;
|
background: transparent url('../img/api-icon.png') center left no-repeat;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-left: 22px;
|
padding-left: 22px;
|
||||||
|
@ -626,13 +626,13 @@ section.main {
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
}
|
}
|
||||||
&.twitter {
|
&.twitter {
|
||||||
background: transparent url('/static/img/twitter-icon.png') 4px center no-repeat;
|
background: transparent url('../img/twitter-icon.png') 4px center no-repeat;
|
||||||
}
|
}
|
||||||
&.pro {
|
&.pro {
|
||||||
background: transparent url('/static/img/upgrade-icon.png') 2px center no-repeat;
|
background: transparent url('../img/upgrade-icon.png') 2px center no-repeat;
|
||||||
}
|
}
|
||||||
&.groups {
|
&.groups {
|
||||||
background: transparent url('/static/img/groups-icon.png') 2px center no-repeat;
|
background: transparent url('../img/groups-icon.png') 2px center no-repeat;
|
||||||
}
|
}
|
||||||
&:first-of-type {
|
&:first-of-type {
|
||||||
a {
|
a {
|
||||||
|
@ -640,16 +640,16 @@ section.main {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.blog {
|
&.blog {
|
||||||
background: transparent url('/static/img/blog-icon.png') 3px center no-repeat;
|
background: transparent url('../img/blog-icon.png') 3px center no-repeat;
|
||||||
}
|
}
|
||||||
&.roadmap {
|
&.roadmap {
|
||||||
background: transparent url('/static/img/roadmap-icon.png') 2px center no-repeat;
|
background: transparent url('../img/roadmap-icon.png') 2px center no-repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.linode {
|
div.linode {
|
||||||
background: transparent url('/static/img/linode.png') top left no-repeat;
|
background: transparent url('../img/linode.png') top left no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
clear: both;
|
clear: both;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -903,7 +903,7 @@ article.snipt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.expand, a.view-full {
|
a.expand, a.view-full {
|
||||||
background: #FFF url('/static/img/expand.png') 15px 18px no-repeat;
|
background: #FFF url('../img/expand.png') 15px 18px no-repeat;
|
||||||
border-top: 1px solid #F1F1EE;
|
border-top: 1px solid #F1F1EE;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
@ -933,7 +933,7 @@ article.snipt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.view-full {
|
a.view-full {
|
||||||
background: #FFF url('/static/img/view-full.png') 15px 17px no-repeat;
|
background: #FFF url('../img/view-full.png') 15px 17px no-repeat;
|
||||||
}
|
}
|
||||||
textarea.raw, textarea.description {
|
textarea.raw, textarea.description {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -985,7 +985,7 @@ article.snipt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:after {
|
&:after {
|
||||||
background: transparent url('/static/img/snipt-drop-shadow.png') top left no-repeat;
|
background: transparent url('../img/snipt-drop-shadow.png') top left no-repeat;
|
||||||
bottom: -15px;
|
bottom: -15px;
|
||||||
content: "";
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -1048,7 +1048,7 @@ article.snipt {
|
||||||
margin: 2px 0;
|
margin: 2px 0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
background: rgba(128, 128, 128, .15) url('/static/img/edit-icon.png') 14px center no-repeat;
|
background: rgba(128, 128, 128, .15) url('../img/edit-icon.png') 14px center no-repeat;
|
||||||
color: #000;
|
color: #000;
|
||||||
display: block;
|
display: block;
|
||||||
font: bold 12px $Helvetica;
|
font: bold 12px $Helvetica;
|
||||||
|
@ -1076,13 +1076,13 @@ article.snipt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.embed {
|
&.embed {
|
||||||
background-image: url('/static/img/embed-icon.png');
|
background-image: url('../img/embed-icon.png');
|
||||||
}
|
}
|
||||||
&.copy {
|
&.copy {
|
||||||
background-image: url('/static/img/copy-icon.png');
|
background-image: url('../img/copy-icon.png');
|
||||||
}
|
}
|
||||||
&.favorite {
|
&.favorite {
|
||||||
background-image: url('/static/img/favorite-icon.png');
|
background-image: url('../img/favorite-icon.png');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1091,7 +1091,7 @@ article.snipt {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
background: transparent url('/static/img/snipt-tags-icon.png') 15px center no-repeat;
|
background: transparent url('../img/snipt-tags-icon.png') 15px center no-repeat;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
font: bold 12px $Helvetica;
|
font: bold 12px $Helvetica;
|
||||||
padding: 7px 0 7px 35px;
|
padding: 7px 0 7px 35px;
|
||||||
|
@ -1138,7 +1138,7 @@ article.snipt {
|
||||||
margin: 14px 0 0 15px;
|
margin: 14px 0 0 15px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
background: transparent url('/static/img/calendar-icon.png') top left no-repeat;
|
background: transparent url('../img/calendar-icon.png') top left no-repeat;
|
||||||
color: #999;
|
color: #999;
|
||||||
display: inline;
|
display: inline;
|
||||||
font: normal 12px $Helvetica;
|
font: normal 12px $Helvetica;
|
||||||
|
@ -1203,7 +1203,7 @@ article.snipt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.comments {
|
&.comments {
|
||||||
background: transparent url('/static/img/comments-icon.png') 0 2px no-repeat;
|
background: transparent url('../img/comments-icon.png') 0 2px no-repeat;
|
||||||
}
|
}
|
||||||
&.raw {
|
&.raw {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
@ -1256,7 +1256,7 @@ article.snipt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.expand {
|
a.expand {
|
||||||
background-image: url('/static/img/collapse.png');
|
background-image: url('../img/collapse.png');
|
||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
-moz-box-shadow: none;
|
-moz-box-shadow: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -1295,7 +1295,7 @@ article.snipt {
|
||||||
&.favorited {
|
&.favorited {
|
||||||
div.container {
|
div.container {
|
||||||
header {
|
header {
|
||||||
@include vertical-gradient-with-image(url('/static/img/favorited-icon.png') top right no-repeat, #FFF, #FFFAF2);
|
@include vertical-gradient-with-image(url('../img/favorited-icon.png') top right no-repeat, #FFF, #FFFAF2);
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
a {
|
a {
|
||||||
|
@ -1316,7 +1316,7 @@ article.snipt {
|
||||||
&.blog-post.favorited {
|
&.blog-post.favorited {
|
||||||
div.container {
|
div.container {
|
||||||
header {
|
header {
|
||||||
@include vertical-gradient-with-image(url('/static/img/favorited-icon.png') top right no-repeat, #FFF, #F0F4FC);
|
@include vertical-gradient-with-image(url('../img/favorited-icon.png') top right no-repeat, #FFF, #F0F4FC);
|
||||||
@include inset-box-shadow(0, -1px, 0, #E3E9F5);
|
@include inset-box-shadow(0, -1px, 0, #E3E9F5);
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
@ -1338,7 +1338,7 @@ article.snipt {
|
||||||
article.private-snipt {
|
article.private-snipt {
|
||||||
div.container {
|
div.container {
|
||||||
header {
|
header {
|
||||||
@include vertical-gradient-with-image(url('/static/img/private-icon.png') top right no-repeat, #FFF, #FFFAF2);
|
@include vertical-gradient-with-image(url('../img/private-icon.png') top right no-repeat, #FFF, #FFFAF2);
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
a {
|
a {
|
||||||
|
@ -1350,7 +1350,7 @@ article.private-snipt {
|
||||||
&.blog-post {
|
&.blog-post {
|
||||||
div.container {
|
div.container {
|
||||||
header {
|
header {
|
||||||
@include vertical-gradient-with-image(url('/static/img/private-icon.png') top right no-repeat, #FFF, #F0F4FC);
|
@include vertical-gradient-with-image(url('../img/private-icon.png') top right no-repeat, #FFF, #F0F4FC);
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
a {
|
a {
|
||||||
|
@ -1530,7 +1530,7 @@ div.site-notice {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.go-pro {
|
a.go-pro {
|
||||||
background: transparent url('/static/img/pro-hero-bg.png') top left repeat;
|
background: transparent url('../img/pro-hero-bg.png') top left repeat;
|
||||||
color: #797979;
|
color: #797979;
|
||||||
display: block;
|
display: block;
|
||||||
font: bold 12px $Helvetica;
|
font: bold 12px $Helvetica;
|
||||||
|
@ -1834,7 +1834,7 @@ body.jobs {
|
||||||
}
|
}
|
||||||
body.pro {
|
body.pro {
|
||||||
div.pro-hero {
|
div.pro-hero {
|
||||||
background: transparent url('/static/img/pro-hero-bg.png') top left repeat;
|
background: transparent url('../img/pro-hero-bg.png') top left repeat;
|
||||||
border-bottom: 1px solid #DDDDDD;
|
border-bottom: 1px solid #DDDDDD;
|
||||||
color: #797979;
|
color: #797979;
|
||||||
font: normal 36px $RockwellBoldItalic;
|
font: normal 36px $RockwellBoldItalic;
|
||||||
|
@ -1919,7 +1919,7 @@ body.pro {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
div.security {
|
div.security {
|
||||||
background: #FCF8E3 url('/static/img/private-icon.png') 7px -15px no-repeat;
|
background: #FCF8E3 url('../img/private-icon.png') 7px -15px no-repeat;
|
||||||
border: 1px solid #FBEED5;
|
border: 1px solid #FBEED5;
|
||||||
color: #C09853;
|
color: #C09853;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -2236,7 +2236,7 @@ body.editing {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
header.fixed-save {
|
header.fixed-save {
|
||||||
background: #FFF url('/static/img/header-fixed-save.gif') top left repeat;
|
background: #FFF url('../img/header-fixed-save.gif') top left repeat;
|
||||||
border-bottom: 1px solid #DDDDDD;
|
border-bottom: 1px solid #DDDDDD;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -2358,7 +2358,7 @@ body.editing {
|
||||||
vertical-align: -3px;
|
vertical-align: -3px;
|
||||||
}
|
}
|
||||||
&.is-private {
|
&.is-private {
|
||||||
background: #EFEEEF url('/static/img/private-icon-edit.png') 199px center no-repeat;
|
background: #EFEEEF url('../img/private-icon-edit.png') 199px center no-repeat;
|
||||||
}
|
}
|
||||||
&.is-public {
|
&.is-public {
|
||||||
background: #F2DEDE;
|
background: #F2DEDE;
|
||||||
|
|
15
urls.py
15
urls.py
|
@ -1,14 +1,20 @@
|
||||||
from views import (homepage, lexers, pro_signup, sitemap, tags, pro_signup_complete)
|
from django.conf import settings
|
||||||
from django.conf.urls import include, patterns, url
|
from django.conf.urls import include, patterns, url
|
||||||
from utils.views import SniptRegistrationView
|
from django.conf.urls.static import static
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import TemplateView
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from snipts.api import (PublicSniptResource, PublicTagResource,
|
||||||
|
PublicUserResource, PrivateSniptResource,
|
||||||
|
PrivateFavoriteResource, PrivateUserProfileResource,
|
||||||
|
PrivateTagResource, PrivateUserResource)
|
||||||
from snipts.views import search
|
from snipts.views import search
|
||||||
from tastypie.api import Api
|
from tastypie.api import Api
|
||||||
from snipts.api import *
|
from utils.views import SniptRegistrationView
|
||||||
|
from views import (homepage, lexers, pro_signup, sitemap, tags, pro_signup_complete)
|
||||||
|
|
||||||
import admin as custom_admin
|
import admin as custom_admin
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
@ -60,3 +66,6 @@ urlpatterns = patterns('',
|
||||||
|
|
||||||
url(r'^', include('snipts.urls')),
|
url(r'^', include('snipts.urls')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns = urlpatterns + static('/media/', document_root=os.path.join(settings.BASE_PATH, 'media'))
|
||||||
|
|
Loading…
Reference in New Issue