Special characters in translations

2022-07-31 Thread אורי
Hi, I need to translate a string that contains a non-breaking space ("\xa0"), but I can't find a way to translate this string properly. The translation ignores the special character or doesn't translate the string at all. Eventually I came up with this solution: from django.utils.translation

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-07-31 Thread Abdul Qoyyuum
It really depends on your usecase. If you find that you can work without an API for your ecommerce website, then you don't need it. If you believe you need to make your ecommerce as a headless ecommerce site, then you need an API or GraphQL or other means of sharing data. On Sunday, July 31,

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-07-31 Thread Adebileje Nurudeen
Sure... You need it On Sun, Jul 31, 2022, 3:24 PM Joseph Bashorun wrote: > > I am stuck in a loop of confusion. I am trying to build an ecommerce > website and make it production ready. Do i need to build an API for it? > > -- > You received this message because you are subscribed to the Google

Re: MongoDB connection with django

2022-07-31 Thread Juergen Hauser
Just in case someone is still interested in an answer ( after 6 month ?) pip install pytz (its missing in djongo package) pip install pymongo==3.12.3 python manage.py makemigrations python manage.py migrate this solution was provided in : github pymongo

Re: 如何在Django4.0.6中使用MongoDB数据库

2022-07-31 Thread Juergen Hauser
pip install djongo pip install pytz pip install pymongo==3.12.3 settings.py: import djongo #Database is localhost: DATABASES = { 'default': { 'ENGINE': 'djongo', 'NAME': 'your-db-name', 'ENFORCE_SCHEMA': False } } #Database is server: DATABASES = { 'default': { 'ENGINE': 'djongo',

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-07-31 Thread Julio Cojom
There are a couple of projects built in Django for this, for example Django-Oscar or saleor(community version), the last one is a tech stack a little bigger but really fast and customizable. If you want to start one from scratch, be sure to check both projects as they have good abstraction

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-07-31 Thread Ram
Hi, In my opinion if you are starting from scratch to develop your ecommerce application, I would encourage you to start with DRF, but if in case if you can not afford to write DRF APIs for an existing application, you might want to refer this:

Re: ForeignKey Reverse Relation Fail

2022-07-31 Thread Ammar Mohammed
Using many to many relationship will work better. Nice note 珞 Your quote Translation : "لا يؤمن احدكم حتي يحب لاخيه ما يحب لنفسه" On 27 Jul 2022 19:04, "Malik Rumi" wrote: > Thanks, but the recursive foreignkey *is* a one to many relationship... > unless you're talking about something else? >

Re: ForeignKey Reverse Relation Fail

2022-07-31 Thread Ryan Nowakowski
Since this is a question about your models, please post your models.py. On 7/27/22 5:18 AM, Malik Rumi wrote: I have a model with a recursive foreign key to 'self'. This is intended to model a parent child relation among instances. The forward relation, on a field called 'childof', works as

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-07-31 Thread Lakshyaraj Dash
You need drf aka DjangoRestFramework because it provides a smooth api for your application. It comes into use whenever you're trying to have a javascript framework like ReactJS or NextJS or Angular or VueJS etc... On the client side. If you inject js framework in the frontend you also need a

Why do we need Django rest framework when our conventional django do what we want?

2022-07-31 Thread Joseph Bashorun
I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving