aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2019-05-02 15:44:35 +0000
committerlxf <sng@luxagraf.net>2019-05-02 15:44:35 +0000
commit3c1a9804c9858328b4b18be634f7d4dbd32b9816 (patch)
tree34b8b56c37c21aadfd8be0cb6b500623966a55f6
parent5e545245ec2900aa33328629d18d4847860660bb (diff)
added live server settingsHEADmaster
-rw-r--r--apps/pages/models.py3
-rw-r--r--config/base_urls.py2
-rw-r--r--config/django.ini30
-rw-r--r--config/settings.py1
4 files changed, 32 insertions, 4 deletions
diff --git a/apps/pages/models.py b/apps/pages/models.py
index 0c663cb..c6080b7 100644
--- a/apps/pages/models.py
+++ b/apps/pages/models.py
@@ -26,8 +26,7 @@ class Page(models.Model):
# run markdown
md = render_images(self.body_markdown)
self.body_html = markdown_to_html(md)
- if not self.id:
- # self.date_created = timezone.now()
+ if not self.slug:
self.slug = slugify(self.title)[:50]
super(Page, self).save()
diff --git a/config/base_urls.py b/config/base_urls.py
index 022fbe4..dad9836 100644
--- a/config/base_urls.py
+++ b/config/base_urls.py
@@ -41,7 +41,7 @@ urlpatterns += [
path(r'', NoteListView.as_view(), name='homepage',),
path(r'forum/', include('forum.urls')),
path(r'n/', include('notes.notes_urls')),
- path(r'o/', include('outlines.urls')),
+ #path(r'o/', include('outlines.urls')),
path(r'nb/', include('notes.notebook_urls')),
path(r'api/v1/', include(router.urls)),
path(r'<slug>', PageDetailView.as_view(), name="pages"),
diff --git a/config/django.ini b/config/django.ini
new file mode 100644
index 0000000..9f87519
--- /dev/null
+++ b/config/django.ini
@@ -0,0 +1,30 @@
+# django.ini file
+[uwsgi]
+
+# maximum number of processes
+processes = 4
+max-requests = 5000
+enable-threads = true
+# the socket (use the full path to be safe)
+uid = www-data
+gid = www-data
+
+socket = /tmp/uwsgi-luxnotes.sock
+chmod-socket = 664
+chown-socket = www-data:www-data
+
+# the base directory
+chdir = /home/lxf/sites/luxnotes.net
+
+# django's wsgi file
+module = config.wsgi
+# the virtualenv
+home = /home/lxf/sites/luxnotes.net/venv
+
+buffer-size =65535
+#plugin=python
+limit-as = 1024
+limit-post = 0
+# clear environment on exit
+vacuum = true
+logto = /var/log/uwsgi/lnotes.log
diff --git a/config/settings.py b/config/settings.py
index d2b0b08..168319b 100644
--- a/config/settings.py
+++ b/config/settings.py
@@ -77,7 +77,6 @@ LOCAL_APPS = [
'pages',
'accounts',
'notes',
- 'outlines',
'forum',
]
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS