/
index.html
424 lines (266 loc) · 23.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Crash Course in Web2py (Part 5 - Modifying the Appearance and Deploying the Web Form) - Michael Herman</title>
<meta name="author" content="Michael Herman">
<meta name="description" content="You made it. In this final tutorial I’ll show you how to easily modify the form’s appearance, and we’ll deploy the app to …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://mherman.org/blog/2012/12/10/crash-course-in-web2py-part-5-modifying-the-appearance-and-deploying-the-web-form">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/atom.xml" rel="alternate" title="Michael Herman" type="application/atom+xml">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/libs/jquery.min.js"%3E%3C/script%3E'))</script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Fjalla+One" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<!--- MathJax Configuration -->
<script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-37074204-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="collapse-sidebar sidebar-footer" >
<header role="banner"><hgroup>
<h1><a href="/">Michael Herman</a></h1>
<h2>Software Developer</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscribe" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS" target="_blank"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="25" viewbox="0 0 100 100"><path class="social" d="M 13.310204,73.332654 C 5.967347,73.332654 0,79.322448 0,86.621428 c 0,7.338776 5.967347,13.262246 13.310204,13.262246 7.370408,0 13.328572,-5.92245 13.328572,-13.262246 0,-7.29898 -5.958164,-13.288774 -13.328572,-13.288774 z M 0.01530612,33.978572 V 53.143878 C 12.493878,53.143878 24.229592,58.02347 33.068368,66.865306 41.894898,75.685714 46.767346,87.47449 46.767346,100 h 19.25 C 66.017346,63.592858 36.4,33.979592 0.01530612,33.978572 l 0,0 z M 0.03877552,0 V 19.17449 C 44.54796,19.17551 80.77551,55.437756 80.77551,100 H 100 C 100,44.87653 55.15102,0 0.03877552,0 z"></path></svg></a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="sitesearch" value="mherman.org" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div>
<article class="hentry" role="article">
<header>
<h1 class="entry-title">Crash Course in Web2py (Part 5 - Modifying the Appearance and Deploying the Web Form)</h1>
<p class="meta">
<time class='entry-date' datetime='2012-12-10T07:39:00-07:00'><span class='date'><span class='date-month'>Dec</span> <span class='date-day'>10</span><span class='date-suffix'>th</span>, <span class='date-year'>2012</span></span> <span class='time'>7:39 am</span></time>
</p>
</header>
<div class="entry-content"><p>You made it. In this final tutorial I’ll show you how to easily modify the form’s appearance, and we’ll deploy the app to PythonAnywhere.</p>
<p><em>Assumptions:</em></p>
<ol>
<li>You have web2py already installed => <a href="http://mherman.org/blog/2012/11/27/crash-course-in-web2py-part-1/">part 1</a></li>
<li>You created the skeleton web form => <a href="http://mherman.org/blog/2012/12/01/crash-course-in-web2py-part-2-web-forms/">part 2</a></li>
<li>You added data validation (with the help of Han Solo) => <a href="http://mherman.org/blog/2012/12/06/crash-course-in-web2py-part-3-form-validation/">part 3</a></li>
<li>You learned how to easily add CRUD functions to manage records => <a href="http://mherman.org/blog/2012/12/09/crash-course-in-web2py-part-4-managing-form-records/">part 4</a></li>
</ol>
<p>Let’s get going …</p>
<p>Launch the server. -> Go to the admin interface. -> Edit the “form” application.</p>
<p>So, by default web2py utilizes the <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a> front-end framework, which makes updating the layout and appearance easy.</p>
<h2>Download New Layout Plugin</h2>
<p>First, go to the web2py layout plugin <a href="http://web2py.com/layouts">page</a> to find a layout that you like. In this example, I used <a href="http://web2py.com/layouts/static/plugin_layouts/layouts/KeepitSimple/index.html">KeepitSimple</a>. Once you find one, go ahead and download the .w2p file.</p>
<p>Back on the admin page for the form, scroll to the bottom of the page, and upload the .w2p file beneath the Plugins section. Now, click the link for plugin_layouts and copy the name of the new file including the full path- <em>plugin_layouts/layouts/KeepitSimple.html</em>. Now, edit the display_your_form.html file and paste the new .html file in the very first line of the code, replacing layout.html-</p>
<p><img src="http://www.backwardsteps.com/uploads/2012-12-09_2303.png" alt="" /></p>
<p>Next, I’m going to remove the <em>Web Form</em> title between the h1 tags, remove the line breaks, and clean up the instructions. I’m also going to remove the <em>Submitted</em>, <em>Accepted</em>, and, <em>Errors</em> sections, as the user does not need to see all that information. So the final code looks like this:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'>{{extend 'plugin_layouts/layouts/KeepitSimple.html'}}
</span><span class='line'><span class="nt"><p></span>Please enter your first name, last name, and email address - thanks!<span class="nt"></p></span>
</span><span class='line'><span class="nt"><h2></span>Inputs:<span class="nt"></h2></span>
</span><span class='line'>{{=form}}
</span></code></pre></td></tr></table></div></figure>
<p>Okay, now let’s edit the <em>KeepitSimple html</em> file:</p>
<p>First change the header div found in the middle of the page - “Welcome. Please register to access your services.” (I also surrounded it in <code><center></code> tags)</p>
<p>Add the following code to the header, just below the style.css -</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'>{{response.files.append(URL(request.application,'static','css/bootstrap.min.css'))}}
</span></code></pre></td></tr></table></div></figure>
<p>Then remove these lines of code-</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'>{{try:}}{ {=auth.navbar(action=URL('default','user'))}}{{ except:pass}}
</span><span class='line'>{{=MENU(response.menu,_class='web2py-menu')}}
</span><span class='line'><span class="nt"><div</span> <span class="na">id=</span><span class="s">"footer"</span><span class="nt">></span><span class="ni">&copy;</span>2007 Keep it Simple <span class="ni">&nbsp;</span>
</span><span class='line'><span class="nt"><span</span> <span class="na">class=</span><span class="s">"separator"</span>
</span><span class='line'><span class="err">|</span>
</span><span class='line'><span class="err"></</span><span class="na">span</span><span class="nt">></span>
</span><span class='line'><span class="ni">&nbsp;</span> Design by
</span><span class='line'><span class="nt"><a</span> <span class="na">href=</span><span class="s">"http://www.realitysoftware.ca"</span> <span class="na">title=</span><span class="s">"Website Design"</span><span class="nt">></span>
</span><span class='line'>Reality Software
</span><span class='line'><span class="nt"></a></span>
</span><span class='line'><span class="nt"></div></span>
</span></code></pre></td></tr></table></div></figure>
<h2>Update CSS</h2>
<p>Your form should look much cleaner now. It’s a bit bare, but you can liven it up with your own HTML. Now, let’s add some changes to the CSS.</p>
<p>Again, since web2py uses the Twitter Bootstrap, you can make CSS changes quickly. Navigate to <a href="http://bootswatch.com/">Bootswatch</a>. Here, you can find various CSS themes to play with. In this example, I’m going to use Spacelab.</p>
<p>Now, what you need to do is view the <em>bootstrap.min.css</em> file by clicking download and then selecting the file. It should open in your browser. Copy all the text. Return to your web2py admin. Scroll down to the static files, click the CSS folder, edit the boootstrap.min.css file-</p>
<p><img src="http://www.backwardsteps.com/uploads/2012-12-10_0824.png" alt="" /></p>
<p>-and then delete all the current CSS and paste in the CSS that you copied before from the Spacelab theme. Refresh your form @ <a href="http://127.0.0.1:8000/form/default/display_your_form.html">http://127.0.0.1:8000/form/default/display_your_form.html</a> and test it again to make sure nothing broke.</p>
<p>Oh - and if you want, you can edit the layout/appearance of the all_records page as well. I trust that you can figure out how to do that by now. If not - Try anyway, and if you fail, Google to find the answer. You’ll learn better that way.</p>
<p>If all looks well, it’s time to deploy!</p>
<h2>Deploy</h2>
<p>I’ll go over this quick since I covered this in <a href="http://mherman.org/blog/2012/11/27/crash-course-in-web2py-part-1/">detail</a> in the first tutorial.</p>
<ol>
<li>Go back to the admin page (<a href="http://127.0.0.1:8000/admin/default/site">http://127.0.0.1:8000/admin/default/site</a>) and click Pack All. Save the w2p-package to your computer.</li>
<li>Fire up <a href="https://www.pythonanywhere.com/">PythonAnywhere</a>.</li>
<li>Once logged in, click <em>Web</em>, <em>Replace with a new web app</em>, then click the button for web2py.</li>
<li>Enter an admin password. Click Next.</li>
<li>Next, head on over to the admin interface - <a href="https://mjhea9.pythonanywhere.com/admin/default/index">https://mjhea9.pythonanywhere.com/admin/default/index</a> (don’t forget to use your own user name and add the <a href="https:">https:</a>) - which should look familiar (it better!). Enter your password.</li>
<li>On the right side of the page, under the <em>Upload and install packed application section</em>, upload the w2p file you saved. Enter a name for your app (“form”). Click Install.</li>
<li>Check out your form. You can view mine at - <a href="https://mjhea9.pythonanywhere.com/form/default/display_your_form.html">https://mjhea9.pythonanywhere.com/form/default/display_your_form.html</a></li>
</ol>
<p><img src="http://www.backwardsteps.com/uploads/2012-12-10_0917.png" alt="" /></p>
<p>Now just test it out to make sure it all works. Make sure all the errors/validators are working and then add a new record. One thing you do need to change is the default for generic view. You can read more about it <a href="http://web2py.com/books/default/chapter/29/10#Generic-views">here</a>. Open up db.py and scroll down to line 28. You need to remove the if statement, so the line will look just like this:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='python'><span class='line'><span class="n">response</span><span class="o">.</span><span class="n">generic_patterns</span> <span class="o">=</span> <span class="p">[</span><span class="s">'*'</span><span class="p">]</span>
</span></code></pre></td></tr></table></div></figure>
<p>Now, make sure you can access the <em>grid</em> page - <a href="https://mjhea9.pythonanywhere.com/form/default/all_records">https://mjhea9.pythonanywhere.com/form/default/all_records</a> - and edit, update, and delete some records.</p>
<p>One change that does need to be made is to add the requirement <em>IS_EMAIL()</em> to the email validation field to the db.py file; otherwise, you can submit email addresses that do not follow the conventional format. The final code looks like this:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='python'><span class='line'><span class="n">db</span> <span class="o">=</span> <span class="n">DAL</span><span class="p">(</span><span class="s">'sqlite://webform.sqlite'</span><span class="p">)</span>
</span><span class='line'><span class="n">db</span><span class="o">.</span><span class="n">define_table</span><span class="p">(</span><span class="s">'register'</span><span class="p">,</span>
</span><span class='line'> <span class="n">Field</span><span class="p">(</span><span class="s">'first_name'</span><span class="p">,</span> <span class="n">requires</span><span class="o">=</span><span class="p">[</span><span class="n">IS_NOT_EMPTY</span><span class="p">(),</span> <span class="n">IS_ALPHANUMERIC</span><span class="p">()]),</span>
</span><span class='line'> <span class="n">Field</span><span class="p">(</span><span class="s">'last_name'</span><span class="p">,</span> <span class="n">requires</span><span class="o">=</span><span class="p">[</span><span class="n">IS_NOT_EMPTY</span><span class="p">(),</span> <span class="n">IS_ALPHANUMERIC</span><span class="p">()]),</span>
</span><span class='line'> <span class="n">Field</span><span class="p">(</span><span class="s">'email'</span><span class="p">,</span> <span class="n">unique</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">requires</span><span class="o">=</span><span class="p">[</span><span class="n">IS_NOT_EMPTY</span><span class="p">(),</span> <span class="n">IS_EMAIL</span><span class="p">()]),</span>
</span><span class='line'> <span class="n">Field</span><span class="p">(</span><span class="s">'email_validate'</span><span class="p">,</span><span class="n">requires</span><span class="o">=</span><span class="p">[</span><span class="n">IS_EMAIL</span><span class="p">(),</span> <span class="n">IS_EQUAL_TO</span><span class="p">(</span><span class="n">request</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">email</span><span class="p">)]))</span>
</span><span class='line'><span class="n">db</span><span class="o">.</span><span class="n">register</span><span class="o">.</span><span class="n">email</span><span class="o">.</span><span class="n">requires</span><span class="o">=</span><span class="n">IS_NOT_IN_DB</span><span class="p">(</span><span class="n">db</span><span class="p">,</span><span class="s">'register.email'</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>
<h2><strong>Recap</strong></h2>
<p>And you’re done. So - what all did we do?</p>
<ul>
<li><a href="http://mherman.org/blog/2012/11/27/crash-course-in-web2py-part-1/">Part 1</a>: You learned how to install web2py on your local computer and deploy a basic app on a cloud platform</li>
<li><a href="http://mherman.org/blog/2012/12/01/crash-course-in-web2py-part-2-web-forms/">Part 2</a>: You learned about Model View Control (MVC) architecture and created a skeleton web form</li>
<li><a href="http://mherman.org/blog/2012/12/06/crash-course-in-web2py-part-3-form-validation/">Part 3</a>: You added data validation to the form</li>
<li><a href="http://mherman.org/blog/2012/12/09/crash-course-in-web2py-part-4-managing-form-records/">Part 4</a>: You learned how to manage records in the database</li>
<li><a href="http://mherman.org/blog/2012/12/10/crash-course-in-web2py-part-5-modifying-the-appearance-and-deploying-the-web-form/">Part 5</a>: You learned how to modify the appearance and layout of the form</li>
</ul>
<p>Congrats!</p>
<p>What’s next? Think about what you can do with this info.</p>
<ul>
<li>Keep practicing.</li>
<li>Build something else.</li>
<li>Make some money</li>
<li>And have fun!</li>
</ul>
<p>Thanks for reading. Cheers.</p>
<p>You can find the new code for db.py, display_your_form.html, and default.py, as well as all the files and the final packed app (.w2p) <a href="https://github.com/mjhea0/web2py/tree/master/form%20-%20part%204">here</a>.</p>
</div>
<footer>
<p class="meta">
<span class="byline author vcard">Authored by <span class="fn">
Michael Herman
</span></span>
<time class='entry-date' datetime='2012-12-10T07:39:00-07:00'><span class='date'><span class='date-month'>Dec</span> <span class='date-day'>10</span><span class='date-suffix'>th</span>, <span class='date-year'>2012</span></span> <span class='time'>7:39 am</span></time>
<span class="categories">
<a class='category' href='/blog/categories/python/'>python</a>
</span>
</p>
<div class="sharing">
<!--
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://mherman.org/blog/2012/12/10/crash-course-in-web2py-part-5-modifying-the-appearance-and-deploying-the-web-form/" data-via="" data-counturl="http://mherman.org/blog/2012/12/10/crash-course-in-web2py-part-5-modifying-the-appearance-and-deploying-the-web-form/" >Tweet</a>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
-->
<br>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-50e5f1cc35ad077d"></script>
<!-- AddThis Button END -->
<br>
</div>
<p class="meta">
<a class="basic-alignment left" href="/blog/2012/12/09/crash-course-in-web2py-part-4-managing-form-records/" title="Previous Post: Crash Course in web2py (part 4 - managing form records)">« Crash Course in web2py (part 4 - managing form records)</a>
<a class="basic-alignment right" href="/blog/2012/12/12/excel-tips-how-to-cut-down-on-calculations-using-sumif-and-sumifs/" title="Next Post: Excel Tips: How to Cut Down on Calculations Using SUMIF and SUMIFS">Excel Tips: How to Cut Down on Calculations Using SUMIF and SUMIFS »</a>
</p>
</footer>
</article>
<section>
<h1>Comments</h1>
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>
</div>
</div>
</div>
<footer role="contentinfo"><div>
<span>Copyright © 2017 - Michael Herman</span><br>
<a href="https://github.com/mjhea0"><i class="fa fa-github-square" style="font-size:2em" aria-hidden="true"></i></a>
<a href="https://twitter.com/mikeherman"><i class="fa fa-twitter-square" style="font-size:2em" aria-hidden="true"></i></a>
<a href="http://www.linkedin.com/pub/michael-herman/3b/a94/4"><i class="fa fa-linkedin-square" style="font-size:2em" aria-hidden="true"></i></a>
<a href="http://www.youtube.com/hermanmu"><i class="fa fa-youtube-square" style="font-size:2em" aria-hidden="true"></i></a>
</div>
</footer>
<script type="text/javascript">
var disqus_shortname = 'michaelherman';
// var disqus_developer = 1;
var disqus_identifier = 'http://mherman.org/blog/2012/12/10/crash-course-in-web2py-part-5-modifying-the-appearance-and-deploying-the-web-form/';
var disqus_url = 'http://mherman.org/blog/2012/12/10/crash-course-in-web2py-part-5-modifying-the-appearance-and-deploying-the-web-form/';
var disqus_script = 'embed.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>