This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --index-url=http://mirrors.cloud.tencent.com/pypi/simple | |
| --extra-index-url http://<username>:<password>@pypi.taijihuabao.com/ | |
| --trusted-host pypi.taijihuabao.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for cmd in firewall-cmd systemctl docker; do | |
| alias $cmd="sudo $cmd" | |
| done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name xxx; | |
| access_log /xxx/logs/dapi.access.log main; | |
| error_log /xxx/logs/dapi.error.log warn; | |
| root /xxx/dapi/www/; | |
| client_max_body_size 20m; | |
| gzip on; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [global] | |
| index-url=http://mirrors.cloud.tencent.com/pypi/simple | |
| extra-index-url=http://<username>:<password>@pypi.taijihuabao.com/simple/ | |
| trusted-host= | |
| pypi.taijihuabao.com | |
| mirrors.cloud.tencent.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% extends 'admin/base_site.html' %} | |
| {% load i18n admin_urls static admin_list %} | |
| {% block content %} | |
| <form action="" method="POST"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @admin.register(m.Article) | |
| class ArticleAdmin(admin.ModelAdmin): | |
| class Media: | |
| css = { | |
| 'all': ('admin/css/articleadmin.css',) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @admin.register(m.Article) | |
| class ArticleAdmin(admin.ModelAdmin): | |
| def get_readonly_fields(self, request, obj=None): | |
| if 'edit' in request.GET or '/add/' == request.path[-5:]: | |
| return self.readonly_fields | |
| else: | |
| return self.get_fields(request, obj) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location = / { | |
| try_files /index.html @django; | |
| } | |
| location @django { | |
| proxy_pass http://127.0.0.1:9076; | |
| proxy_redirect off; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name essaygo.taijihuabao.com; | |
| access_log /data/prd/essaygo/logs/essaygo.access.log main; | |
| error_log /data/prd/essaygo/logs/essaygo.error.log warn; | |
| root /data/prd/essaygo/www/; | |
| gzip on; | |
| gzip_min_length 4k; | |
| gzip_comp_level 6; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Singleton(type): | |
| _instances = {} | |
| def __call__(cls, *args, **kwargs): | |
| if cls not in cls._instances: | |
| cls._instances[cls] = super().__call__(*args, **kwargs) | |
| return cls._instances[cls] |
OlderNewer