-
-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Django example to include better db handling.
- Loading branch information
1 parent
99fa33f
commit 5c70505
Showing
10 changed files
with
88 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ author_email = "[email protected]" | |
formal_name = "Positron" | ||
description = "Electron, but in Python" | ||
icon = "src/positron/resources/positron" | ||
sources = ["src/positron", "src/webapp"] | ||
sources = ["src/positron"] | ||
requires = [ | ||
"../../core", | ||
"django~=4.1", | ||
"django~=5.1", | ||
] | ||
|
||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.contrib import admin | ||
from django.contrib.staticfiles import views as staticfiles | ||
from django.urls import path, re_path | ||
|
||
urlpatterns = [ | ||
path("admin/", admin.site.urls), | ||
re_path(r"^static/(?P<path>.*)$", staticfiles.serve), | ||
] |
7 changes: 4 additions & 3 deletions
7
examples/positron-django/src/webapp/wsgi.py → ...ples/positron-django/src/positron/wsgi.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
"""WSGI config for mysite project. | ||
""" | ||
WSGI config for positron project. | ||
It exposes the WSGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ | ||
https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/ | ||
""" | ||
|
||
import os | ||
|
||
from django.core.wsgi import get_wsgi_application | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "positron.settings") | ||
|
||
application = get_wsgi_application() |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.