Commits

Ashley Felton committed d07b82b

Add apache conf.

  • Participants
  • Parent commits ef2334f

Comments (0)

Files changed (6)

+<VirtualHost *>
+    ServerAdmin ashley@ropable.com
+    ServerName  ropable.no-ip.org
+
+    WSGIDaemonProcess temper user=user1 group=group1 threads=5
+    WSGIScriptAlias / /var/www/temper/apache.wsgi
+
+    <Directory /var/www/temper>
+        WSGIProcessGroup temper
+        WSGIApplicationGroup %{GLOBAL}
+        Order deny,allow
+        Allow from all
+    </Directory>
+</VirtualHost>
+import sys
+sys.path.append('/var/www/temper/')
+
+from temper import app as temper

File requirements.txt

 Flask==0.9
-python-dateutil==2.1

File temper/templates/base.html

         <style>
             body {
                 padding-top: 60px;
-                padding-bottom: 40px;
+            }
+            @media (max-width: 979px) {
+                body {
+                    padding-top: 0px;
+                }
             }
         </style>
         <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
                         <img class="logo_img" src="/static/img/raspi_logo.png" style="width:40px; margin-bottom:-15px; margin-top:-10px;">
                         RasPi Server
                     </a>
+                    {#
                     <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                         <span class="icon-bar"></span>
                         <span class="icon-bar"></span>
                             <li{% if temp_page %} class="active"{% endif %}><a href="/temps">Temp Logger</a></li>
                         </ul>
                     </div><!--/.nav-collapse -->
+                    #}
                 </div>
             </div>
         </div>

File temper/templates/temp_graph.html

 <div class="row-fluid">
     <div class="span12">
         <h1>Temperature log</h1>
-        <div id="graph-placeholder" style="width: 600px; height: 400px;"></div>
+        <div id="graph-placeholder" style="width: 100%; height: 600px;"></div>
     </div>
 </div>
 {% endblock %}

File temper/views.py

 def favicon():
     return app.send_static_file('favicon.ico')
 
+'''
 @app.route('/')
 def index():
     temps_list = utils.read_log()
     return render_template('index.html', home_page=True)
+'''
 
+@app.route('/')
 @app.route('/temps/')
 def log_date_today():
-    temps_li = utils.read_log(datetime.today())
+    temps_li = utils.read_log()
     return render_template('temp_graph.html', log_date=log_date, temps_li=json.dumps(temps_li))
 
 @app.route('/temps/<int:year>/<int:month>/<int:day>')