Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added basic site navigation links

  • Loading branch information...
commit 39691df2e09e35d37e5b53151b48937b76179bee 1 parent 6f84da5
Trey Smith trey0 authored
5 app.yaml
@@ -34,8 +34,13 @@ handlers:
34 34 - url: /static
35 35 static_dir: build/static
36 36
  37 +- url: /admin/.*
  38 + script: submodules/geocamAppEngineLibs/main.py
  39 + login: admin
  40 +
37 41 - url: /.*
38 42 script: submodules/geocamAppEngineLibs/main.py
  43 + login: required
39 44
40 45 env_variables:
41 46 DJANGO_SETTINGS_MODULE: 'settings'
2  apps/mapFastenApp/static/mapFasten/css/base.css
@@ -45,7 +45,7 @@ h3 {
45 45 }
46 46
47 47 #navBar {
48   - padding-top: 10px;
  48 + padding: 5px;
49 49 }
50 50
51 51 .navLink {
16 apps/mapFastenApp/templates/header.html
... ... @@ -1 +1,17 @@
1 1 <img src="{{ STATIC_URL }}mapFasten/icons/mapFastenLogo.png" style="margin-left: 5px; margin-top: 5px;"/>
  2 +<div id="navBar">
  3 + <span class="navLink"><a href="{% url mapFasten_home %}">Home</a></span>
  4 + <span class="navLink"><a href="{% url geocamTiePoint_overlayIndex %}">Map Overlays</a></span>
  5 + {% if user.is_authenticated %}
  6 + <a href="{{ logout_url }}"
  7 + title="Logout">
  8 + <span class="in" style="color: #008; font-weight: bold;">Logout</span>
  9 + </a>
  10 + <span style="font-weight: bold;">{{ user.first_name }}</span>
  11 + {% else %} <!-- user.is_authenticated -->
  12 + <a href="{{ login_url_with_next }}"
  13 + title="Login">
  14 + <span class="in" style="color: #008; font-weight: bold;">Login</span>
  15 + </a>
  16 + {% endif %} <!-- user.is_authenticated (else) -->
  17 +</div>
19 apps/mapFastenApp/templates/mapFasten/home.html
... ... @@ -0,0 +1,19 @@
  1 +{% extends "base.html" %}
  2 +
  3 +{% block head %}
  4 +<title>MapFasten</title>
  5 +{% endblock head %}
  6 +
  7 +{% block contents %}
  8 +
  9 +<div style="max-width: 800px">
  10 +
  11 +<p>MapFasten helps you quickly align an image or PDF with a map,
  12 +creating a shareable map overlay that you can display in the Google Maps
  13 +API or in KML and combine with other layers.</p>
  14 +
  15 +<p><a class="welcomeEntry" href="{% url geocamTiePoint_overlayIndex %}">Let's get started &gt;&gt;</a></p>
  16 +
  17 +</div>
  18 +
  19 +{% endblock contents %}
14 apps/mapFastenApp/urls.py
... ... @@ -0,0 +1,14 @@
  1 +# __BEGIN_LICENSE__
  2 +# Copyright (C) 2008-2010 United States Government as represented by
  3 +# the Administrator of the National Aeronautics and Space Administration.
  4 +# All Rights Reserved.
  5 +# __END_LICENSE__
  6 +
  7 +from django.conf.urls.defaults import url, patterns
  8 +
  9 +urlpatterns = patterns(
  10 + 'mapFastenApp.views',
  11 +
  12 + url(r'^$', 'home',
  13 + {}, 'mapFasten_home'),
  14 +)
14 apps/mapFastenApp/views.py
... ... @@ -0,0 +1,14 @@
  1 +# __BEGIN_LICENSE__
  2 +# Copyright (C) 2008-2010 United States Government as represented by
  3 +# the Administrator of the National Aeronautics and Space Administration.
  4 +# All Rights Reserved.
  5 +# __END_LICENSE__
  6 +
  7 +from django.http import HttpResponse
  8 +from django.shortcuts import render_to_response
  9 +from django.template import RequestContext
  10 +
  11 +def home(request):
  12 + return render_to_response('mapFasten/home.html',
  13 + {},
  14 + context_instance=RequestContext(request))
1  siteSettings.py
@@ -155,6 +155,7 @@
155 155 }
156 156 }
157 157 DEFAULT_FILE_STORAGE = 'storage.AppEngineBlobStorage'
  158 + MIDDLEWARE_CLASSES += ('appEngineAuthMiddleware.AuthenticationMiddleware',)
158 159 else:
159 160 # running in development: use a local database.
160 161 DATABASES = {
2  submodules/geocamAppEngineLibs
... ... @@ -1 +1 @@
1   -Subproject commit 2d69a0526888b7f134832851fbc9332b89dda601
  1 +Subproject commit e7c98735607b9e0e416e8921e618d28af2737c72
1  urls.py
@@ -24,6 +24,7 @@
24 24 'logout'),
25 25
26 26 url(r'^', include('geocamTiePoint.urls')),
  27 + url(r'^', include('mapFastenApp.urls')),
27 28
28 29 )
29 30

0 comments on commit 39691df

Please sign in to comment.
Something went wrong with that request. Please try again.