# learning django 3.x

By [Untitled](https://paragraph.com/@0xefeff3be7c7400ddfb4a1cfcff0f4fc7409ffc9d) · 2022-05-08

---

create your env and django project
----------------------------------

    mkdir django
    cd django
    python3 -m virutalenv venv
    source venv/bin/activate
    pip install django
    django-admin startproject  study .
    django-admin startapp test
    

### create your model

>     cat test/models.py
>     from django.db import models
>     
>     
>     # Create your models here.
>     class Test(models.Model):
>         domain = models.URLField()
>         domainName = models.CharField(max_length=100)
>         beianID = models.TextField()
>     
>         def __str__(self) -> str:
>             return self.domainName
>

---

*Originally published on [Untitled](https://paragraph.com/@0xefeff3be7c7400ddfb4a1cfcff0f4fc7409ffc9d/learning-django-3-x)*
