Open draliiiiii opened 3 years ago
drandroderma@gmail.com
@draliiiiii - Will have a look
Thanks
I wish i can run it for dermatology and aesthetic clinic
this my settings.py
import os
import datetime
from decouple import config
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(file)))
SECRET_KEY = os.environ.get('SECRET_KEY', 'CHANGEME')
DEBUG = True
ALLOWED_HOSTS = ['*']
AUTH_USER_MODEL = 'account.CustomUser'
AUTHENTICATION_BACKENDS = ('valentisHealth.backends.EmailAuthBackend',
'django.contrib.auth.backends.ModelBackend',
)
LOGIN_URL = '/account/log-in/'
LOGIN_REDIRECT_URL = '/registration/'
LOGIN_EXEMPT_URLS =['127.0.0.1',]
INSTALLED_APPS = [
'account',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django_extensions',
'crispy_forms',
'rest_framework',
'rest_framework.authtoken',
'registration',
'nurse',
'clinic',
'medication',
'tests',
'payments',
'workflow',
# 'session_security',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# 'valentisHealth.middleware.LoginRequiredMiddleware',
# 'session_security.middleware.SessionSecurityMiddleware',
]
ROOT_URLCONF = 'valentisHealth.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
'libraries':{'custom_tags':'templatetags.custom_tags'}
},
},
]
WSGI_APPLICATION = 'valentisHealth.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'dermisdb',
'USER': 'postgres',
'PASSWORD': ‘uytrr0',
'HOST': 'localhost',
'PORT': '5432',
}
}
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{'NAME':
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'},
{'NAME':
'django.contrib.auth.password_validation.MinimumLengthValidator'}, # noqa
{'NAME':
'django.contrib.auth.password_validation.CommonPasswordValidator'}, # noqa
{'NAME':
'django.contrib.auth.password_validation.NumericPasswordValidator'}, # noqa
]
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Africa/Nairobi'
USE_I18N = True
USE_L10N = True
USE_TZ = True
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_URL = '/static/'
EMAIL_BACKEND = ('django.core.mail.backends.smtp.EmailBackend')
EMAIL_HOST_USER = ('EMAIL_HOST_USER')
EMAIL_HOST = ('localhost')
EMAIL_PORT = 25
EMAIL_USE_TLS = True
EMAIL_HOST_PASSWORD = ('EMAIL_HOST_PASSWORD')
SERVER_EMAIL = ''
DEFAULT_FROM_EMAIL = ('DEFAULT_FROM_EMAIL')
EMAIL_DEBUG = True
#
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
#
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),
}
JWT_AUTH = {
'JWT_ALLOW_REFRESH': True,
'JWT_EXPIRATION_DELTA': datetime.timedelta(hours=1),
'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=7),
'JWT_RESPONSE_PAYLOAD_HANDLER':
'valentisHealth.backends.jwt_response_payload_handler',
}
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage
this my lisrt rquermints
drderma2030$ pip3 freeze
absl-py==0.10.0
amqp==1.4.9
anyjson==0.3.3
appdirs==1.4.4
asgiref==3.2.10
astunparse==1.6.3
billiard==3.3.0.23
cachetools==4.1.1
celery==3.1.25
certifi==2020.6.20
chardet==3.0.4
distlib==0.3.1
Django==3.1
django-appconf==1.0.4
django-axes==1.7.0
django-celery==3.2.2
django-compressor==2.2
django-crispy-forms==1.9.2
django-extensions==3.0.5
django-reversion==3.0.1
django-upload-form==0.4.2
django-widget-tweaks==1.4.8
djangorestframework==3.10.2
djangorestframework-jwt==1.11.0
ffs==0.0.8.2
filelock==3.0.12
gast==0.3.3
google-auth==1.20.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.31.0
h5py==2.10.0
html5lib==1.1
idna==2.8
Jinja2==2.10.1
Keras-Preprocessing==1.1.2
kombu==3.0.37
letter==0.5
Markdown==3.2.2
MarkupSafe==1.1.1
numpy==1.18.5
oauthlib==3.1.0
opal==0.18.3
opt-einsum==3.3.0
Pillow==7.2.0
pipenv==2020.6.2
protobuf==3.13.0
psycopg2-binary==2.8.5
pyasn1==0.4.8
pyasn1-modules==0.2.8
PyJWT==1.7.1
PyPDF2==1.26.0
python-dateutil==2.8.0
python-decouple==3.3
pytz==2020.1
rcssmin==1.0.6
reportlab==3.5.47
requests==2.22.0
requests-oauthlib==1.3.0
rjsmin==1.0.12
rsa==4.6
scipy==1.4.1
six==1.15.0
sqlparse==0.3.1
tensorboard==2.3.0
tensorboard-plugin-wit==1.7.0
tensorflow==2.3.0
tensorflow-estimator==2.3.0
termcolor==1.1.0
urllib3==1.25.10
virtualenv==20.0.30
virtualenv-clone==0.5.4
webencodings==0.5.1
Werkzeug==1.0.1
wrapt==1.12.1
xhtml2pdf==0.2.4Git
brew list
buildapp gettext krb5 pcre2 readline vapor
ctls git libressl pkg-config sbcl xz
gdbm icu4c openssl@1.1 python@3.8 sqlite
GitHub
في الثلاثاء، 25 أغسطس 2020 في 9:11 م تمت كتابة ما يلي بواسطة Surajit Das notifications@github.com:
@draliiiiii https://github.com/draliiiiii - Will have a look
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/surajit003/valentis/issues/1#issuecomment-680187778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRSZUHRBT7OTQODBZLY353SCP5GPANCNFSM4QK2DZQA .
I update all requirements version to your app same and no run
absl-py==0.10.0 amqp==1.4.9 anyjson==0.3.3 appdirs==1.4.4 asgiref==3.2.10 astroid==1.6.1 astunparse==1.6.3 billiard==3.3.0.23 cachetools==4.1.1 celery==3.1.25 certifi==2020.6.20
chardet==3.0.4 distlib==0.3.1 Django==3.1 django-appconf==1.0.4 django-axes==1.7.0 django-celery==3.2.2 django-compressor==2.2 django-cors-headers==3.4.0 django-crispy-forms==1.9.2 django-extensions==1.9.9 django-filter==1.1.0 django-model-utils==3.1.1 django-render-block==0.5 django-reversion==3.0.1 django-upload-form==0.4.2 django-widget-tweaks==1.4.8 djangorestframework==3.10.2 djangorestframework-jwt==1.11.0 ffs==0.0.8.2 filelock==3.0.12
gast==0.3.3 google-auth==1.20.1 google-auth-oauthlib==0.4.1 google-pasta==0.2.0 grpcio==1.31.0 h5py==2.10.0 html5lib==1.1 httplib2==0.10.3 idna==2.8 isort==4.2.15
isort==4.2.15 Jinja2==2.10.1 joblib==0.16.0 jsonfield==2.0.2 Keras-Preprocessing==1.1.2 kombu==3.0.37 lazy-object-proxy==1.3.1 letter==0.5 Markdown==3.2.2 MarkupSafe==1.1.1 mccabe==0.6.1
numpy==1.18.5 oauthlib==3.1.0 opal==0.18.3 opt-einsum==3.3.0 Pillow==7.2.0 pipenv==2020.6.2 protobuf==3.13.0 psycopg2-binary==2.8.5 pyasn1==0.4.8 pyasn1-modules==0.2.8 PyJWT==1.7.1 PyPDF2==1.26.0 python-dateutil==2.8.0 python-decouple==3.3 pytz==2020.1 rcssmin==1.0.6 reportlab==3.5.47 requests==2.22.0 requests-oauthlib==1.3.0 rjsmin==1.0.12
rsa==4.6 scikit-learn==0.23.2 scipy==1.4.1 six==1.15.0 sqlparse==0.3.1 ttensorboard==2.3.0 tensorboard-plugin-wit==1.7.0 tensorflow==2.3.0 tensorflow-estimator==2.3.0 termcolor==1.1.0
threadpoolctl==2.1.0 typing==3.7.4.3 urllib3==1.25.10 virtualenv==20.0.30 virtualenv-clone==0.5.4 webencodings==0.5.1 Werkzeug==1.0.1 wrapt==1.12.1 xhtml2pdf==0.2.4
@draliiiiii - Please check back in 48hrs
Ok but you think problem from me or in app modules???
I still wait u
Dear its working in n your pc or
Tou didn't answer contact me on mail
Okay i change backend email to deflut and open app but links url on frontend pages how open in browser there eerors from $
Still when enter account log in error html multiple authritcation backend user
Request Method: | POST |
---|
http://127.0.0.1:8000/account/log-in/?next=/clinic/patientvisit/doctor/1/
3.1
ValueError
You have multiple authentication backends configured and therefore must provide the backend
argument or set the backend
attribute on the user.
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/contrib/auth/init.py, line 117, in login
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
3.8.1
['/Users/drderma2030/Desktop/working django projects/projects/valentis-master', '/Library/Frameworks/Python.framework/Versions/3.8/lib/python38.zip', '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8', '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages']
Fri, 18 Sep 2020 05:47:34 +0300
How add doctors
After i changed db in settings to postgres and i install all requirements then try migration then Error Medication module
valentis-master drderma2030$ python3 manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/core/management/init.py", line 401, in execute_from_command_line
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/core/management/init.py", line 377, in execute
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/init.py", line 24, in setup
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/apps/registry.py", line 114, in populate
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/apps/config.py", line 211, in import_models
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__
init__.py", line 127, in import_module
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/drderma2030/Desktop/valentis-master/medication/models.py", line 10, i
n
ImportError: cannot import name 'fields' from 'django_extensions.db.fields' (/Librar
y/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django_extens
ions/db/fields/init.py)
This medication module how i fix to run it
from django.urls import reverse from django_extensions.db.fields import AutoSlugField from django.db.models import * from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.auth import get_user_model from django.contrib.auth import models as auth_models from django.db import models as models from django_extensions.db.fields import fields as extension_fields
import uuid
class MyDawa(models.Model): brand = models.CharField(max_length=255) size = models.CharField(max_length=300) price = models.CharField(max_length=300)
class Medication(models.Model):