Flask Documentation (1.1.x)generate URLs for that particular function, and returns the message we want to display in the user’s browser. Just save it as hello.py or something similar. Make sure to not call your application flask.py not to forget to set the enctype="multipart/form-data" attribute on your HTML form, otherwise the browser will not transmit your files at all. Uploaded files are stored in memory or at a temporary location layout will look like this: /home/user/Projects/flask-tutorial ├── flaskr/ │ ├── __init__.py │ ├── db.py │ ├── schema.sql │ ├── auth.py │ ├── blog.py │ ├── templates/ │ │ ├── base.html │0 码力 | 428 页 | 895.98 KB | 1 年前3
Flask Documentation (1.1.x)generate URLs for that particular function, and returns the message we want to display in the user’s browser. Just save it as hello.py or something similar. Make sure to not call your application flask.py not to forget to set the enctype="multipart/ form-data" attribute on your HTML form, otherwise the browser will not transmit your files at all. Uploaded files are stored in memory or at a temporary location your project layout will look like this: /home/user/Projects/flask-tutorial flaskr/ __init__.py db.py schema.sql auth.py blog.py templates/ base.html auth/ login.html register.html blog/ create0 码力 | 291 页 | 1.25 MB | 1 年前3
Django 2.2.x Documentationyears’ worth of database-schema problems. Here’s a quick example: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def objects. It’s as easy as registering your model in the admin site: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 2915 页 | 2.83 MB | 1 年前3
Django 2.1.x Documentationof database-schema problems. Here’s a quick example: Listing 1: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def __str__(self): as easy as registering your model in the admin site: Listing 2: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models.CharField(max_length=200) frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 1910 页 | 6.49 MB | 1 年前3
Django 2.1.x Documentationyears’ worth of database-schema problems. Here’s a quick example: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def objects. It’s as easy as registering your model in the admin site: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django 3.2.x Documentationof database-schema problems. Here’s a quick example: Listing 1: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def __str__(self): required is to register your model in the admin site: Listing 2: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models.CharField(max_length=200) frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 2199 页 | 7.89 MB | 1 年前3
Django 3.2.x Documentationyears’ worth of database-schema problems. Here’s a quick example: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def only step required is to register your model in the admin site: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 3121 页 | 3.08 MB | 1 年前3
Django 2.0.x Documentationyears’ worth of database-schema problems. Here’s a quick example: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def __str__(self): objects. It’s as easy as registering your model in the admin site: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models.CharField(max_length=200) frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port 20 码力 | 1880 页 | 6.41 MB | 1 年前3
Django 2.0.x Documentationyears’ worth of database-schema problems. Here’s a quick example: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def objects. It’s as easy as registering your model in the admin site: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 2746 页 | 2.67 MB | 1 年前3
Django 3.1.x Documentationof database-schema problems. Here’s a quick example: Listing 1: mysite/news/models.py from django.db import models class Reporter(models.Model): full_name = models.CharField(max_length=70) def __str__(self): required is to register your model in the admin site: Listing 2: mysite/news/models.py from django.db import models class Article(models.Model): pub_date = models.DateField() headline = models.CharField(max_length=200) frameworks, not Web servers.) Now that the server’s running, visit http://127.0.0.1:8000/ with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked! Changing the port By0 码力 | 2053 页 | 6.92 MB | 1 年前3
共 507 条
- 1
- 2
- 3
- 4
- 5
- 6
- 51













