surajit003 / valentis Goto Github PK
View Code? Open in Web Editor NEWClinic Management system built using Django and Python
Clinic Management system built using Django and Python
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
execute_from_command_line(sys.argv)
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
utility.execute()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/core/management/init.py", line 377, in execute
django.setup()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-package
s/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__
init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
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
from django_extensions.db.fields import fields as extension_fields
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 Meta:
ordering = ('brand',)
def __str__(self):
return self.brand + " : " + self.size + ":" + self.price
class Medication(models.Model):
# Fields
slug = extension_fields.AutoSlugField(populate_from='patient_no', blank=True)
created = models.DateTimeField(auto_now_add=True, editable=False)
last_updated = models.DateTimeField(auto_now=True, editable=False)
prescription_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
triage_id = models.CharField(max_length=255, blank=True)
email = models.CharField(max_length=50, blank=True)
patient_no = models.CharField(max_length=30)
patient_name = models.TextField(max_length=100)
address = models.TextField(max_length=100)
physical_address = models.TextField(max_length=100, blank=True)
phone_number = models.CharField(max_length=30)
signature = models.BinaryField(null=True, blank=True)
prescription = models.TextField(max_length=400)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.