├── .gitignore ├── README.md └── img ├── django-vue01.png ├── django-vue02.png ├── django-vue03.png └── django-vue04.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | 132 | # Logs 133 | logs 134 | *.log 135 | npm-debug.log* 136 | yarn-debug.log* 137 | yarn-error.log* 138 | lerna-debug.log* 139 | 140 | # Diagnostic reports (https://nodejs.org/api/report.html) 141 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 142 | 143 | # Runtime data 144 | pids 145 | *.pid 146 | *.seed 147 | *.pid.lock 148 | 149 | # Directory for instrumented libs generated by jscoverage/JSCover 150 | lib-cov 151 | 152 | # Coverage directory used by tools like istanbul 153 | coverage 154 | *.lcov 155 | 156 | # nyc test coverage 157 | .nyc_output 158 | 159 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 160 | .grunt 161 | 162 | # Bower dependency directory (https://bower.io/) 163 | bower_components 164 | 165 | # node-waf configuration 166 | .lock-wscript 167 | 168 | # Compiled binary addons (https://nodejs.org/api/addons.html) 169 | build/Release 170 | 171 | # Dependency directories 172 | node_modules/ 173 | jspm_packages/ 174 | 175 | # TypeScript v1 declaration files 176 | typings/ 177 | 178 | # TypeScript cache 179 | *.tsbuildinfo 180 | 181 | # Optional npm cache directory 182 | .npm 183 | 184 | # Optional eslint cache 185 | .eslintcache 186 | 187 | # Microbundle cache 188 | .rpt2_cache/ 189 | .rts2_cache_cjs/ 190 | .rts2_cache_es/ 191 | .rts2_cache_umd/ 192 | 193 | # Optional REPL history 194 | .node_repl_history 195 | 196 | # Output of 'npm pack' 197 | *.tgz 198 | 199 | # Yarn Integrity file 200 | .yarn-integrity 201 | 202 | # dotenv environment variables file 203 | .env 204 | .env.test 205 | 206 | # parcel-bundler cache (https://parceljs.org/) 207 | .cache 208 | 209 | # Next.js build output 210 | .next 211 | 212 | # Nuxt.js build / generate output 213 | .nuxt 214 | dist 215 | 216 | # Gatsby files 217 | .cache/ 218 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 219 | # https://nextjs.org/blog/next-9-1#public-directory-support 220 | # public 221 | 222 | # vuepress build output 223 | .vuepress/dist 224 | 225 | # Serverless directories 226 | .serverless/ 227 | 228 | # FuseBox cache 229 | .fusebox/ 230 | 231 | # DynamoDB Local files 232 | .dynamodb/ 233 | 234 | # TernJS port file 235 | .tern-port 236 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # django-vuejs-experience 2 | 3 | Este projeto é uma experiência com [Django][5] e [VueJS][6]. 4 | 5 | Este projeto está divido em 4 repositórios: 6 | 7 | # [django-vuejs-01-vue-inner-django][1] 8 | 9 | Neste projeto eu uso **Django** e sua renderização tradicional de templates, e uso o **VueJS** apenas como um arquivo estático via CDN. Inclui também axios via CDN. 10 | 11 | ![django-vue01.png](img/django-vue01.png) 12 | 13 | 14 | # [django-vuejs-02-vue-cli-static][2] 15 | 16 | Aqui eu ainda uso o **Django** com sua renderização de templates. E o **VueJS** instalado com vue-cli. 17 | 18 | Mas no final eu rodo o comando `npm run build` jogando os arquivos para a pasta `static` do Django. 19 | 20 | ![django-vue02.png](img/django-vue02.png) 21 | 22 | 23 | # [django-vuejs-03-separated][3] 24 | 25 | Neste projeto temos o **Django** totalmente separado do **VueJS**. Cada um rodando numa porta diferente. E a comunicação entre eles é feita pelos endpoints. 26 | 27 | Inclui [vue][6], [axios][7] e [vue-routers][8]. 28 | 29 | ![django-vue03.png](img/django-vue03.png) 30 | 31 | 32 | # [django-rest-framework-vuejs][4] 33 | 34 | Projeto feito com [Django Rest Framework][9] e [VueJS][6]. 35 | 36 | ![django-vue04.png](img/django-vue04.png) 37 | 38 | 39 | ### Projetos antigos 40 | 41 | Este projeto é baseado em: 42 | 43 | * [django-vue-archived][10] 44 | * [crm-django-vuejs-archived][11] 45 | * [django-vuex-coreui-free-vue-admin-template][12] 46 | 47 | 48 | ### Links: 49 | 50 | [Django][5] 51 | 52 | [VueJS][6] 53 | 54 | [axios][7] 55 | 56 | [vue-routers][8] 57 | 58 | [Django Rest Framework][9] 59 | 60 | [nvm gist][13] 61 | 62 | 63 | [1]: https://github.com/rg3915/django-vuejs-01-vue-inner-django 64 | [2]: https://github.com/rg3915/django-vuejs-02-vue-cli-static 65 | [3]: https://github.com/rg3915/django-vuejs-03-separated 66 | [4]: https://github.com/rg3915/django-rest-framework-vuejs 67 | [5]: https://www.djangoproject.com/ 68 | [6]: https://vuejs.org/ 69 | [7]: https://github.com/axios/axios 70 | [8]: https://router.vuejs.org/ 71 | [9]: https://www.django-rest-framework.org/ 72 | [10]: https://github.com/rg3915/django-vue-archived 73 | [11]: https://github.com/rg3915/crm-django-vuejs-archived 74 | [12]: https://github.com/rg3915/django-vuex-coreui-free-vue-admin-template 75 | [13]: https://gist.github.com/rg3915/6fad3d19f2b511ec5da40cef5a168ca5 76 | -------------------------------------------------------------------------------- /img/django-vue01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rg3915/django-vuejs-experience/10fafad2405c36dfe3ef7e5211d1ac2180c3b966/img/django-vue01.png -------------------------------------------------------------------------------- /img/django-vue02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rg3915/django-vuejs-experience/10fafad2405c36dfe3ef7e5211d1ac2180c3b966/img/django-vue02.png -------------------------------------------------------------------------------- /img/django-vue03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rg3915/django-vuejs-experience/10fafad2405c36dfe3ef7e5211d1ac2180c3b966/img/django-vue03.png -------------------------------------------------------------------------------- /img/django-vue04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rg3915/django-vuejs-experience/10fafad2405c36dfe3ef7e5211d1ac2180c3b966/img/django-vue04.png --------------------------------------------------------------------------------