Tips
How to Build a Java Project
· ☕ 4 min read
First, the compiler needs to compile .java text files into .class bytecode, and then the JVM executes the .class bytecode files. The process is not complicated; this article mainly records some of the related steps during compilation and runtime. 1. A Single Source File Create a text file Hello.java 1

Git Tips You Didn't Know
· ☕ 3 min read
1. Pages GitHub, GitLab, Bitbucket and others all offer a free static page hosting service called Pages. With the Pages service you can publish documentation, blogs, and more. Taking GitHub as an example, using Pages usually takes just a few simple steps: Create a new project: [username].github.io Commit static html

How to Safely Access request from Anywhere in Django
· ☕ 2 min read
In Django, request holds all the information for a single request. Backend processing logic frequently needs information from request. For example, the DRF framework may want to be able to obtain request at any time, or pass some parameters globally. There are third-party Django apps with tools that can satisfy

Django Snippets
· ☕ 3 min read
1. Auto-Register All Models in Admin admin.py 1 2 3 4 5 6 7 8 9 10 # -*- coding: utf-8 -*- import inspect from django.contrib import admin from . import models for name, obj in inspect.getmembers(models): try: if inspect.isclass(obj): admin.site.register(getattr(models, name)) except Exception as e: pass 2. Get All View Names Get all view names of the project