-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic app for council climate plan scoring
default app setup plus scss and an index view, also django hosts config to make it load
- Loading branch information
Showing
13 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.conf import settings | ||
from django_hosts import patterns, host | ||
|
||
host_patterns = patterns( | ||
"", | ||
host(r"data.climateemergency.uk", settings.ROOT_URLCONF, name="cape"), | ||
host(r"((?:www.)?councilclimatescorecards)", "scoring.urls", name="scoring"), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ScoringConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "scoring" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
@charset "utf-8"; | ||
|
||
// A NOTE ABOUT FILE PATHS | ||
// | ||
// django.contrib.staticfiles copies this file into the `STATIC_ROOT` | ||
// (along with any other files/directories defined in `STATICFILES_DIRS`) | ||
// and then django-pipeline compiles the Sass files from there. | ||
// | ||
// So imports in this file are relative to `<STATIC_ROOT>/sass/main.scss`, | ||
// not `/caps/static/scss/main.scss`. | ||
// | ||
// That’s why `@import "../bootstrap/<whatever>" works – because at the | ||
// point the Sass files are compiled, django.contrib.staticfiles has | ||
// already copied the Bootstrap sass files into `<STATIC_ROOT>/bootstrap/`. | ||
// | ||
// Note that this doesn't work on a dev thing with standard django-pipeline | ||
// due to this issue: https://github.com/jazzband/django-pipeline/issues/749 | ||
// so we are using a fork with the patch from the above issue | ||
|
||
@import "variables"; | ||
|
||
@import "../bootstrap/functions"; | ||
@import "../bootstrap/variables"; | ||
@import "../bootstrap/mixins"; | ||
@import "../bootstrap/root"; | ||
@import "../bootstrap/reboot"; | ||
@import "../bootstrap/type"; | ||
@import "../bootstrap/images"; | ||
@import "../bootstrap/code"; | ||
@import "../bootstrap/grid"; | ||
@import "../bootstrap/tables"; | ||
@import "../bootstrap/forms"; | ||
@import "../bootstrap/buttons"; | ||
@import "../bootstrap/transitions"; | ||
// @import "../bootstrap/dropdown"; | ||
// @import "../bootstrap/button-group"; | ||
// @import "../bootstrap/input-group"; | ||
// @import "../bootstrap/custom-forms"; | ||
@import "../bootstrap/nav"; | ||
@import "../bootstrap/navbar"; | ||
@import "../bootstrap/card"; | ||
// @import "../bootstrap/breadcrumb"; | ||
// @import "../bootstrap/pagination"; | ||
@import "../bootstrap/badge"; | ||
// @import "../bootstrap/jumbotron"; | ||
// @import "../bootstrap/alert"; | ||
@import "../bootstrap/progress"; | ||
// @import "../bootstrap/media"; | ||
// @import "../bootstrap/list-group"; | ||
// @import "../bootstrap/close"; | ||
// @import "../bootstrap/toasts"; | ||
@import "../bootstrap/modal"; | ||
@import "../bootstrap/tooltip"; | ||
// @import "../bootstrap/popover"; | ||
// @import "../bootstrap/carousel"; | ||
@import "../bootstrap/spinners"; | ||
@import "../bootstrap/utilities"; | ||
@import "../bootstrap/print"; | ||
|
||
@import "mysociety-standard-footer"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% load static %} | ||
{% load pipeline %} | ||
|
||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>SCORING</title> | ||
|
||
{% stylesheet 'scoring' %} | ||
</head> | ||
<body class="{% block bodyclass %}{% endblock %}"> | ||
|
||
{% block content %}{% endblock %} | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends "scoring/base.html" %} | ||
{% block content %} | ||
|
||
<h1>Council Climate Scorecards</h1> | ||
|
||
<p>holding page</p> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.urls import include, path | ||
from django.contrib import admin | ||
|
||
import scoring.views as views | ||
|
||
urlpatterns = [ | ||
path("", views.HomePageView.as_view(), name="home"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.shortcuts import render | ||
|
||
from django.views.generic import TemplateView | ||
|
||
|
||
class HomePageView(TemplateView): | ||
template_name = "scoring/home.html" |