- Abrir um shell em um container em execução:
docker exec -t -i <container_id> <shell>
- Excluir containers com status equivalente a Exited:
Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"
This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).
I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)
Main features:
| package oogaday.commons.enums | |
| enum class StatusCode(val code: Int) { | |
| Continue(100), | |
| SwitchingProtocols(101), | |
| Processing(102), | |
| OK(200), | |
| Created(201), | |
| Accepted(202), |
| package eu.anifantakis.composeapp | |
| import android.os.Bundle | |
| import android.widget.Toast | |
| import androidx.activity.ComponentActivity | |
| import androidx.activity.compose.setContent | |
| import androidx.compose.foundation.* | |
| import androidx.compose.foundation.layout.* | |
| import androidx.compose.foundation.lazy.LazyColumn | |
| import androidx.compose.foundation.lazy.items |
| { | |
| "Norte": { | |
| "AC": "Acre", | |
| "AM": "Amazonas", | |
| "AP": "Amapá", | |
| "PA": "Pará", | |
| "RO": "Rondônia", | |
| "RR": "Roraima", | |
| "TO": "Tocantins" | |
| }, |
| # Shell script to create a complete Django project. | |
| # This script require Python 3.x and pyenv | |
| # Settings.py is config to Django 2.2.12 | |
| # The project contains: | |
| # Settings config | |
| # Person model and form | |
| # Person list and detail | |
| # Person create, update and delete | |
| # Admin config |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
| class MainActivity : AppCompatActivity() { | |
| private val viewModel: NetworkStatusViewModel by lazy { | |
| ViewModelProvider( | |
| this, | |
| object : ViewModelProvider.Factory { | |
| override fun <T : ViewModel?> create(modelClass: Class<T>): T { | |
| val networkStatusTracker = NetworkStatusTracker(this@MainActivity) | |
| return NetworkStatusViewModel(networkStatusTracker) as T | |
| } |
| # The code for my article with the same name. You can find it at the URL below: | |
| # https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python | |
| # MIT License | |
| # | |
| # Copyright (c) 2021 Manohar Vanga | |
| # | |
| # 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 |
| #!/usr/bin/env bash | |
| if [[ ! -L lib || ! -L bootstrap ]]; then | |
| [[ -z $(which curl) ]] && { | |
| printf "Curl is required for this operation. Please install it with\n" | |
| printf "brew install curl\n" | |
| exit 1 | |
| } | |
| curl -fsSL "http://bit.ly/bashmatic-bootstrap" | /usr/bin/env bash | |
| fi |