- Style of release notes: http://shanalikhan.github.io/2016/05/14/Visual-studio-code-sync-settings-release-notes.html
- Google: syncthing --reset-delta -> Google: syncthing delta sync -> https://danie1.me/2019/01/29/my-journey-to-syncthing/
- 程序员的成长离不开哪些软技能? - 知乎 (from: https://zhuanlan.zhihu.com/p/24357770)
-
Microsoft design
-
Apple design
-
Google design
-
Python design
-
Java design
-
Django design
-
Minimalism
-
sexy web design
-
Prototyping
django membership
- Google: django membership -> Building a Membership System in Django under 5 mins. _ Level Up Coding, 如何利用Django在5分钟内开发会员制订阅系统?_大江狗-CSDN博客
- justdjango_video-membership_ A basic video membership website built with Django and Stripe payments
- I Built a Members' Area on My Website with Python and Django. Here's What I Learned.
Django membership luckydraw / lottery
- Google: django membership lucky draw -> 用 Django 與 SQLite 架抽籤網站 -> uranusjr_django-tutorial-for-programmers_ Chapter text and example code for the Django tutorial first appeared during ITHome Ironman 7
-
https://jeffknupp.com/blog/2014/03/03/what-is-a-web-framework/
-
Google: what is a web framework -> Web Frameworks How To Get Started
-
Google: what is a web framework -> https://www.quora.com/What-is-a-web-framework-1
-
Google: what is a web framework -> Why You Shouldn't Use A Web Framework - DEV Community 👩💻👨💻
-
Git小书-图书-图灵社区 -> 1000copy的文章-图灵社区 -> 《bootstrap小书》免费上线。节省时间快速学习bootstrap框架的利器-图灵社区 -> bootstrap-图灵社区 -> 如何水水地写一个网站。(草稿)-图灵社区
-
Google: syncthing -> Syncthing就是我要的同步备份软件 | 底噪 -> WEB是如何工作的 | 底噪
Django, Flask, Masonite, Vue.js, FastAPI, Sanic
- Table of Contents - Full Stack Python (django, flask, vue.js...no masonite, FastAPI)
- Real Python.com (django, flask...no vue.js, masonite)
- Flask vs. Django: Choose Your Python Web Framework
- Django和Flask这两个框架在设计上各方面有什么优缺点?
- Google: django.db.utils.InternalError: (1060, "Duplicate column name -> django数据库migrate失败的解决方法 | 卡瓦邦噶! -> Django中null和blank的区别 | 卡瓦邦噶! -> 如何学Python? | 卡瓦邦噶! -> Python_Golang Web 入坑指南 — python-web-guide 0.1 文档
- Is Django a Full Stack Framework? - William Vincent
- 2019年小结 - 小明明s à domicile -> huge-success_sanic - Async Python 3.6+ web server_framework _ Build fast. Run fast, dongweiming_lyanna_ My Blog Using Sanic
如何打造更好的科技新創 (Startup) 工作環境和組織文化?
- Server For Hackers
- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04
- Google: python tutorial -> Django Tutorial in Visual Studio Code
- PyCoder's Weekly #363 – APRIL 9, 2019 -> Python Development in Visual Studio Code (Setup Guide)
- Google: flask tutorial -> Flask Tutorial in Visual Studio Code
- A curated list of awesome Python frameworks, libraries, software and resources
Q: 2020-06-07: What if python3.8
, which I installed with sudo apt install python3.8
, doesn't not come with pip3
?
Q: 2019-07-26: What if running Django on Docker? (Just like running Wordpress on Docker)
- Google: PHP docker -> Google: wamp docker -> [Devilbox](http://devilbox.org/) (is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** and **MEAN** and running on all major platforms.) -> Google: django stack docker
Q: 2019-09-12: What if we have a using database? ( integrate Django into legacy databases)
- Google: django existing database -> Django ORM Cookbook » 5. How to convert existing databases to Django models, https://django-book.readthedocs.io/en/latest/chapter18.html
- About - William Vincent -> 8 Reasons Why Learning Django is Hard - Django Boston (January 2019)
- Official Polls tutorial - for intermediate web developers
- Django Girls
- Django Tutorials - Real Python (testing, RESTful API, deployment)
- RealPython - growing list of tutorials, some out-of-date
- Django Web Framework (Python) - Learn web development | MDN, Django 網站框架 (Python)
- Mozilla - lending library app
- Django Tutorial in Visual Studio Code
- Why Django: Introduction Django For Beginners
- Django for Beginners - 3 apps with CBVs
- Google: Django for Beginner -> SimpleIsBetterThanComplex - A Complete Beginner's Guide to Django - beginner’s guide 7-part series (Django 1.11)
- Awesome Django
- Django 2 CRUD Tutorial: Generic Class-Based Views | Techiediaries
- Get Started With Django Part 1: Build a Portfolio App
- Python Django Crash Course - YouTube
- 2019-10-12: Google:django custom user model -> Google:django custom user model example --> Google:django blog model code example -> Building A Blog Application With Django | Django Central (Django 2.x)
- 2019-10-14: Google: django foreign key on_delete -> Django2.0から必須になったon_deleteの使い方 - Django2の実力をつけるチュートリアルサイトDjangoBrothers
- 2019-10-18: 12 Hour Coding Livestream - Creating an Online Game with Python - YouTube -> Tech With Tim - YouTube -> Tech With Tim - Python & Java Programming Tutorials - techwithtim.net -> Python Django Tutorial - techwithtim.net & Django Tutorial - Setup, Installation and Page Navigation - YouTube
- 2019-10-20: Google: django why appname is added twice in url -> Web Development with Django (article) - DataCamp
- 2019-10-25: Google: django tw -> twtrubiks_django-tutorial Django 基本教學 - 從無到有 Django-Beginners-Guide 📝 (Django 1.11)
- 为什么我学了Django/Flask,还是不会做Web开发?
- Java Web 后台开发效率提高
- 值得关注的开源软件推荐
- 如何在开源项目中学到更多
Tango with Django, Django Girls, MDN, Microsoft's Visual Studio Code, webpack tw -> django tw, django cn
- Tango with Django: 1.5, 1.7, 1.9/1.10/1.11, 2.x
- https://tango-with-django.readthedocs.io/en/latest/
- book manuscript: https://github.com/leifos/tango_with_django_2, implementation as code: https://github.com/maxwelld90/tango_with_django_2_code/
- https://wsvincent.com/django-custom-user-model-tutorial/ - Django for Beginners / APIs / Professionals = https://wsvincent.com/ = https://djangochat.com
- Why Django: Introduction Django For Beginners
- Complete source code: https://github.com/wsvincent/djangoforbeginners
- 2019-10-22: DjangoCon 2019 - Search From the Ground Up by William S. Vincent - YouTube
- Learn Enough to Be Dangerous
- 想用Django+ Bootstrap写一个网站, 有哪些比较系统完整的书或者视频可以参考? - 知乎
- Google: django bootstrap教學 -> [Day16] 柚子放學後的網頁生活 - Django & Bootstrap - iT 邦幫忙__一起幫忙解決難題,拯救 IT 人的一天 -> 柚子放學後的網頁生活
- 2019-10-10: Introduction to class-based views | Django documentation | Django -> Google: Ancestors (MRO) -> Django Tutorial for Programmers: 19. Class-based Views - iT 邦幫忙 -> 為程式人寫的 Django Tutorial :: 2014 iT 邦幫忙鐵人賽 (@2014) = https://github.com/uranusjr/django-tutorial-for-programmers/tree/master
- 2019-10-14: Google:django "INSTALLED_APPS." % (module, name) -> Day7 : 探討 INSTALLED_APPS - iT 邦幫忙 -> From Django 1.11 to Django 2.1 :: 2019 iT 邦幫忙鐵人賽
- 2019-10-23: Google: django.db.utils.IntegrityError: FOREIGN KEY constraint failed sqlite createsuperuser -> 实战:利用Django开发部署自己的个人博客(5)Django admin后台管理| 人生苦短 17python
- A Complete Beginner's Guide to Django (Django 1.11)
- Google: django bootstrap4 -> How to Use Bootstrap 4 Forms With Django - Simple is Better Than Complex -> Series -> A Complete Beginner's Guide to Django
- Google: django bootstrap4 -> Django搭建个人博客:使用 Bootstrap 4 改写模板文件 - Django搭建个人博客 - SegmentFault 思否 -> Django搭建个人博客教程 (Django 2.1)
- Don Wei Ming https://github.com/dongweiming/lyanna
- Google: Django template not found -> Django’s Templates - Python Django Tutorials -> Mastering Django 2 – The Book - Python Django Tutorials
- CodingEntrepreneurs - YouTube
- Try DJANGO TUTORIAL Series (v2.2) _ PYTHON Web Development with Django version 2.2 - YouTube -> https://github.com/codingforentrepreneurs/Try-Django-2.2
- Series HEAD Try DJANGO Tutorial - 1 - Welcome - YouTube.html -> Try DJANGO TUTORIAL Series (v2.2) _ PYTHON Web Development with Django version 2.2 - YouTube
- How to Integrate Django to any Javascript Front End _ Django to React _ Django to Angular - YouTube
- Upgrading Try DJANGO 1.11 to Django 2.0 _ Django TUTORIAL - YouTube
- Build a Rest API with the Django REST Framework - YouTube
- Blog API with Django Rest Framework 1 of 33 - Welcome - YouTube
- Custom Django User Model _ DJANGO Tutorial - YouTube - CodingEntrepreneurs
- Google: django namespace app_name -> namespace vs app_name r/django -> Try DJANGO Tutorial - 35 - In App URLs and Namespacing - YouTube (Django 2.2)
- Pygame Tutorial - Creating Tetris - YouTube -> Python Django Tutorial - techwithtim.net
- Python-100-Days_95.使用Django开发项目.md at master · jackfrued_Python-100-Days & RESTful
- Structuring Your Project — The Hitchhiker's Guide to Python
- 項目生成器: cookiecutter (用cookiecutter来创建新项目)
- pydanny_cookiecutter-django_ Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
- -> Google: Real python cookiecutter -> Development and Deployment of Cookiecutter-Django via Docker – Real Python
- -> Google: fullstack python Cookiecutter -> The Top 39 Cookiecutter Open Source Projects -> Cookiecutter Django Vue
- pydanny_cookiecutter-django_ Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
- r/learnpython - Where can I learn how to structure a Python project?
- 超干!如何建立一个完美的 Python 项目? - Python编程时光 = How to set up a perfect Python project: Best practices for setting up a project to maintain the highest quality code
- Two scoops of Django
- Starting a Django Project – Real Python
- Template for starting Django projects
- DjangoX - starter framework for new Django projects (an intro: Introducing DjangoX - A new starter framework for Django)
- DRFX - starter framework for new Django REST Framework projects
- 2019-10-18: Google: django best practices
- 2019-10-18: Google Image: django best practices
- 2019-11-25: how django works
- Google: django use template in another app -> Get Started With Django Part 1 - Build a Portfolio App - Real Python shows a complete example to build a web site with multiple apps.
- Managing static files (e.g. images, JavaScript, CSS) | Django documentation | Django
- Youtube: django static files - > How to Use Django Static Files (Django Tutorial) | Part 5 - YouTube
2019-10-14: After moving model class around, I get an error occurs during python manage.py migrate
:
- Google: Related model 'mysite.Location' cannot be resolved -> django - ValueError: Related model u'app.model' cannot be resolved - Stack OverflowNamespace / app_name
Try running migrations one by one for every model. This way you can debug the app
you are facing problem with :
python manage.py migrate location # that I delete class Location, and move it to mysite.
python manage.py migrate mysite # that I move 2 classes in: Location, Status.
python manage.py migrate profiles # that it has models link to Location and Status.
2019-10-14: Should I commit migration files in repo?
- Google: django should i commit migration file -> python - Should I be adding the Django migration files in the .gitignore file? - Stack Overflow
Even though I can re-gerenate migration in production via python manage.py makemigrations
, it is better to commit them to version control in order to keep track of database schema changes (esp. having data in db).
in local ENV: it is OK to run migrate
:
python manage.py makemigrations
python manage.py migrate
Now commit these newly created files, something like below.
git add app/migrations/...
git commit -m 'add migration files' app/migrations/...
In PRODUCTION: it is better not run makemigrations
: I should not run makemigrations
in production at all. I can run migrate
in production and you will see the migrations are applied from the migration file that you committed from local. This way you can avoid all conflicts.
python manage.py migrate
2019-10-14: https://docs.djangoproject.com/en/2.2/ref/models/fields/ to see what can we do when define models.
2019-10-12: django 2 use model from another app.
App profile
doesn't see app location
? (In app profile
, there is a model class Profile
having a ForeignKey location
, which is defined in app location
.)
"INSTALLED_APPS." % (module, name)
RuntimeError: Model class location.models.Location doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
It seems talking about namespace / app_name.
- Google: django namespace app_name -> namespace vs app_name r/django -> Try DJANGO Tutorial - 35 - In App URLs and Namespacing - YouTube (Django 2.2
- Google: django namespace app_name -> Namespace error with Django 2.0 Treehouse Community
So I define a app_name
in "location\urls.py":
app_name = "location"
But defines app_name
doesn't help.
- Google: Model class location.models.Location doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. -> python - Django model "doesn't declare an explicit app_label" - Stack Overflow -> Fix weird exceptions when running Django tests - Michal Bock - Medium
People claim that delete __init__.py
helps, and the article shows that the bug is caused by __ init__.py
.
The reason why you get these exceptions is that you structured your admin and/or models as packages and imported the individual admin and/or model classes in their respective __init__.py files.
So, what's the correct way to use __ init__.py
?
- -> Google: python __ init__.py -> Python 的 Import 陷阱 - PyLadies Taiwan - Medium
And we go back to the question: django 2 use model from another app.
And about the error message: "INSTALLED_APPS." % (module, name)
- Google:django "INSTALLED_APPS." % (module, name) -> Day7 : 探討 INSTALLED_APPS - iT 邦幫忙 -> From Django 1.11 to Django 2.1 :: 2019 iT 邦幫忙鐵人賽
OK, I find the answer finally: I forget to register the app location
in setting.py
+ correct understanding of Python package & module. What I need to do is 2 things:
# revenue_engine/setting.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
...
'mysite',
'profiles',
'location',
]
# revenue_engine/profiles/models.py
from django.db import models
...
from location.models import Location
# Create your models here.
location.models
== package location
has a module models.py
== folder location
has a file models.py
.
2019-10-23: During models in app jobs
up (5 models in jobs
has FK to each other): Running makemigrations
and migrate
has no problems. when I run python manage.py createsuperuser
, there is django.db.utils.IntegrityError: FOREIGN KEY constraint failed
first and django.db.utils.InternalError: (1060, "Duplicate column name 'created_by_id'")
error later. (I have just created models in app jobs
. )
Google: django.db.utils.IntegrityError: FOREIGN KEY constraint failed sqlite createsuperuser
Google: django.db.utils.InternalError: (1060, "Duplicate column name
- -> django数据库migrate失败的解决方法 | 卡瓦邦噶! -> Django中null和blank的区别 | 卡瓦邦噶!
- python - Duplicate column name - Stack Overflow
Since makemigrations
is OK/no problems, than I can run migrate
with --fake
option:
python manage.py makemigrations
python manage.py migrate --fake
And then I can run createsuperuser
with no problem.
Custom user model should be admin-compliant. Generally speaking, there are 4 different ways to extend the existing User model #:
- Using a Proxy Model
- Using One-To-One Link with a User Model (UserProfile)
- Creating a Custom User Model Extending AbstractBaseUser
- Creating a Custom User Model Extending AbstractUser
there is no best solution. It will really depend on what you need to achieve. Keep it simple and choose wisely.
- Proxy Model: You are happy with everything Django User provide and don’t need to store extra information.
- User Profile: You are happy with the way Django handles the auth and need to add some non-auth related attributes to the User.
- Custom User Model from AbstractBaseUser: The way Django handles auth doesn’t fit your project.
- Custom User Model from AbstractUser: The way Django handles auth is a perfect fit for your project but still you want to add extra attributes without having to create a separate Model.
- Custom Django User Model _ DJANGO Tutorial - YouTube - CodingEntrepreneurs
- The Guide: How to Create a Custom Django User Model | Post | Coding For Entrepreneurs -> Customizing authentication in Django | Django documentation | Django
- Repo: GitHub - codingforentrepreneurs_eCommerce: We're going to take you step-by-step to build a modern, fully open-source, eCommerce web application using Python, Django, Bootstrap, Javascript, and more
- Customizing authentication in Django | Django documentation | Django
- Google: Django custom user model -> Django: How to Extend The User Model (aka Custom User Model) - William Vincent, and I take this. (2020-03 update: LearnDjango.com - Django Best Practices_ Custom User Model)
- Google: Django custom user model -> Django Tips #6: Custom User Model - William Vincent
- Google: Django custom user model -> How to Extend Django User Model | Simple is Better Than Complex - here are 4 different ways to extend the existing User model,
and I take the #2. - Google: Django custom user model one-to-one -> Tango with Django
- Google: Django custom user model one-to-one -> How to extend Django User model
- 2020-07-15: Get Started With Django Part 2_ Django User Management – Real Python
Using a reference custom User model from How to Extend Django User Model | Simple is Better Than Complex, when I login to admin, there is RelationObjectDoesNotExist
exception occurs. (I take the #2 User Model)
- Google: RelatedObjectDoesNotExist at /admin/login/ -> I keep getting RelatedObjectDoesNotExist at admin_login. How do I successfully create user profiles in Django via a one to one relationship? - Stack Overflow
If you define a
OneToOneField
that does not mean that every object of the targeted model contains an object from the referencing model. AOneToOneField
in essence is aForeignKey
with aunique=True
(and some extra logic to do proper naming).Here it thus means that although every
Profile
has a related user, not every user has aProfile
. It is possible that there areUser
s for which noProfile
exists.If you thus query
some_user.profile
there are two scenario's that can unfold:
- there is a related
Profile
object that is the fetched, and returned; or- there is no such object, and then it raises a
RelatedObjectDoesNotExist
error.There have been some proposals to return
None
in the latter case, but due to backwards compatibility, this will probably not be implemented in the (near) future, or implemented at all.So you probably have a user for which there is no profile. Based on the full traceback, the error happens on the line
instance.profile.save()
. We can fix this by creating a profile in case there is no such profile:from django.core.exceptions import ObjectDoesNotExist @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): try: instance.profile.save() except ObjectDoesNotExist: Profile.objects.create(user=instance)We thus check if the
instance
has a.profile
that leads to aProfile
object. In case it has not, it will raise an exception, and then we create one.This is also more in the Easier to Ask Forgiveness than Permission (EAFP) spirit of Django.
- 2019-10-11: 基于类的视图 | Django 文档 | Django
- 2019-10-11: A Complete Beginner's Guide to Django - Part 6 :When working with GCBV, it’s always good to have the ccbv.co.uk opened for quick reference.
- 2020-06-05: r/Django - Django Class Based Views in Diagrams
- ccbv.co.uk (django CBVs)
- cdf.9vo.lt (django forms)
- cdrf.co (drf CBVs)
- 2019-10-29: Google:django CreateView example -> https://www.agiliq.com/blog/2019/01/django-createview/
- 2019-10-03: Class Based Views Projects Coding For Entrepreneurs -> https://github.com/codingforentrepreneurs/Class-Based-Views
- 2019-10-10: (Google: django custom user model one-to-one ->How to extend Django User model -> Google: FormView -> Google: FormView django -> https://docs.djangoproject.com/en/2.2/ref/class-based-views/generic-editing/ -> https://docs.djangoproject.com/zh-hans/2.2/topics/class-based-views/intro/ -> ) Introduction to class-based views | Django documentation | Django -> Google: Ancestors (MRO) -> Django Tutorial for Programmers: 19. Class-based Views - iT 邦幫忙 -> Django Class-Based-View Inspector -- Classy CBV
- 2019-10-10: Ancestors (MRO) -> (Method Resolution Order, MRO) (方法解析顺序)
- 2019-10-10: Google: class based view -> Django : Class Based Views vs Function Based Views - Sarthak Kumar - Medium
- 2020-06-10: r/Django Learning Viewsets, Mixins, Apiview in Depth
- 2020-06-13: r/Django - Do you use Postman while developing your DRF API? What are the main Postman features I should learn about to help me develop my API?
- 2020-06-13: r/Django - How to create graph structure using Django?
- Google: what can I do in Django settings -> Django by errors - a different Django tutorial — Django by errors 0.2 documentation
- Google: what can I do in Django settings -> Top 10 Django Mistakes _ Toptal
- 2019-11-02: Google:django tw ->[埋坑 Django 多國語言 - Lililala - Medium] -> 埋坑 Django 整合 reCAPTCHA v3 - Lililala - Medium
-
Google:PHPMailer send attachment -> Tutorial · PHPMailer_PHPMailer Wiki.html
-
Google:django mailer -> https://djangopackages.org/packages/p/django-mailer/ -> https://github.com/pinax/django-mailer
- 七夜的 CoolBlog CoolBlog开发笔记 - 小专栏
- tuot / django-blog-tutorial
- https://github.com/topics/django -> https://github.com/liangliangyy/DjangoBlog
- HelloGitHub 微信公众号 -> HelloDjango https://github.com/HelloGitHub-Team/HelloDjango-blog-tutorial
- GitHub标星8100:Python中文资源,从新手到老司机,只要100天量子位量子位 -> https://github.com/jackfrued / Python-100-Days
- r/Django - Checkout my django based Bookshop project
- Work flow / business logic
- Google:django workflow -> https://djangopackages.org/grids/g/workflow/ -> https://github.com/viewflow/viewflow, http://viewflow.io/
- Task Queue *
- Awesome Django - curated list of awesome Django resources
DjangoX - starter framework for new Django projectsDRFX - starter framework for new Django REST Framework projects- SQLjs - online SQL interpreter
- HTML Escape Tool - automatically escape/unescape HTML code
Google, github, YouTube
-
Python Language
-
Code Standard
- PEP 8 -- Style Guide for Python Code _ Python.org
- 2019-11-22: PEP 8 The Style Guide for Python Code.html by Kenneth Reitz (for humans)
- Google: -> instagram pycon 2017 -> Instagram 在 PyCon 2017 的演讲摘要 _ Piglei (-> piglei_one-python-craftsman_ 来自一位 Pythonista 的编程经验分享,内容涵盖编码技巧、最佳实践与思维模式等方面。 ) -> 关于我 Piglei:友情链接 -> Python 代码规范小结
-
CheatSheet
- Python language notes & cheatsheet
- Python CheatSheet
- Django CheatSheet
- PHP CheatSheet
- Django Girls
- Books by Aqiliq https://books.agiliq.com/en/latest/
- Django for Beginners / APIs / Professionals = https://wsvincent.com/ = https://djangochat.com
- Google: -> instagram pycon 2017 -> Instagram 在 PyCon 2017 的演讲摘要 _ Piglei -> piglei_one-python-craftsman_ 来自一位 Pythonista 的编程经验分享,内容涵盖编码技巧、最佳实践与思维模式等方面。
- 2019-11-22: Google: python rename -> Google: python3 遍历重命名文件 -> 13.9 通过文件名查找文件 — python3-cookbook 3.0.0 文档
- Google: bash ctrl-a -> bash keyboard shortcuts - Linux - SS64.com
- Google: f-string -> Python之美 - 知乎
-
Package Manager & Virtual Environment
-
12. Virtual Environments and Packages — Python 3.8.0 documentation
-
pipenv: 2020-06-08: 不要用 Pipenv - 知乎 -> Pipenv_ promises a lot, delivers very little _ Chris Warrick
- virtualenv/venv: 2019-11-25: 要不我们还是用回 virtualenv_venv 和 pip 吧 - 知乎, 相比 Pipenv,Poetry 是一个更好的选择 - 知乎
-
virtualenv: 2019-11-25: Pipenv & Virtual Environments — The Hitchhiker's Guide to Python = Pipenv & 虚拟环境 — The Hitchhiker's Guide to Python
-
pipenv: 2019-11-22: 也谈「不要用 Pipenv」 - 知乎, 2019-11-25: PyCon 2018 之 Python 未来的依赖管理工具 pipenv - 知乎
-
pipenv: 2019-11-25: 相比 Pipenv,Poetry 是一个更好的选择 - 知乎
-
-
Version control
- 独立电子书-图灵社区 -> 这『六本』电子书助你成为顶尖程序员(含下载地址)-图灵社区 -> Google: GitHub 漫游指南 -> GitHub 漫游指南 – GitHub 漫游指南, phodal_github GitHub 漫游指南- a Chinese ebook on how to build a good project on Github.
- 独立电子书-图灵社区 -> 这『六本』电子书助你成为顶尖程序员(含下载地址)-图灵社区 -> Google: GitHub 漫游指南 -> GitHub 漫游指南 – GitHub 漫游指南 -> phodal_fe 《我的职业是前端工程师》 - Ebook:I'm a FrontEnd Developer
-
Dockerization
- Youtube: django docker
- 2020-06-15: r/Django -Dockerizing Django with Postgres, Gunicorn, and Nginx
-
Data
- SQLite client:
- DB Browser for SQLite
- SQLite client:
-
Template / Front-end Framework
-
UML graph
- 2019-10-13: PlantUML (from GitChat)
- 2019-10-13: Graphviz
- 2019-10-13: Google: Graphviz uml -> DotUML https://dotuml.com/
- 2019-10-18: draw.io as techwithtim
-
Code Analysis
- php code analytic -> php code analysis -> php code graph -> php call graph
-
Tooling
- Package. Google: gentelella-admin -> Google: gentelella bootstrap 4 -> https://stackshare.io/stackups/bootstrap-vs-gentelella by Stackshare - Software and technology stacks used by top companies
- Package. Google: gentelella-admin -> Google: gentelella bootstrap 4 -> Google: bootstrap 4 admin template -> 20 Free Bootstrap Admin & Dashboard Templates for 2019
- Package. 2020-07-16: r/django - Django Dashboard - AdminLTE Design (MIT License) coded as a simple starter with deployment scripts for Docker, Gunicorn_Nginx -> https://github.com/app-generator/django-dashboard-adminlte
- Package. Google: django bootstrap4 -> How to Use Bootstrap 4 Forms With Django - Simple is Better Than Complex
- Package. django-crispy-forms.
- Package. 2019-11-18: Django Chat Podcast - episode 40 -> https://github.com/wsvincent/awesome-django -> kennethlove - django-shapeshifter: A CBV to handle multiple forms in one view
- Package. 2019-10-24: Google:django should I create updated by -> https://django-simple-history.readthedocs.io/en/latest/
- Package. 2019-11-21: PyCoder’s Weekly Issue #395 viewflow: Reusable Workflow Library for Django -> GITHUB.COM/VIEWFLOW
- Package. 2019-11-21: PyCoder’s Weekly Issue #395 viewflow: Reusable Workflow Library for Django -> django-fsm: Friendly Finite State Machines for Django GITHUB.COM/VIEWFLOW
- Package. 2019-11-21: PyCoder’s Weekly Issue #395 viewflow: Reusable Workflow Library for Django -> django-river: Django Workflow Library GITHUB.COM/JAVRASYA
Tutorial in prototyping with Flask
- Google: flask tutorial -> Flask - Full Stack Python
- 2020-07-07: r/learnpython - What do I need to learn to do backend with python? -> https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-v-user-logins
- Google: cookiecutter -> Python cookiecutter-flask,如何在几分钟内启动一个像模像样的网站[视频] - 知乎
- PyCon China 2019 演讲:基于 Flask 的 Web API 开发指南 - 知乎
- https://github.com/Microsoft/frontend-bootcamp
- Front-end Developer Handbook by FrontendMasters, (from Ricky: https://legacy.gitbook.com/book/frontendmasters/front-end-handbook-2017/details -> Google: Front-end Developer Handbook -> https://github.com/FrontendMasters/front-end-handbook-2019 = https://frontendmasters.com/books/front-end-handbook/2019/ -> https://frontendmasters.com/books/)
- Web Development In 2019 - A Practical Guide - YouTube
- JavaScript 30 — Build 30 things with vanilla JS in 30 days with 30 tutorials https://javascript30.com/
- 2020-06-04: Google: fullstack python -> fullstack node -> fullstack typescript -> fullstack react -> fullstack vue ->Fullstack Node.js- The Complete Guide to Building Production Apps with Node.js - # Learn to build production Node.js apps, newline - Learn to program React, Angular, Vue, Ethereum, and Node.js with projects -> 30 Days of Vue -- newline
- Bootstrap Basics Projects Coding For Entrepreneurs -> https://github.com/codingforentrepreneurs/Bootstrap-Basics-v4
- Git小书-图书-图灵社区 -> 1000copy的文章-图灵社区 -> 《bootstrap小书》免费上线。节省时间快速学习bootstrap框架的利器-图灵社区 -> bootstrap小书 · GitBook (Legacy)
- Meathill - 用 Vue 改造 Bootstrap,渐进提升项目框架
- PyCoder's Weekly Issue #362 (April 2, 2019) -> Useful Django Packages in 2019 -> When and Why Would I Need a JS Framework for Django?
- PyCoder's Weekly Issue #362 (April 2, 2019) -> Useful Django Packages in 2019 -> How Does the Frontend Communicate with the Backend?
- The 2019 UI Design Crash Course for Beginners - YouTube
- The 2019 Frontend Developer Crash Course - HTML & CSS Tutorial for Beginners - YouTube
- How to Make a Custom Website from Scratch using WordPress (Theme Development) - 2019 Tutorial - YouTube
- 2020-06-04: Google: fullstack python -> fullstack node -> fullstack typescript -> fullstack react -> fullstack vue -> Vue.js - Full Stack Python
- flask-vue-spa is an example project with a Flask API on the backend and Vue on the front.
- Developing a Single Page App with Flask and Vue.js walks through all of the environment configuration, project setup and coding you need to do to build a legitimate Vue.js application that uses a Flask API on the backend.
- Building Modern Applications with Django and Vue.js combines Django, Django REST Framework, Vue.js and Auth0 (an authentication web API) in an introductory web application.
- 2020-06-05: r/Django - Building Django + Vue.js applications with AWS CDK and GitLab CI and how to scale celery workers to zero
- 2020-06-05: r/Django - Django REST and Vue JS - Free tutorial -> 01 Vue JS and Django REST - Creating a Video Rating Application. Introduction - YouTube
- 我如何使用 Django + Vue.js 快速构建项目
- 我如何使用 Django + Vue.js 快速构建项目 -> Source code: https://github.com/tmpbook/django-with-vuejs
- Django-bootstrap4
- Google: django bootstrap4 -> How to Use Bootstrap 4 Forms With Django - Simple is Better Than Complex -> Series -> A Complete Beginner's Guide to Django
- Google: django bootstrap教學 -> 想用Django+ Bootstrap写一个网站, 有哪些比较系统完整的书或者视频可以参考? - 知乎
- Google: how to learn vue.js -> How do I learn Vue.js_ - Quora
- Google: vue -> Vue JS Crash Course - 2019 - YouTube
- Learn Vue.js - Full Course for Beginners - 2019 freeCodeCamp.org - YouTube
- Vue.js 2.0 In 60 Minutes - YouTube
- Ralph Vue.js 30天 - iT 邦幫忙::一起幫忙解決難題,拯救IT 人的一天 - iThome
- 白宦成 - 给后端程序员看的 Vue 快速入门教程
Youtube
- The 2019 UI Design Crash Course for Beginners - YouTube
- The 2019 Frontend Developer Crash Course - HTML & CSS Tutorial for Beginners - YouTube
- How to Make a Custom Website from Scratch using WordPress (Theme Development) - 2019 Tutorial - YouTube
- Google: vue -> Vue JS Crash Course - 2019 - YouTube
- Python - Intro to Computer Science - Harvard's CS50 (2018) - YouTube
- Learn Vue.js - Full Course for Beginners - 2019 - YouTube
- Make Money with Tensorflow 2.0 - YouTube
TODO: read them
Tooling - SQL client
- Sqlite
Tooling - GIT
- 大妈 Zoom.Quiet - 如何在繁重工作间隙保持良好的自学节奏和效能?
- 如何半小时搞定 3 小时的工作&漫谈极速提升开发效率 - Vim, bash, typing, 标准指法, etc
- 郭方超 - 流式编程:让页面飞起来
- BinaryCoding - Mac 打造高效工作流
- 打造高效「Mac 工具栈」,提高工作效率
- 白宦成 - 职场高效率:用印象笔记来提升你的工作效率
- 白宦成 - 给后端程序员看的 Vue 快速入门教程
- 效率为王:终端管理工具 Tmux
- from PyCoder's Weekly #376 -> Deploying Django to Heroku With Docker (This post looks at how to deploy a Django app to Heroku with Docker via the Heroku Container Runtime.)
- 2019-11-25: Django腾讯云部署教程:+Ubuntu+Django2+Python3+Nginx+Uwsgi - 知乎
- 2019-11-25: 是时候让大家看看你用django写出来的博客了(内含部署教程视频) - 知乎
- r/django
- YouTube: raspberry pi
- YouTube: raspberry pi docker
- YouTube: raspberry pi django
- YouTube: raspberry pi syncthing
- Google: Django DRF
- Google: restful design
- API Star: API Star:一个 Python 3 的 API 框架 - 知乎 is a restful api framework
- YouTube: Django to Vue
- REST API concepts and examples - YouTube
- RESTful API 最佳实践
- Passive Income How I make $40,000_year doing nothing (software engineer edition) - YouTube
- 白宦成 - 被动收入 101 :使用云开发和 Taro 开发一个小程序
- 一篇文章赚 8 万的 14 个技巧
- 程序员副业赚钱的 8 种模式
- http://www.pythondoc.com/pythontutorial3/
- https://www.bootcss.com/
- https://docs.pythontab.com/
- Books by Aqiliq https://books.agiliq.com/en/latest/
- Python 工匠:容器的门道 - 知乎
Tech note
2019-10-22: To load .sql file into MySQL:
root@aaron-300V3A:/home/aaron/Syncthing/Sites4/Python/revenue-engine/utilities# mysql -u root itcs_dev < itcsdev.v1.0.1.sql
Google: mysql how to load .sql file -> command line - How to run SQL script in MySQL? - Stack Overflow
- use the MySQL command line client:
mysql -h hostname -u user database < path/to/test.sql
- Install the MySQL GUI tools and open your SQL file, then execute it
- Use phpmysql if the database is available via your webserver
--
Or, try to run it via script:
commit b4a89fbc3f3d230a5de18712e08aad0f74610148 Author: ringk-itcs 56421115+ringk-itcs@users.noreply.github.com Date: Mon Oct 21 15:49:28 2019 +0800
MySQL Database Population scripts 1) itcsdev_drop_tables.sql --- Drop all Website related tables (excl. Django Tables) 2) itcsdev.v1.0.1.sql --- Create tables/objects and insert rows 3) MySQL_load_sql_file.sh --- Shell wrapper to run the above scripts. su - adminitcs cd <your_local_root>/revenue-engine/utlities . ./MySQL_load_sql_file.sh itcsdev_drop_tables.sql #--- Password is same as /etc/mysql/revengine.cnf . ./MySQL_load_sql_file.sh itcsdev.v1.0.1.sql #--- Password is same as /etc/mysql/revengine.cnf
--
2019-10-23:
Q: django.db.utils.IntegrityError: FOREIGN KEY constraint failed
during python manage.py migrate
.
Google: django.db.utils.IntegrityError: FOREIGN KEY constraint failed
--
2019-10-23:
Once Models are up, we can use the Django admin application can use your models to automatically build a site area that you can use to create, view, update, and delete records.
# admin.py
from django.contrib import admin
# Register your models here.
from catalog.models import Author, Genre, Book, BookInstance
admin.site.register(Book)
admin.site.register(Author)
admin.site.register(Genre)
admin.site.register(BookInstance)
To change how a model is displayed in the admin interface you define a ModelAdmin class (which describes the layout) and register it with the model.
# Define the admin class
class BookAdmin(admin.ModelAdmin):
pass
# Register the admin class with the associated model
admin.site.register(Book, BookAdmin)
And instead, we will use the @register
decorator to register the models (this does exactly the same thing as the admin.site.register()
syntax):
# Register the Admin classes for Book using the decorator
@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
pass
# Register the Admin classes for BookInstance using the decorator
@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
pass
Further, we can configure list views by using list_display to add additional fields to the view.
class BookAdmin(admin.ModelAdmin):
list_display = ('title', 'author', 'display_genre')
Google:django admin usage
- [Django Tutorial Part 4: Django admin site - Learn web development | MDN](https //developer.mozilla.org/en-us/docs/web/css/padding) for further configure.
2019-07-24: As I am new to PHP (from Python), there is some questions about developing in PHP:
Google: php development on mac
Google: python virtual environment -> Google: php virtual environment
Q: 2019-07-26: What if I running PHP on docker? (Just like running Wordpress on Docker) -> Google: wamp docker -> Devilbox (is a modern and highly customizable dockerized PHP stack supporting full LAMP and MEAN and running on all major platforms.)
2019-07-25: As I am new to Mac, there is some questions about using Mac & install software on Mac:
Google: what software to install on a new Mac
Google: homebrew
Google: where should syncthing located on Mac
Google: zhihu mac
./database/Tables and Relational Schema.png
- About DB design: Could you explain the entities of "Status":
ScheduleStatus
SettingsStatus
AccountStatus
./mvc
- Are we using popular MVC framework (Code Igniter / CakePHP / Laravel, etc), or are we writing ourselves tidy MVC framework?
- Current: Help to develop Project-Beaver.
- Current: Concern about performance issue (esp. on update schedule).
- Future: Possibly shift the backend of Project-Beaver to Django framework.
- Future: Implement Project-Beaver with Vue.js.
Aaron setup a local WAMP server to execute Project-Beaver on.
Aaron ignore the frontend side (esp. JavaScript) and focus on backend side:
Understand how Project-Beaver internal works.
Study on Django web framework and make a simple site as a demo for technical review (for Ricky.) ->
Study on JavaScript (I have no frontend background) -> Reading a book titled "Headfirst JavaScript Programming".
Aaron try to understand how the frontend components in Project-Beaver works.
- Version control
- Python package dependency
- Database schema control (a.k.a. Database migration)
- Theme hirecature
- Theme:
- Use of Bootstrap 4
- Localization
- Time zone
- I18N
- L10N
- Sub-system: Learning_logs (~ blogging)
- Topic
- Entry
- Sub-system: Users system (membership)
- Login
- Logout
- Registration
- Login required (a.k.a. Page protection / Page restriction)
- Extending Django's user object
- API-ify
- Data exchange with frontend (e.g. with Vue.js)
- Frontend-backend decoupling (e.g. use Django Restful: DRF)
Install python 3.7
sudo apt install python3.7
Setup virtual env for Django
python3.7 -m venv django-revenue-env
source django-revenue-env/bin/activate
Install Django in virtual env. (Django version>=2.1)
python -m pip install django>=2.1
or, update requirements.txt and then install packages from it on other machines #
python -m pip freeze > requirements.txt
python -m pip -r requirements.txt
(Remark: Use brew
instead of apt
on Mac. )
Run test server
python manage.py runserver