Wednesday, October 23, 2024

Re: MicroService related issue

Hi Shiva,


The simpler version is to have one core Django project that doesn't have anything. Then create a 2nd Django project with an app (e.g. a Polls app). When the Polls app is done, package it in such a way that it can be installed in another Django project (resource reference here:Advanced tutorial: How to write reusable apps | Django documentation | Django)

Repeat for X number of services/apps that you want to build, package them, then install them into the core Django project.

The more complicated version is to have each service run their own technology stack (doesn't have to be Django). But the end goal is that each service must be able to communicate with each other through a means of API calls, webhook events or even through PubSub.

On Wed, 23 Oct 2024 at 14:25, shiva singh <shivasingh604@gmail.com> wrote:
hello thank you for your reply.
i am new to use microservice with django can you give any project demo link or project demo for reference witch is atleast use 3 small project in with microservice
thank you again for your reply

On Mon, Oct 21, 2024 at 12:44 AM Francis <paul.panal.fd@gmail.com> wrote:

you cannot import models from another django project.


On Mon, Oct 14, 2024, 2:34 PM Sunday Ajayi <sunnexajayi@gmail.com> wrote:
Hi 

You can email me so we can schedule a call to review it.

Regards

AJAYI Sunday 
(+234) 806 771 5394



On Mon, Oct 14, 2024 at 1:18 AM Konstantinos Dimitropoulos <cdemetropoulos@gmail.com> wrote:
Hello, why don't you create a project with two apps? Authenticate and repaire

Le ven. 11 oct. 2024, 11:01, shiva singh <shivasingh604@gmail.com> a écrit :
Hello
  I am currently working on a microservices project using Django and have encountered an issue.  
 i am facing issue when create microservice project using django i am created 2 difrent django project in one common folder and one project name is authentication and second project name is repairmodule and when i access authentication project's model class in repairmodule models class and when i run makemigrations i am getting this error:
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\BSInfosys\RepairAnything\repairmodule\repair\models.py", line 2, in <module>
    from authentication.authenticate.models import User, RepairManProfile
ModuleNotFoundError: No module named 'authentication'
this is my directory Structure:
RepairAnything/
├── authentication/
│   ├── manage.py
│   ├── authentication/
│   │   ├── __init__.py
│   │   ├── asgi.py
│   │   ├── settings.py
│   │   ├── urls.py
│   │   ├── wsgi.py
│   │   └── __pycache__/
│   └── authenticate/
│       ├── __init__.py
│       ├── admin.py
│       ├── apps.py
│       ├── migrations/
│       │   └── __init__.py
│       ├── models.py
│       ├── serializers.py
│       ├── tests.py
│       ├── urls.py
│       └── views.py
├── env/                   # Your virtual environment
├── repairmodule/
│   ├── manage.py
│   ├── repair/
│   │   ├── __init__.py
│   │   └── models.py
│   └── repairmodule/
│       ├── __init__.py
│       ├── asgi.py
│       ├── settings.py
│       ├── urls.py
│       ├── wsgi.py
│       └── __pycache__/
├── db.sqlite3            # Database file
├── .env                  # Environment variables file
├── .gitignore            # Git ignore file
└── README.md             # Project README file

I would appreciate your guidance on how to resolve this issue. If you need any additional information, please let me know.

Thank you for your time and assistance!

Best regards,

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEsRHMWn1PSmBcD%3Db6jLqYwnCD-FsVtgvKXuAe8kybRo%2BmEQDg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOKiqZkMEKqEUad4gg4CRtDYiHT-8%3Dr-x1Ya4VxmY95tj3hGPA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKYSAw0S1LN3EGH8G68mMphLiXvsQSMZScSf6t6iR3fMX8hJkA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAM-t5xQbHbLZABdLS6XyYn2rq2FjRRbM2myodUoXjJbavgU9mA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEsRHMXhQmpVo1%3Df1O%3D3o2T%2Brk_aa7UUtFuC%2B8f0ZiH9%2BQUpWw%40mail.gmail.com.


--
Abdul Qoyyuum Bin Haji Abdul Kadir
Nickname: Q

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANVqoJ8voxJ3dW4dJkFupNso9kgYEcYJOLX%3DUP6LqQSOHyf2-Q%40mail.gmail.com.

No comments:

Post a Comment