-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
362 lines (347 loc) · 11.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Standard Meta -->
<meta charSet="utf-8"/>
<meta
name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta
name="description"
content="Djecrety is a Django secret key generator. This is a web
tool to generate SECRET_KEY and also have a Django package that does
this simply with a command."
/>
<meta
name="keywords"
content="djecrety,django,python,secretkey,generator,python secret
key,django secret_key generator, generate django secret key,secret,
key,django secret key best practice,secret key best practice,
secret key best practice,django best practice,secret key"
/>
<meta name="robots" content="index, nofollow"/>
<!-- Site Properties -->
<title>Djecrety ― Django Secret Key Generator</title>
<link rel="canonical" href="https://djecrety.ir"/>
<link rel="stylesheet" type="text/css" href="static/css/default.min.css"/>
<!-- Favicon -->
<link
rel="apple-touch-icon" sizes="180x180"
href="static/images/favicon/apple-touch-icon.png"
/>
<link
rel="icon" type="image/png" sizes="32x32"
href="static/images/favicon/favicon-32x32.png"
/>
<link
rel="icon" type="image/png" sizes="16x16"
href="static/images/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="static/images/favicon/site.webmanifest"/>
<link
rel="mask-icon" href="static/images/favicon/safari-pinned-tab.svg"
color="#ffda44"
/>
<link rel="shortcut icon" href="static/images/favicon/favicon.ico"/>
<meta name="apple-mobile-web-app-title" content="Djecrety"/>
<meta name="application-name" content="Djecrety"/>
<meta name="msapplication-TileColor" content="#eef0f2"/>
<meta
name="msapplication-config"
content="static/images/favicon/browserconfig.xml"
/>
<meta name="theme-color" content="#eef0f2"/>
<!-- Opengraph meta tags -->
<meta property="og:title" content="Djecrety"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://djecrety.ir"/>
<meta
property="og:image"
content="https://djecrety.ir/static/images/favicon/android-chrome-512x512.png"
/>
<meta
property="og:description"
content="Djecrety is a Django secret key generator. This is a web
tool to generate SECRET_KEY and also have a Django package that does
this simply with a command."
/>
<meta property="og:site_name" content="Djecrety"/>
<meta property="og:locale" content="en_US"/>
<!-- Twitter meta tags -->
<meta property="twitter:card" content="summary_large_image"/>
<meta property="twitter:title" content="Djecrety"/>
<meta property="twitter:creator" content="@mezzotweets"/>
<meta
property="twitter:image"
content="https://djecrety.ir/static/images/favicon/android-chrome-512x512.png"
/>
<meta
property="twitter:description"
content="Djecrety is a Django secret key generator. This is a web
tool to generate SECRET_KEY and also have a Django package that does
this simply with a command."
/>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8RJPW4D1TF"></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag () {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', 'G-8RJPW4D1TF')
</script>
</head>
<body class="light">
<!-- Contents -->
<div
class="ui vertical masthead center aligned container" itemscope
itemtype="https://schema.org/CreativeWork"
>
<div class="ui large secondary pointing menu">
<a href="/" class="toc item" title="Djecrety">
<img
class="ui image" width=24 height=24 title=Djecrety
alt=Djecrety src="static/images/djecrety-logo.svg"
/>
</a>
<div class="item">
<div class="ui logo shape">
<div class="sides">
<div class="active ui side">
<a href="/" title="Djecrety">
<img
class="ui image" width=35 height=35
src="static/images/djecrety-logo.svg"
title=Djecrety alt=Djecrety
/>
</a>
</div>
</div>
</div>
</div>
<div class="right item">
<div id="dark-mode" class="ui toggle checkbox">
<input type="checkbox">
<label><i
class="moon outline icon light"
style="font-size:1.2em"
></i></label>
</div>
</div>
</div>
<div class="ui text container">
<h1 class="ui header light" itemprop=title>Djecrety</h1>
<h2>Django Secret Key Generator</h2>
<div class="ui fluid large action left icon input" itemprop=content>
<i class="key icon"></i>
<input
id=secretKey class=clipboard style="cursor:pointer"
data-clipboard-target="#secretKey"
placeholder="Secret Key" readonly
>
<button id=generate class="ui button primary clipboard">
Generate
</button>
</div>
<p itemprop=content>
<i class="outline star icon" style="color:#feda44"></i>
Djecrety package also is available,
<a
href="https://docs.djecrety.ir/" target=_blank
title="Djecrety Documents"
>read the docs</a>!
</p>
</div>
</div>
<!-- Footer -->
<footer class="ui footer container">
<div class="ui grid">
<div
class="left floated left aligned twelve wide column"
style="padding-top:1.3em;padding-left:2em"
>
<div class="ui link list horizontal">
<span
class="item light footer-item" id=policy
title=Policy
>Policy</span>
<span class="item light footer-item" id=why title=Why?>Why?</span>
<span class="item light footer-item" id=help title="Help">
Help
</span>
<span class="item light footer-item" id=donate>Donate</span>
<!-- Donate -->
<div class="ui fliud popup top left transition hidden">
<div class="ui two column divided center aligned grid">
<div class=column>
<h4 class="ui header">Bitcoin</h4>
<img
src="static/images/btc-qr.svg"
width=80 height=80
class="ui centered tiny image"
title="Bitcoin Wallet" alt="Bitcoin Wallet"
/>
<div
id=bitcoinAddress class="tiny ui button"
style="margin:0.5em 0 0"
>Copy
</div>
</div>
<div class=column>
<h4 class="ui header">Ethereum</h4>
<img
src="static/images/eth-qr.svg"
width=80 height=80
class="ui centered tiny image"
title="Ethereum Wallet" alt="Ethereum Wallet"
/>
<div
id=ethereumAddress class="tiny ui button"
style="margin:0.5em 0 0"
>Copy
</div>
</div>
</div>
<div class="ui horizontal divider">Or</div>
<div class="ui column divided center aligned grid">
<div class=column>
<p>Just an encouraging message :)</p>
<div class="ui medium buttons">
<a
href="mailto:[email protected]"
class="ui button icon" title=Email
>
<i class="envelope icon"></i>
</a>
<a
href="https://twitter.com/mrouhi13"
class="ui twitter icon button" target=_blank
title=Twitter
>
<i class="twitter icon"></i>
</a>
<a
href="https://github.com/mrouhi13"
class="ui button icon" target=_blank
title="Github"
>
<i class="github icon"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="right floated right aligned four wide column"
style="padding-right:2em"
>
<a
href="https://github.com/mrouhi13/djecrety" target=_blank
title="Github Repository" itemprop=url
>
<img
id="github-logo" src="static/images/gh-mark-dark.svg"
width=28 height=100% alt="Github Repository"
title="Github Repository"
/>
</a>
</div>
</div>
</footer>
<!-- Policy Modal -->
<div class="ui mini modal light" id=policyModal>
<div class="header light">
Policy
</div>
<div class="description scrolling content light">
<p>Djecrety is hosted on Github Pages and doesn't have any back-end
code or database.
<br> The keys generate on demand and it's completely random and
never store to any file or database.
</p>
<p>That's all. So you can safely use Djecrety.</p>
</div>
<div class="actions light">
<div class="ui positive right labeled icon button">
Got It!
<i class="checkmark icon"></i>
</div>
</div>
</div>
<!-- Why Modal -->
<div class="ui tiny modal light" id=whyModal>
<div class="header light">
Why should change the secret key?
</div>
<div class="description scrolling content light">
<p>As
<a
href="https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY"
target=_blank title="Django documents"
>
Django official documentation
</a>
says:</p>
<q>A secret key used to provide cryptographic signing, and
should be set to a unique, unpredictable value.
</q>
<br>...<br>
<q>Running Django with a known <code>SECRET_KEY</code> defeats many of
Django’s security protections, and can lead to privilege
escalation and remote code execution vulnerabilities.
</q>
<br><br>
<p>So <strong>recommended</strong>: Keep it safe. Ignore
<code>settings.py</code> file in your commits. Change the secret
key on your deploy. If you lost the secret key for any reason or
the server got compromised change it as soon as possible.</p>
</div>
<div class="actions light">
<div class="ui positive right labeled icon button">
Got It!
<i class="checkmark icon"></i>
</div>
</div>
</div>
<!-- Help Modal -->
<div class="ui tiny modal light" id=helpModal>
<div class="header light">
Best Practice
</div>
<div class="description scrolling content light">
<p>After creating your project:</p>
<ol>
<li>Duplicate your project <code>settings.py</code> file and rename
it to <code>settings.py.sample</code>.
</li>
<li>Open <code>settings.py.sample</code> file and set
<code>SECRET_KEY</code> value empty.
<pre><code>SECRET_KEY = ''</code></pre>
</li>
<li>Add <code>settings.py</code> file to <code>.gitignore</code>
file. (If using git)
</li>
<li>When you want to deploy your project on the server (production
or test), duplicate <code>settings.py.sample</code> file.
</li>
<li>Rename duplicated file to <code>settings.py</code>.</li>
<li>Set <code>SECRET_KEY</code> value to the new secret key
generated with Djecrety in <code>settings.py</code> file.
</li>
</ol>
</div>
<div class="actions light">
<div class="ui positive right labeled icon button">
Got It!
<i class="checkmark icon"></i>
</div>
</div>
</div>
<script defer src="static/js/default.min.js"></script>
</body>
</html>