随笔分类 -  django

摘要:1 2 download gettext 3 download libstdc++ 6.dll then put libstdc++ 6.dll to c:\windows\system32\ 阅读全文
posted @ 2018-09-25 12:03 idlewith 阅读(814) 评论(0) 推荐(0)
摘要:``` $(document).ready(function () { $('#example').DataTable({ "ajax": "http://127.0.0.1:8080/api/resources/", "columns": [ { "data": "name", ... 阅读全文
posted @ 2018-09-07 20:07 idlewith 阅读(134) 评论(0) 推荐(0)
摘要:``` class ResourceSetView(viewsets.ModelViewSet): queryset = models.Resources.objects.all() serializer_class = serializers.ResourceSerializer def list(self, request, *args, **kwargs): ... 阅读全文
posted @ 2018-09-07 19:15 idlewith 阅读(136) 评论(0) 推荐(0)
摘要:``` 1- ajax 2- move operation of logic move to javascript 3- rename django.fcgi to dispatch.fcgi 4- optimize sql 5- reduce the size of html * inline css * * remove '\n' 6- compress html ... 阅读全文
posted @ 2018-09-04 15:27 idlewith 阅读(87) 评论(0) 推荐(0)
摘要:django configuration settings.py uwsgi configuration vim uwsgi.ini nginx configuration vim /etc/nginx/nginx.conf vim /etc/nginx/conf.d/mysite.conf 阅读全文
posted @ 2018-04-26 15:05 idlewith 阅读(127) 评论(0) 推荐(0)
摘要:``` python manage.py migrate --fake tutorial zero python manage.py migrate ``` 阅读全文
posted @ 2018-04-25 13:18 idlewith 阅读(91) 评论(0) 推荐(0)
摘要:``` import datetime import os import django script_path = os.path.dirname(__file__) os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' django.setup() from django.contrib.auth.models import Us... 阅读全文
posted @ 2018-01-12 13:52 idlewith 阅读(391) 评论(0) 推荐(0)
摘要:``` python manage.py migrate vi settings.py STATIC_ROOT = os.path.join(BASE_DIR, 'static/') python manage.py collectstatic ``` ``` ServerRoot "C:/xampp/apache" Listen 10.65.169.155:8080 LoadModule... 阅读全文
posted @ 2017-11-02 19:07 idlewith 阅读(131) 评论(0) 推荐(0)
摘要:There are som errors below 阅读全文
posted @ 2017-11-02 15:47 idlewith 阅读(169) 评论(0) 推荐(0)