Doragonsureiyā
Hey
I am using abstract base use model when I registered the user through portman password hasing but when try to django Admin panel password is not hasing it is showing plan text
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase.
Brhum
hey guys
do anyone know how to style a form after using inline when using django-unfold library for admin panel?
Bradford
Fred
Please in the django-bleach repository on GitHub, I've seen something like django-bleach is "archived because bleach is no longer supported"(https://github.com/marksweb/django-bleach?tab=readme-ov-file), is that right? Or when I do pip install django-bleach, it will install another bleach from somewhere else?
Fred
T
In a microservices architecture with Django, where each service has its own database (e.g., a User model in a User Service and a Product model in a Product Service), the interaction between these services requires careful planning to maintain data consistency, scalability, and separation of concerns. what are some best practices for connecting these two services?
inactive
In a microservices architecture with Django, where each service has its own database (e.g., a User model in a User Service and a Product model in a Product Service), the interaction between these services requires careful planning to maintain data consistency, scalability, and separation of concerns. what are some best practices for connecting these two services?
Theres a lot of ways to services to communicate with each other, for example through API, message brokers, gateways, events etc. You can just google it or ask gpt, however I personally don’t think Django is the right choice when it comes to microservices, there is better frameworks like FastAPI for that type of architecture.
𝑵𝒐-𝑩𝒐𝒅𝒚 𝑵𝒐𝒔𝒆
Hi there. I am learning Subquery and OuterRef, I have question about that. Can I use 2 non-related models in Subquery ?
my models is something like:
class Company(models.Model):
name = models.CharField(max_length=255, blank=True, null=True)
address = models.CharField(max_length=255, blank=True, null=True)
inn = models.CharField(max_length=80, unique=True)
class Log(models.Model):
inn = models.CharField(max_length=255)
Also I have code which I wanna improve
qs = Log.objects.all().values('inn').annotate(
success_max_amount=Max('amount')).order_by('-success_max_amount')
I wanna get company names for each inn (for each objects). What kind of approach can I implement and how ?
If need some information I can provide. Thanks in advance
𝒀𝒂𝒔𝒉𝒂
Hello everyone!
I want to create a dedicated admin panel in Django.
And the question that comes to me is, should I build the admin panel on the default Django panel or write it separately?
In general, my admin panel is very different from Django's admin panel. In fact, the most similar part of my admin panel is the login page.
Please help me. 💻
Charly
𝒀𝒂𝒔𝒉𝒂
𝒀𝒂𝒔𝒉𝒂
rtg
Any repo with a django project with an OpenAI virtual assistant to be able to clone and add API from my OpenAI account? Thanks! 😉
Charly
rtg
but i need in django project
Charly
but i need in django project
I'm afrad you'll need to code it, But a virtual assitant doesn't make too much sense to be made with django
rtg
why not? a business web that they need to add a virtual assistant to help customers, like a bot. You know.
Charly
rtg
in openai you can creat a virtual assistant with all info about the company in a .txt With this you get API. I was to add this in django. I supose that need socket to use asincronous system with openai api but i am not sure. I created a virtual assistan in a minipc with openai, microphone and speaker but i didnt create a django project with openai api.
rtg
i want to try this
Shyam
how to manage mutiple python version on server for multiple django apps
M...
Hello everyone ! can you tell me how to display image in admin panel user details. And i am using Django Rest Framwork so i am receiving image through the api
The Inspired
The Inspired
register your model in 'admin.py' to show it
The Inspired
just like in normal django
cj
@inret100 did join this group just to spam your link?
have you even read the rules of the group?
rtg
it is not spam. It is a tutorial to create a django with openai bot.
rtg
A few days ago I asked if there is any github repository with a django project with a built-in openai virtual assistant. I didn't find it. So I created one and shared it on my blog. That's all. I don't think helping other users is spam. Thank you.
Maxim
rtg
yes i read, dont worry if someone wants help, can ask. I am for help.
rtg
nice day 😉
Maxim
E
Who made PWA. I need the link to open in an external browser and not in the app. target="_blank" does not work
for example, the domain domain.com/menu/us
I need the link (domain.com/registration/...) on this page to open in an external browser and not PWA
Doragonsureiyā
H0scein
hi every one
i wanna use celery for some background task with rabbitmq as broker and redis as result backend.
in docker compose i added rabbitmq and redis services, they are up and no error.
but for celery after building compose encounter a 'The module app was not found. '.
i think its about working directory or something like this.
i will put compose file in the next message, appreciate for your helps...
Doragonsureiyā
H0scein
H0scein
Herman
Can anyone advise on queries in the database. For example, I take a list of users, write to the list, take a user from this list and add it to another model (where the relationship is foreign) and it makes a query in the database to get this user by id. Is there any way to optimize this? So that it just takes the object from the list and does not make a query to the database?
Ola
Alisher
Response Text: {"error":"FOREIGN KEY constraint failed"}
please help me, what is this error?
cj
Alexander
hello guys, please help
How can i show verbose_name of variable in Djnago template?
Maxim
T
Hi everyone,
What is the best method for handling a Many-to-Many relationship where both Users and UserGroups can be reviewers? I want a solution that is scalable, efficient for querying, and easy to maintain. Which approach would you recommend?
Akintola
The Inspired
simply put users into usegroups?
The Inspired
seems simple and efficient
Vykrie
simply put users into usegroups?
Yes I second this, it works smoothly, and you just pass the group to access a specific view:
For instance you have a library management system, you want students not to access the librarian's views, on the login view for the librarian's side, you pass the user.groups for Librarians which has all librarians' user accounts. And that alone secures the view
S
In a cookiecutter-based Django project, I'm trying to implement GDAL and the PostGIS extension for PostgreSQL within a Docker container. GDAL appears to install correctly, but I encounter an huge error when running the container and in the end it shows : OSerror: /usr/lib/x86_64-linux-gnu/libgdal.so.32: cannot open the shared object file. No such file or directory. Oddly, the file exists at that path. What could be the problem?
Lucas
maybe check if that file exists within the image
ford
dima
Guys if i do wrote code in django within postgsql as databases and how to running it in docher container so that the server is running in the cloud
شهرزاد محمد
Pablo
Ainul
Ainul
Ensure to connect the django using the private network of the database for security consideration.
To do that, you can setup a bridge network for both django and postgresql.
Sakshi
Hello everyone
I have api's in django where it calculates some parameters and store that in database (mongodb) to trigger this api i used frontend as react where on button this api's are calling now my question is I want to show logs of this api that which record is get stored and at some point error occurred that error message also when hit the button in ui on real time
How can i achieve this can anyone help
IT Engineer
IT Engineer
You can implement any one of them
Rishav
I'm having an issue with the django 5.0+ versions when working with docker. Anybody else facing the same issue?
奈姆
What's the issue?
Doragonsureiyā
I'm having an issue with the django 5.0+ versions when working with docker. Anybody else facing the same issue?
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase.
Rishav
these are the 2 errors I'm getting:
ERROR: No matching distribution found for Django==5.1.5
ERROR: failed to solve: process "/bin/sh -c pip3 install -r requirements.txt" did not complete successfully: exit code: 1
Rishav
Charly
Rishav
cj
3.12.2
are you really sure?
did you double check that?
Charly
3.12.2
Show your Dockerfile and the full log
Sakshi
Charly
Sakshi
Maxim
@jungle_beast the next warning will get you banned here, @python and @pythonofftopic
Rishav
Show your Dockerfile and the full log
FROM python:3.8-slim-buster
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
CMD ["python3","manage.py", "runserver", "0.0.0.0:8000" ]
here's the Dockerfile