Shourya
Which i dont want it to read
Anonymous
kartik use caching
But my main concern is to save the storage. Is there any way to save space?
inchidi
Britto
django beginners materials pls
inchidi
Doragonsureiyā
django beginners materials pls
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
Shourya
Actually its like localhost/api/<path:some_other_url>
Anonymous
You can do it using jquery
Hi
Thkx for answer
But How can i set the hidden field not requered, and set showen fields requered.?
Shourya
Then i m passing header authorization Bearer....
Shourya
Shourya
And then code there
Shourya
But django is reading it as its own
Shourya
Any idea @Inchidi
Shourya
?
inchidi
Anonymous
I do this, it will be like notification requered field ? I found any thing in google
Shourya
Shourya
Shourya
In a way that when the user clicks on php from drop down then only php questions should be there right?
inchidi
Not its on azure platform
then the problem is on your client side because it's sending same authorization header to your django app, not on your django app side
Shourya
Shourya
Ok umm in summary
Shourya
I have a backend django server
Shourya
In this i have a view which will do a GET request on azure platform......the url for azure platform will be passed in the url i shared above
Shourya
I need to enter authorization token in azure so i am passing it here in the same django app
Shourya
I want django app to not read this token and get my control straight to view
Shourya
Instead
inchidi
same thing, your problem is on client side because you pass azure token on authorization header
Shourya
Is there a way django server doesn't read this header and not read it as its own
inchidi
if i guide you how to make your django app ignore authorization header, its gonna be equals with i tell you to jump from a bridge because you are thirsty
inchidi
Shourya
Shourya
Shourya
I need to make something like cors-anywhere.herokuapp.com
inchidi
Shourya
Shourya
In this particular one i dont need
inchidi
what's the point of having authentication if you dont apply authorization?
Shourya
Shourya
@Inchidi Any idea you have on how to make django ignore headers completely in a request
inchidi
create authentication class, extends from BaseAuthentication from drf
override the authenticate() method and add check (pseudo):
if request.build_absolute_uri == 'your cors anywhere path':
return None
then add that authentication class to drf config on your settings.py
Damron
Who was using django-markdown-editor, how did you save styles for mrdwn field in templates? Content style always rewriting by other styles, so I loose mrkdwn like view
Damron
Or maybe I need to copy-paste styles into my static file and link to them? - In case of DEBUG mode
Бекказы
Hi, everyone. I have a question on djandorestframework.
Is it possible to include or exclude fields using a single serializer, depending on the method?
Models - https://dpaste.org/cYAB
Serializers - https://dpaste.org/rcpu
Views - https://dpaste.org/nxyU
using multiple serializers and classes for GET POST and PUT methods seems to me not a good idea
inchidi
Damron
I really have no idea
Damron
I think styles for mrkdwn are rewriting by another css file
inchidi
Damron
My mrkdwn content in {{ object.text|safe_markdown }} is getting another style
Not as mrkdwn's style
Rainur
inchidi
Damron
inchidi
yes
martor.css and martor.js loaded on that page already?
Damron
yes
Damron
in browser console all files are included
Damron
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.css' %}" media="screen"/>
<link rel="stylesheet" type="text/css" href="{% static 'css/font-awesome.min.css' %}" media="screen"/>
<script src="{% static 'js/3.4.1_jquery.js' %}"></script>
<script src="{% static 'js/general.js' %}"></script>
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}" media="screen"/>
<link href="{% static 'css/martor.min.css' %}" type="text/css" media="all" rel="stylesheet" />
<link href="{% static 'css/martor.css' %}" type="text/css" media="all" rel="stylesheet" />
inchidi
that means if you open the link for that css and js file, you can see the contents of martor.css and martor.js right?
Damron
yes, u're right
Damron
yes, that's worked!
Damron
But now I don't have styles for other other part of code
Бекказы
that's good idea actually, your api schema gonna be clearer and more verbose
If I use several serializers, I will need to write several views for each serializer like this https://dpaste.org/hEYQ#L
And write them in url like this:
urlpatterns = [
path('blank/', views.BlankList.as_view()),
path('blank/', views.BlankAdd.as_view()),
path('blank/<int:pk>/', views.BlankDetail.as_view()),
path('blank/<int:pk>/', views.BlankPut.as_view()),
]
it is right?
inchidi
Damron
that's weird
styles.css has no !important
Damron
but markdwn files are got many
inchidi
Бекказы
Damron
I understand, but thank you very much - now I know what's the problem)
isa
https://pastebin.pl/view/2ed6a67b
isa
I am doing this import but have following error. (EYT) focuser@focuser:~/EYT/EYT/EYTHABER$ python makale/gazete_views/birgun.py
Traceback (most recent call last):
File "makale/gazete_views/birgun.py", line 4, in <module>
from makale.models import Yazar, Makale, Gazete
ModuleNotFoundError: No module named 'makale'
inchidi
inchidi
Бекказы