Attach to a docker container
docker exec -it project_postgres_1 bash
Switch to postgres user
root@58a96e78e770:/# su postgres
$
Attach to a docker container
docker exec -it project_postgres_1 bash
Switch to postgres user
root@58a96e78e770:/# su postgres
$
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Why two lines?</title> | |
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'> | |
<style> | |
* { | |
box-sizing: border-box; | |
font-family: 'Source Sans Pro', sans-serif; |
class PaperForm(forms.ModelForm): | |
score = forms.TypedChoiceField( | |
label="Score", | |
choices=((100, "A"), (80, "B"), (60, "C"), (0, "D")), | |
coerce=lambda x: int(x), | |
widget=forms.RadioSelect, | |
required=True, | |
) | |
class Meta: |
models.py
from django.db import models
class Topping(models.Model):
# ...
pass
class Pizza(models.Model):
# ...