forked from uncloud/uncloud
Cleanup: get uncloud running again
This commit is contained in:
parent
bf81ded5bf
commit
33d56bf083
10 changed files with 147 additions and 95 deletions
|
|
@ -1,10 +1,9 @@
|
|||
ACTIVE_APP=nextcloud
|
||||
ALLOWED_HOSTS=
|
||||
ALLOWED_HOSTS='*'
|
||||
STRIPE_KEY=
|
||||
STRIPE_PUBLIC_KEY=
|
||||
DATABASE_ENGINE=django.db.backends.sqlite3
|
||||
DATABASE_NAME=
|
||||
DATABASE_HOST=
|
||||
DATABASE_NAME=uncloud
|
||||
DATABASE_HOST=localhost
|
||||
DATABASE_PORT=
|
||||
DATABASE_USER=
|
||||
DATABASE_PASSWORD=
|
||||
|
|
@ -29,4 +28,4 @@ AUTH_LDAP_BIND_PASSWORD=
|
|||
LDAP_ADMIN_DN=
|
||||
LDAP_ADMIN_PASSWORD=
|
||||
LDAP_CUSTOMER_GROUP_ID=
|
||||
LDAP_CUSTOMER_DN=
|
||||
LDAP_CUSTOMER_DN=
|
||||
|
|
|
|||
|
|
@ -42,18 +42,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||
|
||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': env('DATABASE_ENGINE'),
|
||||
'NAME': env('DATABASE_NAME') if env('DATABASE_NAME') else os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
'USER': env('DATABASE_USER'),
|
||||
'PASSWORD': env('DATABASE_PASSWORD'),
|
||||
'HOST': env('DATABASE_HOST'),
|
||||
'PORT': env('DATABASE_PORT'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
|
||||
|
||||
|
|
@ -73,12 +61,12 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sites',
|
||||
'django.contrib.staticfiles',
|
||||
'django_extensions',
|
||||
'mathfilters',
|
||||
'compressor',
|
||||
'wkhtmltopdf',
|
||||
# 'mathfilters',
|
||||
# 'compressor',
|
||||
# 'wkhtmltopdf',
|
||||
'rest_framework',
|
||||
'django_q',
|
||||
'notifications',
|
||||
# 'notifications',
|
||||
'uncloud',
|
||||
'uncloud_auth',
|
||||
'uncloud_net',
|
||||
|
|
@ -86,13 +74,15 @@ INSTALLED_APPS = [
|
|||
'uncloud_vm',
|
||||
'uncloud_service',
|
||||
'opennebula',
|
||||
env('ACTIVE_APP'),
|
||||
# env('ACTIVE_APP'),
|
||||
'uncloud_pay', # should be after the active app to load the templates from the active app first
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
# 'allauth',
|
||||
# 'allauth.account',
|
||||
# 'allauth.socialaccount',
|
||||
]
|
||||
|
||||
DEFAULT_AUTO_FIELD='django.db.models.AutoField'
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
|
|
@ -104,7 +94,7 @@ MIDDLEWARE = [
|
|||
]
|
||||
|
||||
ROOT_URLCONF = 'uncloud.urls'
|
||||
WKHTMLTOPDF_CMD = env('WKHTMLTOPDF_CMD')
|
||||
#WKHTMLTOPDF_CMD = env('WKHTMLTOPDF_CMD')
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
|
|
@ -185,14 +175,14 @@ LDAP_MAX_UID_FILE_PATH = os.environ.get('LDAP_MAX_UID_FILE_PATH',
|
|||
AUTHENTICATION_BACKENDS = [
|
||||
"django_auth_ldap.backend.LDAPBackend",
|
||||
"django.contrib.auth.backends.ModelBackend",
|
||||
'allauth.account.auth_backends.AuthenticationBackend',
|
||||
# 'allauth.account.auth_backends.AuthenticationBackend',
|
||||
]
|
||||
|
||||
|
||||
|
||||
AUTH_USER_MODEL = 'uncloud_auth.User'
|
||||
ACCOUNT_FORMS = {
|
||||
'signup': 'uncloud_auth.forms.MySignupForm',
|
||||
'signup': 'uncloud_auth.forms.MySignupForm',
|
||||
'change_password': 'uncloud_auth.forms.MyChangePasswordForm',
|
||||
'set_password': 'uncloud_auth.forms.MySetPasswordForm',
|
||||
'reset_password_from_key': 'uncloud_auth.forms.MyResetPasswordKeyForm',
|
||||
|
|
@ -258,7 +248,7 @@ MIN_PER_TRANSACTION = 5
|
|||
# The django secret key
|
||||
SECRET_KEY=get_random_secret_key()
|
||||
|
||||
ALLOWED_HOSTS = env('ALLOWED_HOSTS')
|
||||
ALLOWED_HOSTS = ''
|
||||
|
||||
# required for hardcopy / pdf rendering: https://github.com/loftylabs/django-hardcopy
|
||||
CHROME_PATH = '/usr/bin/chromium-browser'
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from rest_framework.schemas import get_schema_view
|
|||
from uncloud_net import views as netviews
|
||||
from uncloud_pay import views as payviews
|
||||
from uncloud_vm import views as vmviews
|
||||
import notifications.urls
|
||||
#import notifications.urls
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
|
||||
|
|
@ -56,14 +56,15 @@ urlpatterns = [
|
|||
), name='openapi-schema'),
|
||||
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('allauth.urls')),
|
||||
#path('accounts/', include('allauth.urls')),
|
||||
path('pricing/<slug:name>/calculate/', payviews.PricingView.as_view(), name='pricing_calculator'),
|
||||
path('cc/reg/', payviews.RegisterCard.as_view(), name="cc_register"),
|
||||
path('inbox/notifications/', include(notifications.urls, namespace='notifications')),
|
||||
# path('inbox/notifications/', include(notifications.urls, namespace='notifications')),
|
||||
path('payments/', include('uncloud_pay.urls', namespace='payments')),
|
||||
#
|
||||
#
|
||||
]
|
||||
if env('ACTIVE_APP') == 'nextcloud':
|
||||
urlpatterns.append(path('', include('nextcloud.urls', namespace='nextcloud')))
|
||||
elif env('ACTIVE_APP') == 'matrixhosting':
|
||||
urlpatterns.append(path('', include('matrixhosting.urls', namespace='matrix')))
|
||||
|
||||
# if env('ACTIVE_APP') == 'nextcloud':
|
||||
# urlpatterns.append(path('', include('nextcloud.urls', namespace='nextcloud')))
|
||||
# elif env('ACTIVE_APP') == 'matrixhosting':
|
||||
# urlpatterns.append(path('', include('matrixhosting.urls', namespace='matrix')))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue