.
How to change default url 127.0.0.1:8000 to desirable url when i run server
Fedor
Hi everyone. I need to use GeoDjango. Do I need to install geo libraries in both database VM and my django app VM? I have a running DB custer and django app as separate instances in my cloud environment.
Javad
Why can't we send a photo here? 😑
Doragonsureiyā
Why can't we send a photo here? 😑
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Piyush
Hello guys I am new here can you help me with my problem on my site
Piyush
I have uploaded my site on live server but
Piyush
When I was login on admin panel and update data still login the all data is visible to my site but after logout data after few minutes get loss
Piyush
Why it's happening ??
Piyush
Data which is entered by user
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
Data which is entered by user
I don't understand your question, wait until someone helps
Piyush
Means suppose when I login to my site admin panel for updating data then update done successfully but when I logout from admin panel after few minutes my all data got loads...
Adrian
How to change default url 127.0.0.1:8000 to desirable url when i run server
You can add 0.0.0.0<port> in the command runserver
Adrian
Ex. python manage.py runserver 0.0.0.0:9080
Adrian
Or you can modify that in manage.py
Hasan
hi why my set-cookie header doesn't set any cookie for me? I'm using django-rest and dj-rest-ath for authentication and react & nextjs for front end
The Inspired
i.e., (login model).save()
The Inspired
method is to be called
Piyush
method is to be called
I will try it thanks 🤗
Begzod
#help Hello, how forward calls to client in twilio?
Zidni Zainul
hello, can anyone help me my erros is 1146 no such table exist i have run makemigration, migrate, and migrate —sync-db , i check on migration file, my table migrated. but my table didnt exist when i access in /admin/ and mysql
Zidni Zainul
Check your settings.py
i have added my app in setting.py inside INSTALLED_APPS, what i have to check then?
Neo
if you're saying it migrated but the table does not exist in your database - then it migrated to a different database then?
Neo
I'm only speculating here, could be anything really but if i were you thats where i would start
Neo
no brother, i just have one app only
I feel like you did not understand what i intended to convey
Zidni Zainul
i did, can i chat u in private chat?
Manju
R u assigned server da
Manju
Database
Manju
Port correctly
Piyush
Hey tell me does sqllite store data permanently or not
Manju
Where do you want to store pl
Manju
Sql lite or mysql
Manju
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'libms', 'HOST': '127.0.0.1', 'PORT': '3306', 'USER': 'root', 'PASSWORD': 'xxxxxxxx', 'OPTIONS': { 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
Manju
settings =database where you to mention all the details of mysql server then only your table visible in mysql data base
S.F.
How to return custom response data to client based on get value Example: Fee? amount=200 I want make opreation for amount and return result to client with out saving result in DB
Никайтос
Hello, I created a model which has an ImageField() in it. In the django admin I add some images, for example "img1.jfif", but after I save it it immediately changes to something like "img1_O18J7H00I.jfif" and the image can't be opened, what should I do?
Никайтос
Did you use media to save images
Yeah, I saved it on my PC and then I tried to load images from that directory
Piyush
What is your src path
Sheetal saini
Hey anyone have any advance project in django
Никайтос
What is your src path
project/app/static/app, there are both images and css files in there
Piyush
Have you write {% load static %}
Mahkam
Hello everybody, I am going to develop website like upwork. There are two type user worker and employer in this case, I need filter users in view. Is it true to use permissions or is there better solution for this case.
Piyush
Or then {% static 'img path' %}
Никайтос
Have you write {% load static %}
It's not about opening it into a html template, it's about opening it into a django admin
Piyush
Ok ok
Piyush
For doing this you can use media in django which is more efficient
Никайтос
You mean, I can load some images to the product with my code, without using a django-admin?
Piyush
Yes
Никайтос
Oke, I'll try my best, thank you)
Piyush
Step 1 : write this is setting.py MEDIA_ROOT= os.path.join(BASE_DIR, "media") MEDIA_URL="/media/" Step 2 : add this to your project url as after path close + static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) Step 3:image = model should be models.ImageField(upload_to='images', default="") Done
AMIRHOSEIN
Hi i need registration for new user but with django auth i just can login ... Any one has idea?
Javad
Friends, the front end and I have a problem that has not been solved for several days Look, we made a site similar to Insta Then the part where the user wants to change his profile picture does not work properly When the user changes his picture, it seems to be OK and status 200 returns, but his profile picture does not change * At first, I did not use viewset. I was using the same code that was commented and it had the same problem * Serializer has only one field called profile_photo * The front-end has checked the code many times and showed it to several people and says it is ok my code : https://linkode.org/#vG7wZuqJp9S19xZVY9o6S5
Никайтос
Excuse me, I just wanted to thank him 😅
A_Y
Friends, could anybody help me with uwsgi, I messed up trying to run it globally with dependencies installed inside virtual environment... Thanks a lot!
A_Y
Thanks a lot, i'll read!
Luis
Hi, I'm configuring a django server in a container. Is it better to use apache or nginx?
Luis
isn't it more difficult to configure?
cj
isn't it more difficult to configure?
of course not, and Django works better with nginx than with apache
Luis
okey, I'll try to learn nginx
cj
okey, I'll try to learn nginx
it's just needed to write a few lines, instead of configuring apache and installing plugins and messing with apache's config things for hours, with nginx you just add the reverse proxy thing and you're done in less than 2 minutes
Luis
to use nginx, don't I also have to use gunicorn?
cj
to use nginx, don't I also have to use gunicorn?
if you want, yes, but you don't need to configure anything —or at least not anything too complex— ¯\_(ツ)_/¯
Luis
ok I'll try it without gunicorn
Luis
any good tutorial on nginx with django?
cj
ok I'll try it without gunicorn
if you go to use gunicorn you just have to change the command to run the server, instead of ./manage.py runserver ..., you use gunicorn project.wsgi:application
cj
any good tutorial on nginx with django?
the one from Django's doc
Luis
cj
ok, reading it 😊
but this one is more detailed: https://realpython.com/django-nginx-gunicorn/
Alex
any good tutorial on nginx with django?
Digital Ocean got good articles