AZ
Please dont send DMs without asking for permission
Shugaba
Anonymous
Anonymous
Ok guys how much day it take learn DRF
@
Charly
@
Anonymous
Anonymous
Sayidbek
Is heroku still free for hosting Django
Mirco
Anonymous
Dmitriy
Hosting multiple sites on a single VPS. Using docker network. I use acme to get certs, it seems that I managed to get them, but cannot bind them to my url. Any suggestions?
Docker volume inspect shows this:
"CreatedAt": "2022-10-14T10:06:08+03:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "adventures",
"com.docker.compose.version": "1.25.0",
"com.docker.compose.volume": "certs"
},
"Mountpoint": "/var/lib/docker/volumes/adventures_certs/_data",
"Name": "adventures_certs",
"Options": null,
"Scope": "local"
}
Doragonsureiyā
Hosting multiple sites on a single VPS. Using docker network. I use acme to get certs, it seems that I managed to get them, but cannot bind them to my url. Any suggestions?
Docker volume inspect shows this:
"CreatedAt": "2022-10-14T10:06:08+03:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "adventures",
"com.docker.compose.version": "1.25.0",
"com.docker.compose.volume": "certs"
},
"Mountpoint": "/var/lib/docker/volumes/adventures_certs/_data",
"Name": "adventures_certs",
"Options": null,
"Scope": "local"
}
Your question is not related to Django.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Sandeep
How to load templates in django?
Please let me know
𝕯aniel
How to load templates in django?
Please let me know
Copy Files to static folder
Copy Html pages to templates folder
After do load static in html page
Example:
{% load static %}
<link rel="stylesheet" href="{% static 'polls/style.css' %}">
𝕯aniel
And do not forget create base.html page where you load only website navigation and footer
𝕯aniel
After you need include it to all new page via {% extends 'base_html_file_path' %}
Adrian
Aldo you need to configure your template's path in the settings' file
Jasurbek
I am testing my django project in a server with postman. If I send a request without body it returns the correct error message. But if I send a request with body it is showing 404 error by saying 'Page not found' What can i do
Doragonsureiyā
Sarvar
NO i said drf community where is it
Mirco
▄︻デռǟɦօʍ══━一
how to add a button that executes a function but not a url
Rojitech
Anonymous
How to disable csrf token for some view functions?
@csrf_extempt method works on localhost but when I host it on pythonanywhere then it starts giving csrf token missing error.
Azizbek Xushnazarov
▄︻デռǟɦօʍ══━一
jevAd
Alex
Sandeep
Marc
I want to put 4 items in a row.
Getting following error:
Could not parse the remainder: '|' from '|'
without the if loop code works fine
https://linkode.org/#4cfKuYpbSWxFdI9tIWQSY5
Harshavardhan Reddy
Hello guys, is any one know how to integrate voice support  and chat bot for django project
Cheshtaaaaaaa
What's the use of elephant SQL
Doragonsureiyā
What's the use of elephant SQL
These single steps will help you a lot:
Step 1️⃣: Open a browser
Step 2️⃣: Write down https://google.com or https://duck.com and press Enter
Step 3️⃣: In the search box, write down the same words you asked here
Step 4️⃣: Read the first results
Hemant
I am doing an assignment where I am supposed to customize admin view to add a list of apps with some basic attributes like app name, app link, icon, etc.
When I am trying to make group of two fields (say: app name and app link) by inheriting admin.ModelAdmin I am getting below error:
TypeError: __init__() missing 2 required positional arguments: 'model' and 'admin_site'
Here is the code. I tried running it in Python 3.7 and 3.10.x both and just the difference is 3.10.x specify ModelAdmin.__init__() in error message and 3.7 doesn't.
edit: Solved
solution: I was actually overriding the default admin but I should have revert my previous changes to bring back django.contrib.admin in settings.py
mohamed
Hello
I’m trying to load css file and I used load static but still not working
navid
can i have a look at ur files
mohamed
navid
STATIC_URL = "static"
STATICFILES_DIRS = [os.path.join"BASE_DIR", "static"]
navid
add this to your settings.py
navid
Which file
the files structure i mean make the static folder near the apps folders
mohamed
mohamed
I’m using bootstrap
Bhaghi
give the link in ur html
navid
set the href of ur style sheet link like so:
"{% static '/base.css' %}"
mohamed
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
Ak
navid
I did that too
hold shift and press f5 on your browser it forces static files to load
mohamed
navid
mohamed
Thank you so much guys
navid
happens a lot actually remember the shortcut
SumithVarma
Hello all
Can any one help me with error unexpected tokens at <!DOCTYPE html> after loading static file
Sravya
<ul class="errorlist"><li>date_joined<ul class="errorlist"><li>This field is required.</li></ul></li></ul>
bro i am facing this error while registration what can i do for that
Rakesh
Hi all,
Anyone know how much space we will have in Django DB (inbuilt database) ?
Means how much capacity of data it can store?
Mirco
Piyush
navid
navid
but i guess ur not putting the field in ur html in the first place
navid
are u making a form yourself?
navid
or using {{ form.as_p }}
Ædel
Prog Hisham
Hello there,
I want to call the blog variable which is in settings.py inside the change_form.html
Mirco
Marc
Prog Hisham
Ankiniki
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'rest_framework.templatetags.rest_framework': cannot import name 'FieldDoesNotExist' from 'django.db.models.fields'. Can anyone help me out for above error.
mohamed
How can I make all photos in the web page in same size , I know that relates to CSS but I need help
Artyom
Ogundare
Hello senior Django devs, is it possible to have multiple apps in a single project, where the first app will be the main domain and other apps will be the subdomain, thereby having the urls.py as, main app(abc.com) other apps (xyz.abc.com, fgh.abc.com) etc. Please, how possible is this?
Mujahed Saleem
you can define them as dict in middleware .
When request come you will read domain from it and redirect it to designated app