Permalink
Browse files

Merge cleanup. Removing old stuff

  • Loading branch information...
1 parent 7f61872 commit ffdb331b7f05db8c53396d9e94f0801ac009853d Dustin Chesterman committed Apr 7, 2012
@@ -20,12 +20,7 @@ class SchoolAdmin(admin.ModelAdmin):
list_display = ('full_name', 'school_code', 'district')
list_filter = ['district',]
search_fields = ['full_name', 'school_code']
-<<<<<<< HEAD
- inlines = [ComputersInline]
-
-=======
->>>>>>> c0424acf1479d3a6074d07258f12eebce8cd9e5c
class DistrictAdmin(admin.ModelAdmin):
fieldsets = [
('District info', {'fields' : ['full_name', 'district_code', 'city', 'state', 'county']})
@@ -6,7 +6,6 @@
<link rel="stylesheet" href="/static/technologytracker/css/techtracker.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
- <script src="/static/highcharts/highcharts.js"></script>
</head>
<body>
<header>
@@ -40,24 +40,10 @@
</tbody>
</table>
-<<<<<<< HEAD
<img src="{{ osChart }}">
<img src="{{ hdChart }}">
<img src="{{ ramChart }}">
-<div class="modal hide fade" id="addComputerForm">
- <div class="modal-header">
- <a href="#" id="close" class="close">&times;</a>
- <h2>Add a new Computer:</h2>
- </div>
- <div class="modal-body">
- <form action="/addComputer/" method="post">{% csrf_token %}
- {{ form.as_p }}
- </div>
- <div class="modal-footer">
- <input type="submit" value="Add" />
- </form>
-=======
<br/>
<br/>
@@ -111,7 +97,6 @@
<input type="button" class="btn" id="closeButton" value="Cancel" />
<input type="button" class="btn btn-primary" id="addButton" value="Save" />
</div>
->>>>>>> c0424acf1479d3a6074d07258f12eebce8cd9e5c
</div>
@@ -2,14 +2,6 @@
{% block content %}
<h2>Schools:</h2>
-<<<<<<< HEAD
-{% for school in schools %}
- <li>
- <a href="/school/{{ school.id }}/">{{ school.full_name }} ({{ school.city }},{{ school.full_name}} )</a>
- </li>
-{% endfor %}
-{% endblock %}
-=======
<table class="table table-bordered table-striped">
<thead>
@@ -111,4 +103,3 @@
{% endblock %}
->>>>>>> c0424acf1479d3a6074d07258f12eebce8cd9e5c
@@ -2,12 +2,8 @@
from django.contrib.auth.decorators import login_required, user_passes_test
from django.template import RequestContext
from django.shortcuts import render_to_response
-<<<<<<< HEAD
from GChartWrapper import *
-
-=======
from django.utils import simplejson
->>>>>>> c0424acf1479d3a6074d07258f12eebce8cd9e5c
from technologytracker.models import *
# Create your views here.
@@ -52,17 +48,6 @@ def schoolDetail(request, school_id):
linuxCount = Computer.objects.filter(school=school, os='LINUX').count()
windowsCount = Computer.objects.filter(school=school, os='WINDOWS').count()
-<<<<<<< HEAD
- if request.method == 'POST':
- form = ComputerForm(request.POST)
- if form.is_valid():
- form.save()
-
- return HttpResponseRedirect('/addComputer/') # Redirect after POST
- else:
- form = ComputerForm() # An unbound form
-
-
##os chart
osxCount = Computer.objects.filter(school=school, os='OSX').count()
linuxCount = Computer.objects.filter(school=school, os='LINUX').count()
@@ -96,19 +81,7 @@ def schoolDetail(request, school_id):
ramChart.label('1 GB','2 GB','4 GB', '8 GB')
ramChart.color('4d89f9','c6d9fd')
ramChart.title('Memory (RAM)')
-
- return render_to_response('schoolDetail.html', {'school':school,
- 'computers':computers,
- 'computerCount':computerCount,
- 'osxCount':osxCount,
- 'linuxCount':linuxCount,
- 'windowsCount':windowsCount,
- 'form':form,
- 'osChart':osChart,
- 'hdChart':hdChart,
- 'ramChart':ramChart,
- })
-=======
+
return render_to_response('schoolDetail.html',
{'school':school,
'computers':computers,
@@ -118,10 +91,12 @@ def schoolDetail(request, school_id):
'windowsCount':windowsCount,
'hdChoices':HD_SIZE_CHOICES,
'ramChoices':RAM_SIZE_CHOICES,
+ 'osChart':osChart,
+ 'hdChart':hdChart,
+ 'ramChart':ramChart,
'osChoices':OS_CHOICES, },
context_instance=RequestContext(request))
->>>>>>> c0424acf1479d3a6074d07258f12eebce8cd9e5c
-
+
except School.DoesNotExist:
return HttpResponseNotFound('School not found')

0 comments on commit ffdb331

Please sign in to comment.