Time tracking you can host anywhere, built on Django. Full export support in multiple formats and easily extensible.
djangodockerhandcodedpythonself-hostedtime-trackingtimetracker
1
2
3
4<!doctype html>
5<html lang="en" class="no-js">
6 <head>
7
8 <meta charset="utf-8">
9 <meta name="viewport" content="width=device-width,initial-scale=1">
10
11 <meta name="description" content="Docs for the Timestrap project.">
12
13
14 <link rel="canonical" href="https://timestrap.bythewood.me/">
15
16
17 <meta name="author" content="Isaac Bythewood">
18
19 <link rel="shortcut icon" href="assets/images/favicon.png">
20 <meta name="generator" content="mkdocs-1.2.4, mkdocs-material-5.4.0">
21
22
23
24 <title>Timestrap Docs</title>
25
26
27
28 <link rel="stylesheet" href="assets/stylesheets/main.fe0cca5b.min.css">
29
30 <link rel="stylesheet" href="assets/stylesheets/palette.a46bcfb3.min.css">
31
32
33
34
35 <meta name="theme-color" content="#3f51b5">
36
37
38
39
40
41 <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
42 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
43 <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style>
44
45
46
47
48
49
50
51
52 </head>
53
54
55
56
57
58 <body dir="ltr" data-md-color-scheme="" data-md-color-primary="indigo" data-md-color-accent="indigo">
59
60
61 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
62 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
63 <label class="md-overlay" for="__drawer"></label>
64 <div data-md-component="skip">
65
66
67 <a href="#timestrap" class="md-skip">
68 Skip to content
69 </a>
70
71 </div>
72 <div data-md-component="announce">
73
74 </div>
75
76 <header class="md-header" data-md-component="header">
77 <nav class="md-header-nav md-grid" aria-label="Header">
78 <a href="https://timestrap.bythewood.me/" title="Timestrap Docs" class="md-header-nav__button md-logo" aria-label="Timestrap Docs">
79
80
81 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
82
83 </a>
84 <label class="md-header-nav__button md-icon" for="__drawer">
85 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
86 </label>
87 <div class="md-header-nav__title" data-md-component="header-title">
88
89 <div class="md-header-nav__ellipsis">
90 <span class="md-header-nav__topic md-ellipsis">
91 Timestrap Docs
92 </span>
93 <span class="md-header-nav__topic md-ellipsis">
94
95 Home
96
97 </span>
98 </div>
99
100 </div>
101
102 <label class="md-header-nav__button md-icon" for="__search">
103 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
104 </label>
105
106<div class="md-search" data-md-component="search" role="dialog">
107 <label class="md-search__overlay" for="__search"></label>
108 <div class="md-search__inner" role="search">
109 <form class="md-search__form" name="search">
110 <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
111 <label class="md-search__icon md-icon" for="__search">
112 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
113 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
114 </label>
115 <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
116 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
117 </button>
118 </form>
119 <div class="md-search__output">
120 <div class="md-search__scrollwrap" data-md-scrollfix>
121 <div class="md-search-result" data-md-component="search-result">
122 <div class="md-search-result__meta">
123 Initializing search
124 </div>
125 <ol class="md-search-result__list"></ol>
126 </div>
127 </div>
128 </div>
129 </div>
130</div>
131
132
133 <div class="md-header-nav__source">
134
135<a href="https://github.com/overshard/timestrap/" title="Go to repository" class="md-source">
136 <div class="md-source__icon md-icon">
137
138 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg>
139 </div>
140 <div class="md-source__repository">
141 overshard/timestrap
142 </div>
143</a>
144 </div>
145
146 </nav>
147</header>
148
149 <div class="md-container" data-md-component="container">
150
151
152
153
154
155
156 <main class="md-main" data-md-component="main">
157 <div class="md-main__inner md-grid">
158
159
160 <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
161 <div class="md-sidebar__scrollwrap">
162 <div class="md-sidebar__inner">
163 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
164 <label class="md-nav__title" for="__drawer">
165 <a href="https://timestrap.bythewood.me/" title="Timestrap Docs" class="md-nav__button md-logo" aria-label="Timestrap Docs">
166
167
168 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
169
170 </a>
171 Timestrap Docs
172 </label>
173
174 <div class="md-nav__source">
175
176<a href="https://github.com/overshard/timestrap/" title="Go to repository" class="md-source">
177 <div class="md-source__icon md-icon">
178
179 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg>
180 </div>
181 <div class="md-source__repository">
182 overshard/timestrap
183 </div>
184</a>
185 </div>
186
187 <ul class="md-nav__list" data-md-scrollfix>
188
189
190
191
192
193
194
195
196 <li class="md-nav__item md-nav__item--active">
197
198 <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
199
200
201
202
203 <label class="md-nav__link md-nav__link--active" for="__toc">
204 Home
205 <span class="md-nav__icon md-icon">
206 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>
207 </span>
208 </label>
209
210 <a href="." title="Home" class="md-nav__link md-nav__link--active">
211 Home
212 </a>
213
214
215<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
216
217
218
219
220
221 <label class="md-nav__title" for="__toc">
222 <span class="md-nav__icon md-icon">
223 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
224 </span>
225 Table of contents
226 </label>
227 <ul class="md-nav__list" data-md-scrollfix>
228
229 <li class="md-nav__item">
230 <a href="#warning" class="md-nav__link">
231 Warning
232 </a>
233
234</li>
235
236 <li class="md-nav__item">
237 <a href="#documentation" class="md-nav__link">
238 Documentation
239 </a>
240
241</li>
242
243 <li class="md-nav__item">
244 <a href="#superuser-credentials" class="md-nav__link">
245 Superuser Credentials
246 </a>
247
248</li>
249
250 <li class="md-nav__item">
251 <a href="#docker-installation" class="md-nav__link">
252 Docker Installation
253 </a>
254
255 <nav class="md-nav" aria-label="Docker Installation">
256 <ul class="md-nav__list">
257
258 <li class="md-nav__item">
259 <a href="#docker-requirements" class="md-nav__link">
260 Docker Requirements
261 </a>
262
263</li>
264
265 <li class="md-nav__item">
266 <a href="#docker-running" class="md-nav__link">
267 Docker Running
268 </a>
269
270</li>
271
272 <li class="md-nav__item">
273 <a href="#docker-data" class="md-nav__link">
274 Docker Data
275 </a>
276
277</li>
278
279 </ul>
280 </nav>
281
282</li>
283
284 <li class="md-nav__item">
285 <a href="#development-installation" class="md-nav__link">
286 Development Installation
287 </a>
288
289 <nav class="md-nav" aria-label="Development Installation">
290 <ul class="md-nav__list">
291
292 <li class="md-nav__item">
293 <a href="#development-requirements" class="md-nav__link">
294 Development Requirements
295 </a>
296
297</li>
298
299 <li class="md-nav__item">
300 <a href="#development-setup" class="md-nav__link">
301 Development Setup
302 </a>
303
304</li>
305
306 <li class="md-nav__item">
307 <a href="#development-commands" class="md-nav__link">
308 Development Commands
309 </a>
310
311</li>
312
313 </ul>
314 </nav>
315
316</li>
317
318 </ul>
319
320</nav>
321
322 </li>
323
324
325
326
327
328
329
330 <li class="md-nav__item">
331 <a href="screenshots/" title="Screenshots" class="md-nav__link">
332 Screenshots
333 </a>
334 </li>
335
336
337
338
339
340
341
342 <li class="md-nav__item">
343 <a href="configuration/" title="Configuration" class="md-nav__link">
344 Configuration
345 </a>
346 </li>
347
348
349
350
351
352
353
354 <li class="md-nav__item">
355 <a href="permissions/" title="Permissions" class="md-nav__link">
356 Permissions
357 </a>
358 </li>
359
360
361
362
363
364
365
366 <li class="md-nav__item">
367 <a href="sites/" title="Sites" class="md-nav__link">
368 Sites
369 </a>
370 </li>
371
372
373
374
375
376
377
378 <li class="md-nav__item">
379 <a href="uses/" title="Uses" class="md-nav__link">
380 Uses
381 </a>
382 </li>
383
384
385
386
387
388
389
390 <li class="md-nav__item">
391 <a href="docs/" title="Docs" class="md-nav__link">
392 Docs
393 </a>
394 </li>
395
396
397
398
399
400
401
402 <li class="md-nav__item">
403 <a href="contributing/" title="Contributing" class="md-nav__link">
404 Contributing
405 </a>
406 </li>
407
408
409
410
411
412
413
414 <li class="md-nav__item">
415 <a href="license/" title="License" class="md-nav__link">
416 License
417 </a>
418 </li>
419
420
421 </ul>
422</nav>
423 </div>
424 </div>
425 </div>
426
427
428 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
429 <div class="md-sidebar__scrollwrap">
430 <div class="md-sidebar__inner">
431
432<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
433
434
435
436
437
438 <label class="md-nav__title" for="__toc">
439 <span class="md-nav__icon md-icon">
440 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
441 </span>
442 Table of contents
443 </label>
444 <ul class="md-nav__list" data-md-scrollfix>
445
446 <li class="md-nav__item">
447 <a href="#warning" class="md-nav__link">
448 Warning
449 </a>
450
451</li>
452
453 <li class="md-nav__item">
454 <a href="#documentation" class="md-nav__link">
455 Documentation
456 </a>
457
458</li>
459
460 <li class="md-nav__item">
461 <a href="#superuser-credentials" class="md-nav__link">
462 Superuser Credentials
463 </a>
464
465</li>
466
467 <li class="md-nav__item">
468 <a href="#docker-installation" class="md-nav__link">
469 Docker Installation
470 </a>
471
472 <nav class="md-nav" aria-label="Docker Installation">
473 <ul class="md-nav__list">
474
475 <li class="md-nav__item">
476 <a href="#docker-requirements" class="md-nav__link">
477 Docker Requirements
478 </a>
479
480</li>
481
482 <li class="md-nav__item">
483 <a href="#docker-running" class="md-nav__link">
484 Docker Running
485 </a>
486
487</li>
488
489 <li class="md-nav__item">
490 <a href="#docker-data" class="md-nav__link">
491 Docker Data
492 </a>
493
494</li>
495
496 </ul>
497 </nav>
498
499</li>
500
501 <li class="md-nav__item">
502 <a href="#development-installation" class="md-nav__link">
503 Development Installation
504 </a>
505
506 <nav class="md-nav" aria-label="Development Installation">
507 <ul class="md-nav__list">
508
509 <li class="md-nav__item">
510 <a href="#development-requirements" class="md-nav__link">
511 Development Requirements
512 </a>
513
514</li>
515
516 <li class="md-nav__item">
517 <a href="#development-setup" class="md-nav__link">
518 Development Setup
519 </a>
520
521</li>
522
523 <li class="md-nav__item">
524 <a href="#development-commands" class="md-nav__link">
525 Development Commands
526 </a>
527
528</li>
529
530 </ul>
531 </nav>
532
533</li>
534
535 </ul>
536
537</nav>
538 </div>
539 </div>
540 </div>
541
542
543 <div class="md-content">
544 <article class="md-content__inner md-typeset">
545
546
547 <a href="https://github.com/overshard/timestrap/edit/master/docs/src/index.md" title="Edit this page" class="md-content__button md-icon">
548 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
549 </a>
550
551
552
553
554
555 <h1 id="timestrap">Timestrap<a class="headerlink" href="#timestrap" title="Permanent link">¶</a></h1>
556<p><a href="https://github.com/overshard/timestrap/blob/master/LICENSE.md"><img alt="license" src="https://img.shields.io/github/license/overshard/timestrap.svg?style=for-the-badge" /></a></p>
557<p>Time tracking you can host anywhere. Full export support in
558multiple formats and easily extensible.</p>
559<h2 id="warning">Warning<a class="headerlink" href="#warning" title="Permanent link">¶</a></h2>
560<p>This app is currently very unstable. Everything may, and probably will, change.
561All migrations are going to be wiped and setup properly before release 1.0 so
562you will not be able to upgrade to 1.0 from early development.</p>
563<h2 id="documentation">Documentation<a class="headerlink" href="#documentation" title="Permanent link">¶</a></h2>
564<p>For more details and screenshots check out our main docs website:
565<a href="https://timestrap.bythewood.me/">https://timestrap.bythewood.me/</a></p>
566<h2 id="superuser-credentials">Superuser Credentials<a class="headerlink" href="#superuser-credentials" title="Permanent link">¶</a></h2>
567<p>All installations and the demo create a superuser to get you started, if this
568is a production deployment you will want to change these.</p>
569<ul>
570<li>Username: <code>admin</code></li>
571<li>Password: <code>admin</code></li>
572</ul>
573<h2 id="docker-installation">Docker Installation<a class="headerlink" href="#docker-installation" title="Permanent link">¶</a></h2>
574<p>This creates a minimal docker server setup for Timestrap. This currently is
575in development and may not have persistent data without fiddling. Any help to
576improve the docker configuration files would be appreciated.</p>
577<h3 id="docker-requirements">Docker Requirements<a class="headerlink" href="#docker-requirements" title="Permanent link">¶</a></h3>
578<ul>
579<li>Docker</li>
580<li>Docker Compose</li>
581</ul>
582<p>Docker Compose is used for running multiple containers since we require a
583PostgreSQL database and, not yet but soon, a Redis server for messages and
584events.</p>
585<h3 id="docker-running">Docker Running<a class="headerlink" href="#docker-running" title="Permanent link">¶</a></h3>
586<p>Make sure to update the environmental variables in <code>docker-compose.yml</code> and
587check the <code>timestrap/settings/docker.py</code> file to see if you'd like to change
588anything then run:</p>
589<div class="codehilite"><pre><span></span><code>sudo docker-compose up --detach
590</code></pre></div>
591
592<p>To migrate the database, create your first superuser, and create the initial
593site configuration you then need to run:</p>
594<div class="codehilite"><pre><span></span><code><span class="nv">sudo</span> <span class="nv">docker</span><span class="o">-</span><span class="nv">compose</span> <span class="k">exec</span> <span class="nv">web</span> <span class="nv">python3</span> <span class="nv">manage</span>.<span class="nv">py</span> <span class="nv">migrate</span> <span class="o">--</span><span class="nv">settings</span><span class="o">=</span><span class="nv">timestrap</span>.<span class="nv">settings</span>.<span class="nv">docker</span>
595</code></pre></div>
596
597<p>The Timestrap application should now be running on port 80 of whatever system
598you ran these commands on, if you ran this locally then that would be
599<a href="http://localhost/">http://localhost/</a>.</p>
600<h3 id="docker-data">Docker Data<a class="headerlink" href="#docker-data" title="Permanent link">¶</a></h3>
601<p>All data should be stored in the timestrap_db volume. If you wish to rebuild
602Timestrap at the latest you can do the following from the timestrap repo you
603cloned:</p>
604<div class="codehilite"><pre><span></span><code><span class="nv">git</span> <span class="nv">pull</span>
605<span class="nv">sudo</span> <span class="nv">docker</span><span class="o">-</span><span class="nv">compose</span> <span class="nv">stop</span>
606<span class="nv">sudo</span> <span class="nv">docker</span><span class="o">-</span><span class="nv">compose</span> <span class="nv">build</span>
607<span class="nv">sudo</span> <span class="nv">docker</span><span class="o">-</span><span class="nv">compose</span> <span class="nv">up</span> <span class="o">--</span><span class="nv">detach</span>
608<span class="nv">sudo</span> <span class="nv">docker</span><span class="o">-</span><span class="nv">compose</span> <span class="k">exec</span> <span class="nv">web</span> <span class="nv">python3</span> <span class="nv">manage</span>.<span class="nv">py</span> <span class="nv">migrate</span> <span class="o">--</span><span class="nv">settings</span><span class="o">=</span><span class="nv">timestrap</span>.<span class="nv">settings</span>.<span class="nv">docker</span>
609</code></pre></div>
610
611<p>All data will be kept during this process and you'll have the latest version
612of Timestrap.</p>
613<h2 id="development-installation">Development Installation<a class="headerlink" href="#development-installation" title="Permanent link">¶</a></h2>
614<p>If you'd like to contribute code to Timestrap you'll need to do this!</p>
615<h3 id="development-requirements">Development Requirements<a class="headerlink" href="#development-requirements" title="Permanent link">¶</a></h3>
616<ul>
617<li>Python 3.5+</li>
618<li>Python Dev</li>
619<li>Node 8+</li>
620<li>pipenv</li>
621<li>npm</li>
622<li>Firefox</li>
623<li>geckodriver</li>
624</ul>
625<p>Python 3.5+ is required because we use async/await with Channels to support
626WebSockets and add realtime updates to the client. Python Dev is not required
627on macOS but if you are on Linux, like Ubuntu, you will need to install it with
628<code>sudo apt install python3-dev</code>.</p>
629<p>Node 8+ isn't exactly required, you might be able to get away with an older
630version and we only use node for building the client.</p>
631<p>You'll probably need to install pipenv with pip, run <code>pip install pipenv</code> to
632get this. It's just a better python package manager that allows us to lock our
633dependencies.</p>
634<p>Node installs npm by default but you may want to install the latest with
635<code>npm install --global npm</code>.</p>
636<p>Firefox is used for functional/selenium tests in conjunction with geckodriver,
637you can get geckodriver from <a href="https://github.com/mozilla/geckodriver/releases">mozilla's offical releases</a>
638or you might be able to install it with your systems package manager. Brew on
639macOS has this with <code>brew install geckodriver</code>. If you have to download it
640manually make sure to extract it in some sort of <code>bin</code> directory e.g.
641<code>/usr/local/bin/</code>.</p>
642<h3 id="development-setup">Development Setup<a class="headerlink" href="#development-setup" title="Permanent link">¶</a></h3>
643<p>Once you have all of the above you can get started! For the global npm install
644on gulp-cli you may need to run this with sudo depending on how you installed
645everything above.</p>
646<div class="codehilite"><pre><span></span><code>npm install --global gulp-cli
647npm install
648pipenv install --dev
649</code></pre></div>
650
651<p>After all the dependencies install you can migrate the database and run the
652server.</p>
653<div class="codehilite"><pre><span></span><code>gulp manage:migrate
654gulp
655</code></pre></div>
656
657<p>If you'd like to have some sample data to work with you can run
658<code>gulp manage:fake</code> after you run <code>gulp manage:migrate</code>.</p>
659<p>Timestrap should now be running at <a href="http://localhost:8000">http://localhost:8000</a>
660and gulp + django's test server will automatically recognize and recompile
661changes to any file allowing for quick modification and review.</p>
662<p>Once you've made your changes you can test with <code>gulp coverage:development</code> and
663if that is successful and you want to share your changes create a
664<a href="https://github.com/overshard/timestrap/pulls">pull request</a>!</p>
665<h3 id="development-commands">Development Commands<a class="headerlink" href="#development-commands" title="Permanent link">¶</a></h3>
666<p>I've prebuilt a variety of build commands for development, you can see a list
667of them by running <code>gulp --tasks</code> and I will briefly cover some of them here.</p>
668<ul>
669<li><code>gulp</code> Will run a webserver with django and build the client with webpack</li>
670<li><code>gulp lint</code> Will check all code for style consistency</li>
671<li><code>gulp manage:makemigrations</code> Will generate new migrations if models changes</li>
672<li><code>gulp manage:migrate</code> Makes sure there is a superuser, runs migrations</li>
673<li><code>gulp manage:fake</code> Adds a bunch of fake data for testing</li>
674<li><code>gulp manage:reset</code> Resets the database and adds fake data with a superuser</li>
675<li><code>gulp coverage:development</code> Lints, runs tests, shows coverage report</li>
676</ul>
677
678
679
680
681
682
683
684 </article>
685 </div>
686 </div>
687 </main>
688
689
690<footer class="md-footer">
691
692 <div class="md-footer-nav">
693 <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
694
695
696 <a href="screenshots/" title="Screenshots" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
697 <div class="md-footer-nav__title">
698 <div class="md-ellipsis">
699 <span class="md-footer-nav__direction">
700 Next
701 </span>
702 Screenshots
703 </div>
704 </div>
705 <div class="md-footer-nav__button md-icon">
706 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
707 </div>
708 </a>
709
710 </nav>
711 </div>
712
713 <div class="md-footer-meta md-typeset">
714 <div class="md-footer-meta__inner md-grid">
715 <div class="md-footer-copyright">
716
717 <div class="md-footer-copyright__highlight">
718 Copyright © 2019 Isaac Bythewood
719 </div>
720
721 Made with
722 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
723 Material for MkDocs
724 </a>
725 </div>
726
727 </div>
728 </div>
729</footer>
730
731 </div>
732
733 <script src="assets/javascripts/vendor.d710d30a.min.js"></script>
734 <script src="assets/javascripts/bundle.b39636ac.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents"}</script>
735
736 <script>
737 app = initialize({
738 base: ".",
739 features: [],
740 search: Object.assign({
741 worker: "assets/javascripts/worker/search.a68abb33.min.js"
742 }, typeof search !== "undefined" && search)
743 })
744 </script>
745
746
747 </body>
748</html>