Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Get data from clicked elements Django
I have a page where User can select people to add in his team. One side of the page is the list of the people to select. When user click Add to the team, it goes to the right side where we have the list of the selected people. I don't understand how I can get the data on the selected side from the view in django.. For example on the left: <div class="card-body" id="team-list"> <p class="card-text">Select today's teammates:</p> <ul class="list-group list-group-flush"> {% for tech in techs %} <li class="list-group-item"> <span class="name" name="{{tech.id}}">{{tech}}</span> <span class="move" style="float: right;">Add to the team</span> </li> {% endfor %} and on the right: <div class="card-body" id="selected-list"> <h3 class="title">You have selected the following teammates for today: </h3> <ul class="list-group list-group-flush" style="list-style-type: none;"> </ul> </div> The click is handled by a little js click event like this: var selected = document.querySelector('#selected-list ul'); var team = document.querySelector('#team-list ul'); function clickHandlerTeam(e){ if(e.target.classList.contains('move')){ if (e.target.textContent == 'Add to the team'){ console.log('changing add'); e.target.textContent ='Remove from the team'; selected.appendChild(e.target.parentNode); } else { console.log('changing remove'); e.target.textContent = 'Add to the team'; team.appendChild(e.target.parentNode); } console.log('****************'); } return; } Thanks for your help -
when i sign up a new user i want to save to different group that is each user assigned to a particular model using django post_save signals
i have two models fed into a signals.py file with two post_save signals each referencing two different models with a common sender, User, when I create a user, for example, a doctor, I discovered a user is saved with both groups, these groups are doctor and patient, I want a situation where if I create a user, a user which is related to a model(One To ONE relationship) is assigned only one group out of the two i.e User saved to doctor group not user having patient and doctor assigned to it, I also want a user details on creation saved to the associated model, I only get user.username saved to a particular model. i also have issues updating my patient profile page but the doctor's profile page updates, the patient doesn't, please what am I doing wrong, would appreciate your inputs this is my signals.py from django.db.models.signals import post_save from .models import * from django.contrib.auth.models import User from django.contrib.auth.models import Group def create_profile(sender, instance, created, **kwargs): if created: group = Group.objects.get(name='doctor') instance.groups.add(group) Doctor.objects.create( user=instance, name=instance.username, ) print("Profile Created For Doctor") post_save.connect(create_profile, sender=User) def create_patient_profile(sender, instance, created, **kwargs) if created: group_patient = Group.objects.get(name='patient'): instance.groups.add(group_patient) Patient.objects.create( user_p=instance, name=instance.username, ) print("Profile Created … -
Simple database insert and delete via Ajax in Django application
I'm working on a Django application that involves various people, companies, and products. I'd like to include the ability for logged in users to "favorite" any number of those people, companies, and products. I'm a pretty new Django developer and my knowledge of Javascript is scant, so I'm struggling to apply the existing Django/Ajax tutorials to my situation. Here's what I have so far. I'm going to include just the bits about favoriting a person since I presume that solution for favoriting companies and products will be virtually identical. # models.py (relevant tables only) class Person(models.Model): first_name = models.CharField(max_length=50) middle_name = models.CharField(max_length=50, blank=True) # many other irrelevant fields omitted class CustomUser(AbstractUser): fav_people = models.ManyToManyField(Person, through='FavoritePerson', through_fields=('user', 'person'), related_name='users', ) fav_companies = models.ManyToManyField(Company, through='FavoriteCompany', through_fields=('user', 'company'), related_name='users', ) fav_products = models.ManyToManyField(Product, through='FavoriteProduct', through_fields=('user', 'product'), related_name='users', ) class Meta: verbose_name_plural = 'Custom Users' def __str__(self): if self.first_name and self.last_name: return f"{self.first_name} {self.last_name}" else: return f"{self.username}" class FavoritePerson(models.Model): user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, related_name='favorite_people' ) person = models.ForeignKey(Person, on_delete=models.CASCADE, null=True, blank=True, related_name='favorite_people', ) created = models.DateTimeField(auto_now_add=True) class Meta: verbose_name_plural = 'Favorited People' def __str__(self): return f"{self.user} - {self.person}" Here's the relevant portion of my template where it displays a star outline if the person … -
Custom rest_framework authentication not getting called
I am using djangorestframework 3.9.2 I have following setting for rest_framework .... REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'my_project.middlewares.authentication.CentralAuthentication', ], 'DEFAULT_PERMISSION_CLASSES': [ 'my_project.middlewares.authorization.CentralAuthorization' ], } .... And my directory structure is this ├── app1/ └── my_project ├── __init__.py ├── middlewares │ ├── __init__.py │ ├── authentication.py │ └── authorization.py ├── settings │ ├── __init__.py │ ├── commons.py │ ├── development.py │ └── logger.py ├── urls.py └── wsgi.py My authentication script is not getting call whenever I access my URL. Is there something I am missing over here? -
Migrations not Updating for Django App Running in Docker Containers
I am using Docker to run my multi app Django Project and run the web, experience, and db layer in separate containers. If I change something in the frontend docker exec -it <container name> bash into the containers python manage.py makemigrations python manage.py migrate It says that there are no changed to migrate and changes nothing. How can I get my changed to update in real time or quickly running python manage.py migrate ? -
Django show model form in html with 2 foreign key as column and row
I want to display a form of this class class Cost(models.Model): supply = models.ForeignKey(Supply, on_delete=models.CASCADE) demand = models.ForeignKey(Demand, on_delete=models.CASCADE) cost = models.IntegerField(default=0) Supply and demand is a city that only have name and amount attributes. It's a table for transportation problem. I've tried using formset but it don't allow me to save(not valid), using ordinary form as array gave me the same result(i'm a new/moron i don't mind getting an offensive comments as long as i found the answer). I also tried using django tables2 but i don't find how to set supply attribute as row. I want it to display like this: City | A | B | C | Supply D | 1 | 2 | 3 | 12 E | 4 | 5 | 6 | 6 Demand | 5 | 6 | 7 | How can i display my models with cost (1 , 2, 3, 4, 5, 6) as an editable form? -
Can you have two Google Cloud Projects that talk to the same Cloud SQL Database?
I have just created a Project in Google Cloud, and attached a Cloud SQL Database instance to that project. I was able to deploy a Django app that is connected to that DB just fine. However, I would like to create a separate Django app/Project that is attached to the same Cloud SQL Database that my first Django app is attached to. Is this possible? One Django app is responsible for web scraping and supplying constant data to the database while my second Django app (the one I have already deployed) analyzes and returns json on that data. It would be advantageous to separate the two apps because if I ever needed to revise my web scraping algorithm, the whole app would not be down. -
Django href repeats URL in searchbar
This is a really basic question but I'm relatively new to django. I have a navigation bar: <nav> <ul> <li> <a href="transfer"> Home </a> </li> <li> <a href="transfer/upload"> Upload </a> </li> <li> <a href="transfer/download"> Download </a> </li> </ul> </nav> So for example when I am at my localhost:8000/transfer and click the "upload" button, I get redirected successfully to localhost:8000/transfer/upload, but afteer that when I click "home" for example, I'm redirected to localhost:8000/transfer/transfer (if I click download from upload, it is localhost:8000/transfer/transfer/download). I've tried modifying my hrefs to not include "transfer/" but then I run into an invalid page when I click a button the first time. urls.py from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('/upload', views.upload, name='upload'), path('/download', views.download, name='download') ] What can I do to fix this? -
How to upgrade SQLite to the latest version on Synology DSM?
Problem: How to upgrade SQLite to the latest version on Synology DSM? Environment: Server is a Synology NAS Model DS216+, DSM 6.2.2-24922 Update 4. Client is a Win 10 PC running SSH to access to server via command prompt. Have tried: Installed ipkg and used it to install sqlite version 3.8.1-3. Then used pip3 to install django version 3.0.5. Following the Django tutorial: https://docs.djangoproject.com/en/3.0/intro/tutorial01/ After typed this command: "$ python manage.py runserver" got the following: " File "/opt/local/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 65, in check_sqlite_version raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version) django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.8.1)." Checked on SQLite.org web site and the latest version is Version 3.31.1 (2020-01-27). Searched Synology support site, and other web resources and could not find info on how to upgrade the SQLite (3.8.1-3) to the latest version (3.31.1). -
Django 3.0: inline formset with multiple models not updating
I have been blocked on this for a while so thought I'd ask: I have a simplified example below, but essentially I have 3 models (one parent, two children) all combined in one form (formset and two inline formsets). My issue is: POSTing form for artist_new, it successfully writes to DB etc. All good. GET for artist_edit works, but any saves (POST, either with or without edits) do not save to DB. Currently it redirects back to the edit form, with the edits pre-populated in the form (so form data is being passed correctly, i.e. prefixes etc.?) My thought is that it is a view issue, my debugging has brought me to the fact that in the function views.artist_edit book_formset.is_valid() and music_formset.is_valid() both return False. Interestingly, all of the above was working with just one inline formset. Any help much appreciated. # models.py from django.db import models class Artist(models.Model): name = models.CharField(max_length=100) class Book(models.Model): artist = models.ForeignKey(Artist, on_delete=models.CASCADE) title = models.CharField(max_length=100) class Music(models.Model): artist = models.ForeignKey(Artist, on_delete=models.CASCADE) title = models.CharField(max_length=100) album = models.CharField(max_length=100) # views.py from django.utils import timezone from django.shortcuts import redirect, render, get_object_or_404 from django.forms import inlineformset_factory from .models import Artist, Book, Music from .forms import ArtistForm, BookForm, … -
Django form fields not rendering
I was trying to customize the 'User' model present in Django by adding a few fields via forms.py. But the issue is when I was rendering the form, those fields aren't coming into effect. Please can you figure out the error. forms.py class CreateUserForm(UserCreationForm): first_name = forms.CharField(max_length=30, required=True, help_text='Enter your name.', widget=forms.TextInput(attrs={'placeholder':'first_name'})) last_name = forms.CharField(max_length=30, required=False, widget=forms.TextInput(attrs={'placeholder':'last_name'})) email = forms.EmailField(required=True, widget=forms.EmailInput(attrs={'placeholder': 'Email'}), max_length=254, help_text='Enter a valid email address') class Meta(UserCreationForm.Meta): model = User fields = ['username', 'first_name', 'last_name', 'email', 'password1', 'password2'] views.py def register(request): if request.method == 'GET': form = UserCreationForm() context = {'form': form} print() for field in form: print(field) print() return render(request, 'register.html', context=context) elif request.method == 'POST': form = UserCreationForm(request.POST) if form.is_valid(): form.save() redirect('login/') else: E = [] for error in form.errors: E.append(error) return HttpResponse(E) So whenever I was doing a GET request for the registration page. All the fields are not printing. Thus are not showing when we render the html page. <input type="text" name="username" maxlength="150" autocapitalize="none" autocomplete="username" autofocus required id="id_username"> <input type="password" name="password1" autocomplete="new-password" required id="id_password1"> <input type="password" name="password2" autocomplete="new-password" required id="id_password2"> [19/Apr/2020 20:30:20] "GET /register/ HTTP/1.1" 200 5012 This is what is getting printed on the terminal (the fields of the form). Why are … -
Django model for different model
I'm learning Django and I'm trying to make a sort of wiki type app. In this wiki there are different type of models: Characters, Items, Spells and Adventures. Each model has some fields that are the same (like name, author, date_created, etc.) and some that are unique to the model, like duration for adventures, alignment for characters, etc. The problem that I have is that if they are different models then every time I want to make something that is common to all of the models (like being able to like, favorite, create, edit, etc.) then I have to code for each model individually. Is there a way of creating a sort of Content model that contains every character, item, spell and adventure so that every time I want to make a form or a function I just make a Content form or Content function? -
How to edit (add/remove) navbar items in django admin?
I want to create full dynamic website with django, I created model like this: class Titles(models.Model): nav_title1 = models.CharField(max_length=10) nav_title2 = models.CharField(max_length=10) nav_title3 = models.CharField(max_length=10) nav_title4 = models.CharField(max_length=10) nav_title5 = models.CharField(max_length=10) def __str__(self): return f"navbar" also model admin: class TitlesAdmin(admin.ModelAdmin): fieldsets = [ ("Title",{"fields":["nav_title1","nav_title2","nav_title3","nav_title4","nav_title5"]}) ] admin.site.register(Titles,TitlesAdmin) and pass variables to html file: {% for title in titles %} <nav> <ul> <li><a href="#">{{ title.nav_title1 }}</a></li> <li><a href="#">{{ title.nav_title2 }}</a></li> <li><a href="#">{{ title.nav_title3 }}</a></li> <li><a href="#">{{ title.nav_title4 }}</a></li> <li><a href="#">{{ title.nav_title5 }}</a></li> how can I remove or add another items in django admin. for example how to remove directly title.nav_title5 from django admin,is there way to get this? -
Django ModelForm iterate through MultipleChoiceField Values and process on POST
Level: Absolute Beginner, trying to build an app to perform some db operation through web UI models.py from django.db import models class MysqlUser(models.Model): username = models.CharField(max_length=100) password = models.CharField(max_length=50) environment = models.CharField(max_length=50) forms.py from django import forms from onboard_app.models import MysqlUser class MysqlUserForm(forms.ModelForm): CHOICES = ( ('test', 'Test'), ('develop', 'Develop'), ('staging', 'Staging'), ) environment = forms.MultipleChoiceField(choices=CHOICES) password = forms.CharField(widget=forms.PasswordInput) class Meta: model = MysqlUser fields = ('username', 'password', 'environment') views.py from django.shortcuts import render from onboard_app.serializers import MysqlUserSerializer from rest_framework import generics from onboard_app.forms import MysqlUserForm from onboard_app.models import MysqlUser from django.views.generic.edit import CreateView, UpdateView, DeleteView class MysqlCreateView(CreateView): model = MysqlUser form_class = MysqlUserForm template_name = 'mysqluser_form.html' success_url = '/mysql/user/add/' mysqluser_form.html {% extends "myapp/base.html" %} {% block title %}MyApp{% endblock %} {% block content %} <h1>MySQL User Access</h1> <form method="post"> {% csrf_token %} {{ form.as_p }} <input type="submit" class="btn btn-primary" value="Grant Access"> </form> {% endblock %} I'm trying to get Value(s) of field or MultipleChoiceFiled environment after the user Form Submit, and loop through the entered values to perform some action. I have been trying this for long, still can't figure out how. I don't want to process anything in the frontend html. I'm thinking it has to be processed … -
How to use depedent chained dropdown list with Django select2
I am trying to list out cities that depend on the country selected I am going through the examples on the docs https://django-select2.readthedocs.io/en/latest/extra.html#chained-select2 I don't seem to understand How to implement what is on the docs. when I tried implementing it I get this error message TypeError at /page/ __init__() got an unexpected keyword argument 'instance' Here is the traceback error Internal Server Error: /page/ Traceback (most recent call last): File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\core\handlers\exception.py", line 34, in inner response = get_response(request) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\views\generic\base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\views\generic\base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\views\generic\edit.py", line 168, in get return super().get(request, *args, **kwargs) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\views\generic\edit.py", line 133, in get return self.render_to_response(self.get_context_data()) File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\views\generic\edit.py", line 66, in get_context_data kwargs['form'] = self.get_form() File "C:\Users\Benedict\Miniconda3\envs\django2.1\lib\site-packages\django\views\generic\edit.py", line 33, in get_form return form_class(**self.get_form_kwargs()) TypeError: __init__() got an unexpected keyword argument 'instance' [19/Apr/2020 20:58:54] "GET /page/ HTTP/1.1" 500 94467 models.py class Country(models.Model): name = models.CharField(max_length=255) class City(models.Model): name = models.CharField(max_length=255) country = models.ForeignKey('Country', related_name="cities", on_delete=models.CASCADE) forms.py from django import forms from django_select2 import forms as s2forms from .models import … -
Django-markdownx is not showing image previews
I've been trying to get the django-markdownx app to work within the django admin panel, and I've been running in to a problem where whenever I test the drag-and-drop image upload feature in my admin panel, the image is added to my project's markdownx/ directory, but doesn't show up in the live preview. Any ideas on how to fix this? I have everything else working, but I can't seem to get images to show up. Any help would be much apprecieted. My model: class Item(models.Model): post_content = MarkdownxField() My urls.py: urlpatterns = [ path('markdownx/', include('markdownx.urls')), path('', include('myapp.urls')), path('admin/', admin.site.urls), ] Let me know if I need to provide more information. -
Can Users have other Users in a Relationship in Django?
So, I am fairly new to Django and I know there is just one User type. I am wondering what is the best way for me to go about setting up my models. My site needs 4 different types of users: admins (including superuser), teachers, students, parents. I want only admin to be able to use the built in admin UI. I want teachers to have some admin features but only on frontend UI. So far I have extended AbstractBaseUser and BaseUserManager to create users that can be assigned the 4 roles mentioned above and a few different things. They are working and I can manage authorization of page views with them, but this is just scratching the surface of what I hope to do. But how do I manage this when I want a teacher to have many students in a class and only see those students when they login? I want these students to be assigned to teacher by the admin and then allow the teacher to have some permissions with the student info. Can I use signals to create a Teacher model that belongs to aUser with a role of teacher and that same Teacher model has_many``Students. … -
Using python twitter library how can i extract the list of users follow a particular #hashtags anonymously?
So, I have a problem statement in which I want to extract the list of users who are following a particular #hashtag like #obama, #corona etc. The challenge here is I want to extract this data anonymously i.e without providing any account keys. I tried a library named twint that is capable of doing this but it's very slow. can anyone recommend a better alternative for my use case..? -
How to update a value from table accessed via foreign key django ORM
My DB models looks similar to this class Leave(models.Model): available_leaves = models.IntegerField(default = 8) class Policy(models.Model): name = models.CharField(max_length=20) class Student(models.Model): name = models.CharField(max_length=20) rating = models.IntegerField(default=7) class StudentLeave(models.Model): leave = models.ForeignKey(Leave, on_delete=models.CASCADE) policy = models.ForeignKey(Policy, on_delete=models.CASCADE) student = models.ForeignKey(Student, on_delete=models.CASCADE) I want to deduct the leave of the student from here, I have tried this leave = Leave.objects.filter(pk = 1).first() policy = Policy.objects.filter(pk = 1).first() student = Student.objects.filter(name = 'matthew).first() studentleave = StudentLeave.objects.filter(student = student, policy = policy, leave = leave).first() Now I have studentleave object through which I can access every table connected to this table. So I have tried accessing this studentleave.leave.available_leaves-=1 # Tried reducing it by one print(studentleave.leave.available_leaves) #prints as 7 as expected because 8 is default But when I access the same model again, it's value is still 8 (old value) I have tried update and save method on studentleave.leave.update() and studentleave.update() which are basically throwing error because that object has no attribute update How can I save those new values for them. Thanks in advance for spending your time to solve this problem. -
Django: Login_required(redirect to custom login_url) not working
views.py file @login_required(login_url='frontpage') def dash(request): events = Event.objects.all() if request.method == 'POST': form = createEventForm(request.POST) args = {'form':form , 'events':events} if form.is_valid(): form.save(request.POST) return render(request, 'dashboard/index.html',args) else: form = createEventForm() args = {'form':form , 'events':events} return render(request, 'dashboard/index.html',args) urls.py file urlpatterns = [ url('admin/', admin.site.urls), url(r'^$', frontviews.login), path('', frontviews.login, name = "login"), url(r'frontpage^/$', frontviews.login, name = "frontpage"), url(r'^dashboard/$', dashviews.dash, name = "dashboard"),#require login to fix url(r'^$', dashviews.logout, name = "logout"), url(r'^forum/$', forumviews.forumpage, name = 'forum'), url(r'^events/$', dashviews.EventPage, name = 'events'), ] I want the user to be required to be logged in from the frontpage(of website), i.e. i want to redirect user to frontpage if he tries to use url[website.com/dashboard] to directly enter dashboard. -
How can I list all answers from answer model to my question model in Django ? Relation many to one?
I would like to ask you for your help. I have two models. Question and Answer. One question can have many answers. My models looks like this: class Question(models.Model): question = models.CharField(max_length=300) answered = models.BooleanField(default=False) created = models.DateTimeField(auto_now_add=True) user = models.ForeignKey(User, on_delete=models.CASCADE) votesscore = models.IntegerField(default='0') amountofvotes = models.IntegerField(default='0') def __str__(self): return self.question class Answer(models.Model): question_id = models.ForeignKey(Question, on_delete=models.CASCADE, blank=False, null=True) answer = models.TextField(max_length=1000) created = models.DateTimeField(auto_now_add=True) user = models.ForeignKey(User, on_delete=models.CASCADE) votesscore = models.IntegerField(default='0') amountofvotes = models.IntegerField(default='0') def __str__(self): return self.answer Here is my views.py: def home(request): allquestionswithanswers = Answer.objects.prefetch_related('question_id') allquestionswithoutanswers = Question.objects.filter(answered = False) return render(request, 'main/home.html', {'allquestionswithanswers': allquestionswithanswers, 'allquestionswithoutanswers': allquestionswithoutanswers}) And here is my home.html: <h1>Questions with answers:</h1> <ul> {% for allquestionwithanswer in allquestionswithanswers %} <li> {{ allquestionwithanswer.question_id }} {{ allquestionwithanswer.user }}<br><br> <br><br> {{ allquestionwithanswer.answer }} </li> {% endfor %} </ul> <h1>Questions without answers:</h1> <ul> {% for allquestionwithoutanswer in allquestionswithoutanswers %} <li> {{ allquestionwithoutanswer.question }} {{ allquestionwithoutanswer.user }} <br><br> {{ allquestionwithoutanswer.answer }} </li> {% endfor %} </ul> And some things are working and some not and I don't get how can I fix them :( I have working "Questions with answers:". It is listing my question, and corresponding answer, but if question has multiple answers, it is printing question … -
How to get the number of inserts from a raw INSERT query in Django?
I'm running a fairly large insert into select query in Django, which I do using MyModel.objects.raw(insert_query) But that doesn't do anything since queries seem to only be run when something is taken from it's result. So when I do this it runs the query MyModel.objects.raw(insert_query)[0] but also gives an error: TypeError: 'NoneType' object is not iterable Is there a way that I can run the raw query and get the number of records it inserted or a possible error if that occurred? -
What is the use of wsgi.py file that is there in django application when created using django-admin startproject
Can anyone help me in understanding what is the use of wsgi.py file? import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings.local") application = get_wsgi_application() -
I'd like to build a python code editor for my django project
Currently I have a Django project which is based on stocks. I would like include a code editor in my project. So, that users can write their own strategy in python. the user written code will be executed in the backed and populates the output. Is there any plugins or anything else for code editors? How can I achieve this? Thanks In Advance!! -
Migrate project from from Symfony 3 to Django
I have a project in Symfony 3 (SaSS application) relatively large monolith, about 5 years old with more than 150 entities and about 13GB of MySQL database. The truth is that for about a year I have been doing smaller projects in Django and have fallen in love for obvious reasons. Now, before my Symfony application continues to grow, I would like to separate the backend (Django -in process-) from the frontend (Vue-pending-) and I have some doubts about the migration process: I have created some models already in Django but I am not very clear on how to migrate the database so that both applications work on it, since during the duration of the migration process, the two applications will have to coexist in the same database. How would the process be so as not to lose information and that both applications coexist? Thank you