diff --git a/.gitignore b/.gitignore index d09ca79..3027ce6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,14 +3,16 @@ *.pot *.pyc __pycache__/ -personalsite/settings.py +django/personalsite/settings.py db.sqlite3 media static venv/ -core/static/admin/ +django/core/static/admin/ ### Sass ### .sass-cache/ *.css.map *.sass.map *.scss.map +### Docker ### +config.env diff --git a/HACKING.md b/HACKING.md index 2af80d4..42c4da2 100644 --- a/HACKING.md +++ b/HACKING.md @@ -112,6 +112,12 @@ DATABASES = { $ python manage.py check --deploy ``` +- Make migrations + +```console +$ python manage.py makemigrations +``` + - Migrate changes. ```console diff --git a/config.env.example b/config.env.example new file mode 100644 index 0000000..bc1ee69 --- /dev/null +++ b/config.env.example @@ -0,0 +1,35 @@ +# +# yt-local options +# + +WEB_SITE_URL='http://example.org' +APP_DEBUG=True +SECRET_KEY= + +# +# DataBase +# + +NAME_DB=personalsite +USER_DB=postgres +PASS_DB=postgres +HOST_DB=172.23.0.6 +PORT_DB=5432 + +# +# E-mail options +# + +EMAIL_HOST=smtp.example.com +EMAIL_HOST_USER=username +EMAIL_HOST_PASSWORD=password +EMAIL_HOST_PORT=587 +EMAIL_USE_TLS=True + +# +# Gunicorn options +# + +GUNICORN_PORT_NUMBER=8080 +GUNICORN_NUM_WORKERS=4 +GUNICORN_TIMEOUT=120 diff --git a/core/static/core/README.md b/core/static/core/README.md deleted file mode 100644 index 49335ff..0000000 --- a/core/static/core/README.md +++ /dev/null @@ -1,21 +0,0 @@ -## Hacking - -## SASS to CSS - -1. Requeriments: - - ``` - gem install sass - ``` - -2. Generate CSS from SASS: - - ``` - sass -t compressed --sourcemap=none sass/estilos.sass:css/estilos.min.css - ``` - -3. Show CSS to SASS live - - ``` - sass --watch -t compressed --sourcemap=none sass/estilos.sass:css/estilos.min.css - ``` diff --git a/core/static/core/css/estilos.min.css b/core/static/core/css/estilos.min.css deleted file mode 100644 index 45633a8..0000000 --- a/core/static/core/css/estilos.min.css +++ /dev/null @@ -1 +0,0 @@ -html{scroll-behavior:smooth}body{background:#fff;font-family:"liberation serif","times new roman",calibri,carlito,sans-serif,serif;font-size:16px}.contenedor{width:90%;max-width:1000px;margin:auto;overflow:hidden}header{background:url("./../images/BG.jpg") #68bdea;background-repeat:no-repeat;background-position:center;max-height:600px}header .menu{margin:40px 0px;text-align:right}header .menu a{margin:0px 20px;color:#fff;padding-bottom:9px;display:inline-block;text-decoration:none;border-bottom:2px solid transparent;font-size:1rem}header .menu a:hover{border-bottom:2px solid #fff}header .contenedor-texto{display:flex;justify-content:center;align-content:center;margin:190px 0px}header .contenedor-texto .texto{border:2px solid rgba(255,255,255,0.5);border-radius:3px;display:inline-block;text-align:center;padding:20px 60px}header .contenedor-texto .texto h1,header .contenedor-texto .texto h2{color:#fff;font-weight:300;margin:0px}header .contenedor-texto .texto .nombre{margin-bottom:10px;font-size:3.125rem;line-height:50px}header .contenedor-texto .texto .profesion{font-size:1.5rem;line-height:25px}main .contenedor{overflow:visible}main .acerca-de{text-align:center}main .acerca-de .foto{margin-top:-60px}main .acerca-de .foto img{vertical-align:top;border-radius:50%;border:5px solid rgba(255,255,255,0.2)}main .acerca-de .texto{color:#5a5a5a;font-weight:600;font-size:1rem;line-height:30px;width:80%;margin:40px auto 60px auto}main .acerca-de .texto .titulo{font-size:2.125rem;margin-bottom:40px;font-weight:300;color:#dd820d;text-align:center}main .acerca-de .texto .bold{color:#3895ea;text-decoration:underline}main .trabajos{background:#f2f2f2;padding:60px 0}main .trabajos .contenedor{overflow:hidden}main .trabajos .titulo{font-size:2.125rem;line-height:34px;margin-bottom:40px;font-weight:300;color:#323068;text-align:center}main .trabajos .contenedor-trabajos{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}main .trabajos .contenedor-trabajos .trabajo{width:23%;margin-bottom:40px}main .trabajos .contenedor-trabajos .trabajo .thumb{width:100%;margin-bottom:10px}main .trabajos .contenedor-trabajos .trabajo .thumb img{width:100%;vertical-align:top;border-radius:3px}main .trabajos .contenedor-trabajos .trabajo .descripcion{text-align:center}main .trabajos .contenedor-trabajos .trabajo .descripcion .nombre{font-weight:700;color:#3895ea;margin-bottom:10px}main .trabajos .contenedor-trabajos .trabajo .descripcion .nombre a{text-decoration:none;color:#3895ea}main .trabajos .contenedor-trabajos .trabajo .descripcion .categoria{font-size:.8rem;color:#636363}footer .contacto{padding:60px 0}footer .contacto .titulo{font-size:2.125rem;line-height:34px;margin-bottom:40px;font-weight:300;color:#3895ea;text-align:center}footer .contacto .formulario{display:flex;flex-wrap:wrap;justify-content:space-between}footer .contacto .formulario input[type="text"],footer .contacto .formulario input[type="email"]{background:#f3f4f7;border:2px solid #cecece;border-radius:5px;padding:15px 20px;font-size:1.125rem;color:#a4a4a4}footer .contacto .formulario textarea{background:#f3f4f7;border:2px solid #cecece;border-radius:5px;padding:15px 20px;font-size:1.25rem;color:#a4a4a4}footer .contacto .formulario input[type="text"]:focus,footer .contacto .formulario input[type="email"]:focus{border:2px solid #3895ea}footer .contacto .formulario textarea:focus{border:2px solid #3895ea}footer .contacto .formulario input[type="text"],footer .contacto .formulario input[type="email"]{width:45%;margin-bottom:15px}footer .contacto .formulario textarea{width:100%;height:100px;max-width:100%;min-height:100px;max-height:300px;margin-bottom:15px}footer .contacto .formulario .error{display:none;margin-top:20px;border-radius:3px;background:#fc636b;color:#fff;padding:15px 10px;padding-left:40px;width:100%}footer .contacto .formulario .boton{margin:auto;background:#3895ea;color:#fff;border:none;border-radius:3px;padding:15px 40px;cursor:pointer}footer .contacto .formulario .boton:hover{background:#387bea}footer .contacto .alert.success{color:#3895ea;white-space:pre-line}footer .contacto .alert.danger{color:#ee4c58;white-space:pre-line}footer .redes-sociales-libres{background:#1e2b38;padding:60px 0}footer .redes-sociales-libres .contenedor{display:flex;justify-content:center}footer .redes-sociales-libres a{color:#fff;text-align:center;width:100px;display:block;padding:15px 0;border-radius:3px;font-size:1.8rem;margin:0 20px}footer .redes-sociales-libres a svg{fill:currentcolor;width:24px}footer .redes-sociales-libres .diaspora:hover{background:#010101}footer .redes-sociales-libres .gnusocial:hover{background:#a42833}footer .redes-sociales-libres .gitlab:hover{background:#e24329}footer .redes-sociales-libres .libregit:hover{background:#333}footer .redes-sociales-libres .mediagoblin:hover{background:#775fa3}footer .redes-sociales-libres .notabug:hover{background:#244664}footer .redes-sociales-libres .peertube:hover{background:#f1680d}footer .copyleft{background:#192633;padding:5px 0}footer .copyleft p{color:#fff;text-align:center;font-size:.75rem}footer .copyleft p a{color:#3895ea;text-decoration:none}footer .copyleft p svg{width:.5rem;fill:currentcolor}@media screen and (max-width: 985px){footer .contacto .formulario input[type="text"],footer .contacto .formulario input[type="email"]{width:44%}}@media screen and (max-width: 830px){footer .contacto .formulario input[type="text"],footer .contacto .formulario input[type="email"]{width:42%}}@media screen and (max-width: 800px){header .menu{text-align:center}main .trabajos .contenedor-trabajos .trabajo{width:46%}footer .contacto .formulario [type="text"],[type="email"]{width:100%}}@media screen and (max-width: 630px){footer .contacto .formulario input[type="text"],footer .contacto .formulario input[type="email"]{width:100%}}@media screen and (max-width: 500px){header .contenedor-texto .texto .nombre{font-size:35px}header .contenedor-texto .texto .profesion{font-size:18px}footer .redes-sociales-libres .contenedor{flex-wrap:wrap;padding:20px 0}}@media screen and (max-width: 320px){footer .contacto .formulario input[type="text"],footer .contacto .formulario input[type="email"]{width:84%}footer .copyleft p{font-size:.6rem}} diff --git a/core/static/core/images/BG.jpg b/core/static/core/images/BG.jpg deleted file mode 100644 index 615d79d..0000000 Binary files a/core/static/core/images/BG.jpg and /dev/null differ diff --git a/core/static/core/images/BG.xcf b/core/static/core/images/BG.xcf deleted file mode 100644 index a3f5f52..0000000 Binary files a/core/static/core/images/BG.xcf and /dev/null differ diff --git a/core/static/core/images/favicon.png b/core/static/core/images/favicon.png deleted file mode 100644 index 45884f7..0000000 Binary files a/core/static/core/images/favicon.png and /dev/null differ diff --git a/core/static/core/images/foto.png b/core/static/core/images/foto.png deleted file mode 100644 index 489019d..0000000 Binary files a/core/static/core/images/foto.png and /dev/null differ diff --git a/core/static/core/images/trabajos/1.xcf b/core/static/core/images/trabajos/1.xcf deleted file mode 100644 index b419605..0000000 Binary files a/core/static/core/images/trabajos/1.xcf and /dev/null differ diff --git a/core/static/core/images/trabajos/conocimientos.jpg b/core/static/core/images/trabajos/conocimientos.jpg deleted file mode 100644 index 8fdaad6..0000000 Binary files a/core/static/core/images/trabajos/conocimientos.jpg and /dev/null differ diff --git a/core/static/core/images/trabajos/hyperbola.jpg b/core/static/core/images/trabajos/hyperbola.jpg deleted file mode 100644 index 25ae03f..0000000 Binary files a/core/static/core/images/trabajos/hyperbola.jpg and /dev/null differ diff --git a/core/static/core/images/trabajos/librevideojs.jpg b/core/static/core/images/trabajos/librevideojs.jpg deleted file mode 100644 index 554a1f4..0000000 Binary files a/core/static/core/images/trabajos/librevideojs.jpg and /dev/null differ diff --git a/core/static/core/js/efectos.js b/core/static/core/js/efectos.js deleted file mode 100644 index 0e92adf..0000000 --- a/core/static/core/js/efectos.js +++ /dev/null @@ -1,60 +0,0 @@ -/* -@licstart The following is the entire license notice for the -JavaScript code in this page. - -Copyleft 2021 | Heckyel - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -@licend The above is the entire license notice -for the JavaScript code in this page. -*/ - -(function main() { - 'use strict'; - document.addEventListener('DOMContentLoaded', (event) => { - // buttons - const $aboutUs = document.getElementById('btn-acerca-de'); - const $project = document.getElementById('btn-trabajos'); - const $contact = document.getElementById('btn-contacto'); - - // sections - const $acercaDe = document.getElementById('acerca-de'); - const $trabajos = document.getElementById('trabajos'); - const $contacto = document.getElementById('contacto'); - - $aboutUs.addEventListener('click', (e) => { - e.preventDefault(); - window.scroll({top: 240, behavior: 'smooth'}); - location.hash = $aboutUs.hash; - }); - - $project.addEventListener('click', (e) => { - e.preventDefault(); - $trabajos.scrollIntoView({ - behavior: "smooth", - block: "start", - inline: "nearest" - }); - location.hash = $project.hash; - }); - - $contact.addEventListener('click', (e) => { - e.preventDefault(); - $contacto.scrollIntoView({ - behavior: "smooth", - block: "start", - inline: "nearest" - }); - location.hash = $contact.hash; - }); - }); -}()); diff --git a/core/static/core/js/formulario.js b/core/static/core/js/formulario.js deleted file mode 100644 index eead4f9..0000000 --- a/core/static/core/js/formulario.js +++ /dev/null @@ -1,65 +0,0 @@ -/* -@licstart The following is the entire license notice for the -JavaScript code in this page. - -Copyleft 2021 | Heckyel - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. - -@licend The above is the entire license notice -for the JavaScript code in this page. -*/ - -(function main(){ - 'use strict'; - var formulario = document.getElementById('formulario'), - nombre = formulario.name, - correo = formulario.email, - mensaje = formulario.content, - error = document.getElementById('error'); - - function validarNombre(e){ - if(nombre.value == '' || nombre.value == null){ - console.info('Por favor completa el nombre'); - error.style.display = 'block'; - error.innerHTML = error.innerHTML + '
  • Por favor completa el nombre
  • '; - e.preventDefault(); - } - } - - function validarCorreo(e){ - if(correo.value == '' || correo.value == null){ - console.info('Por favor completa el correo'); - error.style.display = 'block'; - error.innerHTML = error.innerHTML + '
  • Por favor completa el correo
  • '; - e.preventDefault(); - } - } - - function validarMensaje(e){ - if(mensaje.value == '' || mensaje.value == null){ - console.info('Por favor completa el mensaje'); - error.style.display = 'block'; - error.innerHTML = error.innerHTML + '
  • Por favor completa el mensaje
  • '; - e.preventDefault(); - } - } - - function validarFormulario(e){ - error.innerHTML = ''; - error.style.display = 'none'; - validarNombre(e); - validarCorreo(e); - validarMensaje(e); - } - - formulario.addEventListener('submit', validarFormulario); -}()); diff --git a/core/static/core/lib/normalize-css/.bower.json b/core/static/core/lib/normalize-css/.bower.json deleted file mode 100644 index 1edd75c..0000000 --- a/core/static/core/lib/normalize-css/.bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "normalize-css", - "description": "A modern alternative to CSS resets", - "main": "normalize.css", - "license": "MIT", - "ignore": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "package.json", - "README.md", - "test.html" - ], - "homepage": "https://github.com/necolas/normalize.css", - "version": "7.0.0", - "_release": "7.0.0", - "_resolution": { - "type": "version", - "tag": "7.0.0", - "commit": "cd79468238394513cf481338c9dcb9aa8bd9b59c" - }, - "_source": "https://github.com/necolas/normalize.css.git", - "_target": "~7.0.0", - "_originalSource": "normalize-css" -} \ No newline at end of file diff --git a/core/static/core/lib/normalize-css/.gitattributes b/core/static/core/lib/normalize-css/.gitattributes deleted file mode 100644 index 5e26201..0000000 --- a/core/static/core/lib/normalize-css/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -normalize.css linguist-vendored=false -test.html linguist-vendored diff --git a/core/static/core/lib/normalize-css/.gitignore b/core/static/core/lib/normalize-css/.gitignore deleted file mode 100644 index 3c3629e..0000000 --- a/core/static/core/lib/normalize-css/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/core/static/core/lib/normalize-css/.travis.yml b/core/static/core/lib/normalize-css/.travis.yml deleted file mode 100644 index 833d09d..0000000 --- a/core/static/core/lib/normalize-css/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - stable diff --git a/core/static/core/lib/normalize-css/LICENSE.md b/core/static/core/lib/normalize-css/LICENSE.md deleted file mode 100644 index 43b5ddc..0000000 --- a/core/static/core/lib/normalize-css/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -Copyright © Nicolas Gallagher and Jonathan Neal - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/core/static/core/lib/normalize-css/bower.json b/core/static/core/lib/normalize-css/bower.json deleted file mode 100644 index a3f1f81..0000000 --- a/core/static/core/lib/normalize-css/bower.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "normalize-css", - "description": "A modern alternative to CSS resets", - "main": "normalize.css", - "license": "MIT", - "ignore": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "package.json", - "README.md", - "test.html" - ] -} diff --git a/core/static/core/lib/normalize-css/normalize.css b/core/static/core/lib/normalize-css/normalize.css deleted file mode 100644 index fa4e73d..0000000 --- a/core/static/core/lib/normalize-css/normalize.css +++ /dev/null @@ -1,447 +0,0 @@ -/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ - -/* Document - ========================================================================== */ - -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. - */ - -html { - line-height: 1.15; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/* Sections - ========================================================================== */ - -/** - * Remove the margin in all browsers (opinionated). - */ - -body { - margin: 0; -} - -/** - * Add the correct display in IE 9-. - */ - -article, -aside, -footer, -header, -nav, -section { - display: block; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - * 1. Add the correct display in IE. - */ - -figcaption, -figure, -main { /* 1 */ - display: block; -} - -/** - * Add the correct margin in IE 8. - */ - -figure { - margin: 1em 40px; -} - -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -pre { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/* Text-level semantics - ========================================================================== */ - -/** - * 1. Remove the gray background on active links in IE 10. - * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. - */ - -a { - background-color: transparent; /* 1 */ - -webkit-text-decoration-skip: objects; /* 2 */ -} - -/** - * 1. Remove the bottom border in Chrome 57- and Firefox 39-. - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} - -/** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. - */ - -b, -strong { - font-weight: inherit; -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ - -b, -strong { - font-weight: bolder; -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -code, -kbd, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/** - * Add the correct font style in Android 4.3-. - */ - -dfn { - font-style: italic; -} - -/** - * Add the correct background and color in IE 9-. - */ - -mark { - background-color: #ff0; - color: #000; -} - -/** - * Add the correct font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - */ - -audio, -video { - display: inline-block; -} - -/** - * Add the correct display in iOS 4-7. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Remove the border on images inside links in IE 10-. - */ - -img { - border-style: none; -} - -/** - * Hide the overflow in IE. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Forms - ========================================================================== */ - -/** - * 1. Change the font styles in all browsers (opinionated). - * 2. Remove the margin in Firefox and Safari. - */ - -button, -input, -optgroup, -select, -textarea { - font-family: sans-serif; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - -button, -input { /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { /* 1 */ - text-transform: none; -} - -/** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. - */ - -button, -html [type="button"], /* 1 */ -[type="reset"], -[type="submit"] { - -webkit-appearance: button; /* 2 */ -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} - -/** - * 1. Add the correct display in IE 9-. - * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ - -progress { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Remove the default vertical scrollbar in IE. - */ - -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - -/** - * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. - */ - -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ - -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} - -/* Interactive - ========================================================================== */ - -/* - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. - */ - -details, /* 1 */ -menu { - display: block; -} - -/* - * Add the correct display in all browsers. - */ - -summary { - display: list-item; -} - -/* Scripting - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - */ - -canvas { - display: inline-block; -} - -/** - * Add the correct display in IE. - */ - -template { - display: none; -} - -/* Hidden - ========================================================================== */ - -/** - * Add the correct display in IE 10-. - */ - -[hidden] { - display: none; -} diff --git a/core/static/core/librejs.html b/core/static/core/librejs.html deleted file mode 100644 index 7a43a7c..0000000 --- a/core/static/core/librejs.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - JavaScript license information - - - - - - - - - - - - - - -
    formulario.jsGNU-GPL-3.0-or-laterformulario.js
    efectos.jsGNU-GPL-3.0-or-laterefectos.js
    - - diff --git a/core/static/core/sass/_front.sass b/core/static/core/sass/_front.sass deleted file mode 100644 index 24f5309..0000000 --- a/core/static/core/sass/_front.sass +++ /dev/null @@ -1,244 +0,0 @@ -html - scroll-behavior: smooth - -body - background: #fff - font-family: "liberation serif", "times new roman", calibri, carlito, sans-serif, serif - font-size: 16px - -.contenedor - width: 90% - max-width: 1000px - margin: auto - overflow: hidden - -/* ---- ---- HEADER ---- ---- */ - -header - background: url("./../images/BG.jpg") #68bdea - background-repeat: no-repeat - background-position: center - max-height: 600px - .menu - margin: 40px 0px - text-align: right - a - margin: 0px 20px - color: #fff - padding-bottom: 9px - display: inline-block - text-decoration: none - border-bottom: 2px solid transparent - font-size: 1rem - &:hover - border-bottom: 2px solid #fff - .contenedor-texto - display: flex - justify-content: center - align-content: center - margin: 190px 0px - .texto - border: 2px solid rgba(255, 255, 255, 0.5) - border-radius: 3px - display: inline-block - text-align: center - padding: 20px 60px - h1, h2 - color: #fff - font-weight: 300 - margin: 0px - .nombre - margin-bottom: 10px - font-size: 3.125rem - line-height: 50px - .profesion - font-size: 1.5rem - line-height: 25px - -/* ---- ---- MAIN ---- ---- */ - -main - .contenedor - overflow: visible - .acerca-de - text-align: center - .foto - margin-top: -60px - img - vertical-align: top - border-radius: 50% - border: 5px solid rgba(255, 255, 255, 0.2) - .texto - color: #5a5a5a - font-weight: 600 - font-size: 1rem - line-height: 30px - width: 80% - margin: 40px auto 60px auto - .titulo - font-size: 2.125rem - margin-bottom: 40px - font-weight: 300 - color: #dd820d - text-align: center - .bold - color: #3895ea - text-decoration: underline - .trabajos - background: #f2f2f2 - padding: 60px 0 - .contenedor - overflow: hidden - .titulo - font-size: 2.125rem - line-height: 34px - margin-bottom: 40px - font-weight: 300 - color: #323068 - text-align: center - .contenedor-trabajos - display: flex - flex-direction: row - flex-wrap: wrap - justify-content: space-between - .trabajo - width: 23% - margin-bottom: 40px - .thumb - width: 100% - margin-bottom: 10px - img - width: 100% - vertical-align: top - border-radius: 3px - .descripcion - text-align: center - .nombre - font-weight: 700 - color: #3895ea - margin-bottom: 10px - a - text-decoration: none - color: #3895ea - .categoria - font-size: 0.8rem - color: #636363 - -/* ---- ---- FOOTER ---- ---- */ - -footer - .contacto - padding: 60px 0 - .titulo - font-size: 2.125rem - line-height: 34px - margin-bottom: 40px - font-weight: 300 - color: #3895ea - text-align: center - .formulario - display: flex - flex-wrap: wrap - justify-content: space-between - input - &[type="text"], &[type="email"] - background: #f3f4f7 - border: 2px solid #cecece - border-radius: 5px - padding: 15px 20px - font-size: 1.125rem - color: #a4a4a4 - textarea - background: #f3f4f7 - border: 2px solid #cecece - border-radius: 5px - padding: 15px 20px - font-size: 1.25rem - color: #a4a4a4 - input - &[type="text"]:focus, &[type="email"]:focus - border: 2px solid #3895ea - textarea:focus - border: 2px solid #3895ea - input - &[type="text"], &[type="email"] - width: 45% - margin-bottom: 15px - textarea - width: 100% - height: 100px - max-width: 100% - min-height: 100px - max-height: 300px - margin-bottom: 15px - .error - display: none - margin-top: 20px - border-radius: 3px - background: #fc636b - color: #fff - padding: 15px 10px - padding-left: 40px - width: 100% - .boton - margin: auto - background: #3895ea - color: #fff - border: none - border-radius: 3px - padding: 15px 40px - cursor: pointer - &:hover - background: #387bea - .alert - &.success - color: #3895ea - white-space: pre-line - &.danger - color: #ee4c58 - white-space: pre-line - .redes-sociales-libres - background: #1e2b38 - padding: 60px 0 - .contenedor - display: flex - justify-content: center - a - color: #fff - text-align: center - width: 100px - display: block - padding: 15px 0 - border-radius: 3px - font-size: 1.8rem - margin: 0 20px - svg - fill: currentcolor - width: 24px - .diaspora:hover - background: #010101 - .gnusocial:hover - background: #a42833 - .gitlab:hover - background: #e24329 - .libregit:hover - background: #333333 - .mediagoblin:hover - background: #775fa3 - .notabug:hover - background: #244664 - .peertube:hover - background: #f1680d - .copyleft - background: #192633 - padding: 5px 0 - p - color: #fff - text-align: center - font-size: 0.75rem - a - color: #3895ea - text-decoration: none - svg - width: 0.5rem - fill: currentcolor diff --git a/core/static/core/sass/_mediaqueries.sass b/core/static/core/sass/_mediaqueries.sass deleted file mode 100644 index 4e521de..0000000 --- a/core/static/core/sass/_mediaqueries.sass +++ /dev/null @@ -1,41 +0,0 @@ -@media screen and (max-width: 985px) - footer .contacto .formulario input - &[type="text"], &[type="email"] - width: 44% - -@media screen and (max-width: 830px) - footer .contacto .formulario input - &[type="text"], &[type="email"] - width: 42% - -@media screen and (max-width: 800px) - header .menu - text-align: center - main .trabajos .contenedor-trabajos .trabajo - width: 46% - footer .contacto .formulario [type="text"], [type="email"] - width: 100% - -@media screen and (max-width: 630px) - footer .contacto .formulario input - &[type="text"], &[type="email"] - width: 100% - -@media screen and (max-width: 500px) - header .contenedor-texto .texto - .nombre - font-size: 35px - .profesion - font-size: 18px - footer .redes-sociales-libres .contenedor - flex-wrap: wrap - padding: 20px 0 - -@media screen and (max-width: 320px) - footer .contacto .formulario input - &[type="text"], &[type="email"] - width: 84% - footer - .copyleft - p - font-size: 0.60rem diff --git a/core/static/core/sass/estilos.sass b/core/static/core/sass/estilos.sass deleted file mode 100644 index 39b6afa..0000000 --- a/core/static/core/sass/estilos.sass +++ /dev/null @@ -1,8 +0,0 @@ -// Estilos para Portafolio -// License AGPLv3 or later - -/* ---- Frontend ---- */ -@import front - -/* ---- MEDIA QUERIES ---- */ -@import mediaqueries diff --git a/django/Dockerfile b/django/Dockerfile new file mode 100644 index 0000000..18b68ed --- /dev/null +++ b/django/Dockerfile @@ -0,0 +1,47 @@ +FROM python:3-alpine AS base +LABEL MAINTAINER="heckyel@riseup.net" + +# Image to Build Dependencies +FROM base AS builder + +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 + +RUN apk add --no-cache musl-dev build-base make gcc g++ \ + libxml2-dev libffi-dev zlib-dev libjpeg lcms2-dev libimagequant-dev \ + libjpeg-turbo-dev libwebp-dev openjpeg-dev tk-dev py3-pillow + +ARG APP_DIR="/srv/app" + +RUN mkdir --parents "$APP_DIR" + +WORKDIR "$APP_DIR" + +COPY requirements_prod.txt . +RUN pip install --no-cache-dir --prefix=/install wheel gunicorn +RUN pip install --no-cache-dir --prefix=/install -r requirements_prod.txt + +# Runtime Environment Image +FROM base + +WORKDIR /srv/app + +# Runtime Dependencies +RUN apk add py3-olefile brotli-libs libpng freetype libxcb \ + libimagequant libjpeg-turbo lcms2 openjpeg libwebp zstd-libs \ + tiff libxau libmd libbsd libxdmcp nginx + +COPY --from=builder /install /usr/local +COPY core/ /srv/app/core +COPY personalsite/ /srv/app/personalsite +COPY project/ /srv/app/project +COPY social/ /srv/app/social +COPY manage.py /srv/app +COPY nginx.conf /etc/nginx/http.d/default.conf + +EXPOSE 80 + +COPY entrypoint.sh / +RUN chmod u+x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/core/__init__.py b/django/core/__init__.py similarity index 100% rename from core/__init__.py rename to django/core/__init__.py diff --git a/core/admin.py b/django/core/admin.py similarity index 100% rename from core/admin.py rename to django/core/admin.py diff --git a/core/apps.py b/django/core/apps.py similarity index 100% rename from core/apps.py rename to django/core/apps.py diff --git a/core/models.py b/django/core/models.py similarity index 100% rename from core/models.py rename to django/core/models.py diff --git a/core/templates/core/base.djhtml b/django/core/templates/core/base.djhtml similarity index 100% rename from core/templates/core/base.djhtml rename to django/core/templates/core/base.djhtml diff --git a/core/tests.py b/django/core/tests.py similarity index 100% rename from core/tests.py rename to django/core/tests.py diff --git a/core/views.py b/django/core/views.py similarity index 100% rename from core/views.py rename to django/core/views.py diff --git a/django/entrypoint.sh b/django/entrypoint.sh new file mode 100644 index 0000000..12edeca --- /dev/null +++ b/django/entrypoint.sh @@ -0,0 +1,161 @@ +#!/usr/bin/env sh + +## Config +if [ ! -f "/srv/app/personalsite/settings.py" ]; then + # generate config + cat > /srv/app/personalsite/settings.py <<- EOF +""" +Django settings for personalsite project. + +Generated by 'django-admin startproject' using Django 2.1.2. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '${SECRET_KEY:-8$oylik7o2-dbx+5a77=2a532w8lx&=ofiyv!1bs9a9)0t%6r2}' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = ${APP_DEBUG:-False} + +ALLOWED_HOSTS = ["${WEB_SITE_URL:-example.com}", "localhost", "127.0.0.1", "0.0.0.0", "django"] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'core', + 'project.apps.ProjectConfig', + 'social.apps.SocialConfig', + 'django_cleanup.apps.CleanupConfig', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'personalsite.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'social.processors.ctx_dict', + ], + }, + }, +] + +WSGI_APPLICATION = 'personalsite.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': '${NAME_DB:-site}', + 'USER': '${USER_DB:-site}', + 'PASSWORD': '${PASS_DB:-site}', + 'HOST': '${HOST_DB:-127.0.0.1}', + 'PORT': '${PORT_DB:-5432}', + } +} + +# Password validation +# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.1/topics/i18n/ + +LANGUAGE_CODE = 'es' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.1/howto/static-files/ + +STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASE_DIR, 'static') + +# Media files +MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') + +# Incoming Email +EMAIL_FROM = '${EMAIL_FROM:-noreply@example.com}' +EMAIL_TO = '${EMAIL_TO:-user@example.com}' + +# Email config +EMAIL_HOST = '${EMAIL_HOST:-smtp.example.com}' +EMAIL_HOST_USER = '${EMAIL_HOST_USER:-username}' +EMAIL_HOST_PASSWORD = '${EMAIL_HOST_PASSWORD:-password}' +EMAIL_PORT = '${EMAIL_HOST_PORT:-587}' +EMAIL_USE_TLS = ${EMAIL_USE_TLS:-True} +EOF +fi + +cd /srv/app || exit +/usr/local/bin/python3 manage.py makemigrations --no-input +/usr/local/bin/python3 manage.py migrate --no-input +/usr/local/bin/python3 manage.py collectstatic --no-input + +gunicorn -b "0.0.0.0:${GUNICORN_PORT_NUMBER:-8080}" --timeout "${GUNICORN_TIMEOUT:-30}" --workers "${GUNICORN_NUM_WORKERS:-4}" personalsite.wsgi & +exec nginx -g "daemon off;" diff --git a/manage.py b/django/manage.py similarity index 100% rename from manage.py rename to django/manage.py diff --git a/django/nginx.conf b/django/nginx.conf new file mode 100644 index 0000000..2bf6930 --- /dev/null +++ b/django/nginx.conf @@ -0,0 +1,25 @@ +upstream django { + server 127.0.0.1:8080; +} + +server { + listen 80; + + access_log /dev/null; + error_log /dev/null; + + location / { + proxy_pass http://django; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_redirect off; + } + location /static/ { + autoindex on; + alias /srv/app/static/; + } + location /media/ { + autoindex on; + alias /srv/app/media/; + } +} diff --git a/personalsite/__init__.py b/django/personalsite/__init__.py similarity index 100% rename from personalsite/__init__.py rename to django/personalsite/__init__.py diff --git a/personalsite/settings.py.example b/django/personalsite/settings.py.example similarity index 98% rename from personalsite/settings.py.example rename to django/personalsite/settings.py.example index fb3a10b..12f22f8 100644 --- a/personalsite/settings.py.example +++ b/django/personalsite/settings.py.example @@ -125,7 +125,7 @@ USE_TZ = True # https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/' -MEDIA_ROOT = os.path.join(BASE_DIR, 'core/static') +MEDIA_ROOT = os.path.join(BASE_DIR, 'static') # Media files MEDIA_URL = '/media/' diff --git a/personalsite/urls.py b/django/personalsite/urls.py similarity index 100% rename from personalsite/urls.py rename to django/personalsite/urls.py diff --git a/personalsite/wsgi.py b/django/personalsite/wsgi.py similarity index 100% rename from personalsite/wsgi.py rename to django/personalsite/wsgi.py diff --git a/project/__init__.py b/django/project/__init__.py similarity index 100% rename from project/__init__.py rename to django/project/__init__.py diff --git a/project/admin.py b/django/project/admin.py similarity index 100% rename from project/admin.py rename to django/project/admin.py diff --git a/project/apps.py b/django/project/apps.py similarity index 100% rename from project/apps.py rename to django/project/apps.py diff --git a/project/forms.py b/django/project/forms.py similarity index 100% rename from project/forms.py rename to django/project/forms.py diff --git a/project/migrations/__init__.py b/django/project/migrations/__init__.py similarity index 100% rename from project/migrations/__init__.py rename to django/project/migrations/__init__.py diff --git a/project/models.py b/django/project/models.py similarity index 100% rename from project/models.py rename to django/project/models.py diff --git a/project/templates/trabajo/index.djhtml b/django/project/templates/trabajo/index.djhtml similarity index 100% rename from project/templates/trabajo/index.djhtml rename to django/project/templates/trabajo/index.djhtml diff --git a/project/tests.py b/django/project/tests.py similarity index 100% rename from project/tests.py rename to django/project/tests.py diff --git a/project/urls.py b/django/project/urls.py similarity index 100% rename from project/urls.py rename to django/project/urls.py diff --git a/project/views.py b/django/project/views.py similarity index 100% rename from project/views.py rename to django/project/views.py diff --git a/requirements.txt b/django/requirements.txt similarity index 100% rename from requirements.txt rename to django/requirements.txt diff --git a/django/requirements_prod.txt b/django/requirements_prod.txt new file mode 100644 index 0000000..7072840 --- /dev/null +++ b/django/requirements_prod.txt @@ -0,0 +1,5 @@ +Django==2.2.16 +django-cleanup==5.0.0 +Pillow==8.4.0 +psycopg2-binary +pytz diff --git a/social/__init__.py b/django/social/__init__.py similarity index 100% rename from social/__init__.py rename to django/social/__init__.py diff --git a/social/admin.py b/django/social/admin.py similarity index 100% rename from social/admin.py rename to django/social/admin.py diff --git a/social/apps.py b/django/social/apps.py similarity index 100% rename from social/apps.py rename to django/social/apps.py diff --git a/social/migrations/__init__.py b/django/social/migrations/__init__.py similarity index 100% rename from social/migrations/__init__.py rename to django/social/migrations/__init__.py diff --git a/social/models.py b/django/social/models.py similarity index 100% rename from social/models.py rename to django/social/models.py diff --git a/social/processors.py b/django/social/processors.py similarity index 100% rename from social/processors.py rename to django/social/processors.py diff --git a/social/tests.py b/django/social/tests.py similarity index 100% rename from social/tests.py rename to django/social/tests.py diff --git a/social/views.py b/django/social/views.py similarity index 100% rename from social/views.py rename to django/social/views.py diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1766f78 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,40 @@ +version: '3' + +services: + app: + image: rusian/personalsite + container_name: personalsite + env_file: config.env + ports: + - "7012:80" + tty: true + restart: "always" + networks: + teanet: + ipv4_address: 172.23.0.5 + + personalsite-db: + image: postgres:alpine + container_name: personalsite-db + ports: + - 5432:5432 + restart: always + volumes: + - personalsite_db:/var/lib/postgresql/data + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=personalsite + networks: + teanet: + ipv4_address: 172.23.0.6 + +volumes: + personalsite_db: + +networks: + teanet: + driver: bridge + ipam: + config: + - subnet: 172.23.0.0/16 diff --git a/personalsite/wsgi.py.example b/personalsite/wsgi.py.example deleted file mode 100644 index f6a79ec..0000000 --- a/personalsite/wsgi.py.example +++ /dev/null @@ -1,19 +0,0 @@ -""" -WSGI config for personalsite project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ -""" - -import os, sys - -from django.core.wsgi import get_wsgi_application - -sys.path.append('/path/to/site/personalsite') -sys.path.append('/path/to/site') - -os.environ['DJANGO_SETTINGS_MODULE'] = 'personalsite.settings' - -application = get_wsgi_application() diff --git a/project/migrations/0001_initial.py b/project/migrations/0001_initial.py deleted file mode 100644 index 38ae541..0000000 --- a/project/migrations/0001_initial.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.1.2 on 2018-10-04 02:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Project', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200, verbose_name='Titulo')), - ('decription', models.TextField(verbose_name='Descripción')), - ('image', models.ImageField(upload_to='projects/uploads/%Y/%m/%d/', verbose_name='Imagen')), - ('link', models.URLField(blank=True, null=True, verbose_name='Sitio web')), - ('created', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de creación')), - ('updated', models.DateTimeField(auto_now=True, verbose_name='Fecha de modificación')), - ], - options={ - 'verbose_name': 'proyecto', - 'verbose_name_plural': 'proyectos', - 'ordering': ['-created'], - }, - ), - ] diff --git a/requirements_prod.txt b/requirements_prod.txt deleted file mode 100644 index 35889e5..0000000 --- a/requirements_prod.txt +++ /dev/null @@ -1,5 +0,0 @@ -Django==2.2.16 -django-cleanup==5.0.0 -Pillow==9.0.0 -psycopg2-binary==2.8.1 -pytz==2018.9 diff --git a/social/migrations/0001_initial.py b/social/migrations/0001_initial.py deleted file mode 100644 index f52b40b..0000000 --- a/social/migrations/0001_initial.py +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by Django 2.1.2 on 2018-10-04 21:04 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Link', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('key', models.SlugField(max_length=100, unique=True, verbose_name='Nombre clave')), - ('name', models.CharField(max_length=200, verbose_name='Red social')), - ('url', models.URLField(blank=True, null=True, verbose_name='Enlace')), - ('created', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de creación')), - ('updated', models.DateTimeField(auto_now=True, verbose_name='Fecha de modificación')), - ], - options={ - 'verbose_name': 'enlace', - 'verbose_name_plural': 'enlaces', - 'ordering': ['name'], - }, - ), - ]