Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	web/web/img/body-bg.png
	web/web/templates/img/body-bg.png
	web/web/templates/img/body_bg.png
	web/web/templates/index.htm
  • Loading branch information
botchi09 committed Aug 7, 2012
2 parents 729e110 + f08e405 commit 95d576d
Show file tree
Hide file tree
Showing 16 changed files with 133 additions and 36 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web/build/*
web/web/*.pyc
*.pyc
*.pdn
web/build/*
43 changes: 43 additions & 0 deletions web/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
body{

background-image:url('img/body-bg.png');
background-size: 100%;
font-family: 'Marmelad', sans-serif;
z-index: -1;
}

div.bg-style{

background-color:#ffffff;

}

div.containerstyle{

width:53%;
margin:auto;
border:2px solid;
padding-left:0.5%;
padding-right:0.5%;
padding-bottom:0.5%;
padding-top:0.5%;
overflow: auto;
text-align:center;


}
div.centered{
margin-left:auto;
margin-right:auto;
}
div{
border:2px solid;
overflow:inherit;
}

.header1{

font-size:130%;

}

44 changes: 44 additions & 0 deletions web/web/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
body{

background-image:url(/static/body_bg.png);
background-size: 100%;
font-family: 'Marmelad', sans-serif;
z-index: -1;
}

div.bg-style{

background-color:#ffffff;

}

div.containerstyle{

width:53%;
margin:auto;
border:2px solid;
border-image: url('/static/border.png') 25 25 25 25 repeat;
padding-left:0.5%;
padding-right:0.5%;
padding-bottom:0.5%;
padding-top:0.5%;
overflow: auto;
text-align:center;


}
div.centered{
margin-left:auto;
margin-right:auto;
}
div{
/*border:2px solid;*/
overflow:inherit;
}

.header1{

font-size:130%;

}

File renamed without changes
File renamed without changes.
Binary file added web/web/img/body-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/web/img/body_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/web/img/border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/web/img/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
20 changes: 9 additions & 11 deletions web/web/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Django settings for web project.
import os
SITE_ROOT = os.path.abspath(os.path.dirname(__file__))

DEBUG = True
TEMPLATE_DEBUG = DEBUG
Expand Down Expand Up @@ -59,18 +61,14 @@
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''
STATIC_ROOT = 'static/'

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
STATICFILES_DIRS = [os.path.join(SITE_ROOT, dd) for dd in \
('css', 'img',)\
]

# List of finder classes that know how to find static files in
# various locations.
Expand Down Expand Up @@ -108,8 +106,8 @@
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'templates/'
# Don't forget to use absolute paths, not relative paths.s
'web/templates/'
)

INSTALLED_APPS = (
Expand All @@ -125,7 +123,7 @@
# 'django.contrib.admindocs',
)

# A sample logging configuration. The only tangible logging
# A sample logging configuration. The only tangible loggingssss
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
Expand Down
26 changes: 15 additions & 11 deletions web/web/templates/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Marmelad' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/mapfuncs.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<link href="/static/style.css" rel="stylesheet" type="text/css">

</head>
<body>
<div id="header" class="containerstyle bg-style">
Expand All @@ -28,13 +30,12 @@
<div id="map_map" style="float:left" class="centered">
<iframe id="mapcanvas" width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;ll=37.0625,-95.677068&amp;spn=47.080837,85.78125&amp;t=m&amp;z=4&amp;output=embed"></iframe>
</div>
<div id="map_viewing" style="float:right;" class="centered">
<div id="viewing_visual">
<img src="test.jpg"></img>
</div>
<div id="viewing_desc">
<p>Viewing conditions:<br />{viewing_conditions}</p>
</div>

<div id="map_weather" style="float:right;">

<br />
<a>Viewing conditions</a>

</div>
</div>

Expand All @@ -49,11 +50,14 @@
</div>

</div>
<div id="conditions_image" style="float:right;width:25%;height:25%">
<img width="100" height="100" src="img/weather_sun.png"></img>

<div id="conditions_image" style="float:right;width:25%;height:30%">
<img src="static/weather_sun.png"></img>

</div>
</div>

</div>
</div>
{{data.results.0.start}}
</body>
</html>
2 changes: 1 addition & 1 deletion web/web/templates/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body{

background-image:url('img/body_bg.png');
background-image: url(/static/body_bg.png);
background-size: 100%;
font-family: 'Marmelad', sans-serif;
z-index: -1;
Expand Down
Binary file removed web/web/templates/test.jpg
Binary file not shown.
14 changes: 3 additions & 11 deletions web/web/urls.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import patterns, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'web.views.home', name='home'),
# url(r'^web/', include('web.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
# Home url
url(r'^$', 'web.views.home',),
)
15 changes: 15 additions & 0 deletions web/web/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.shortcuts import HttpResponse, render_to_response
import urllib3
import json


def index(name, age):
return HttpResponse("Hello " + name + age)


def home(request):
http = urllib3.PoolManager()
html = http.request('GET',
'http://api.uhaapi.com/passes?satid=25544&lat=27.950575&lng=-82.45717760000002')
jsondata = json.loads(html.data)
return render_to_response('index.htm', {'data': jsondata})

0 comments on commit 95d576d

Please sign in to comment.