Rutherford
Anonymous
REST or Graph ql which is better for large business apps
Rebellion
urlpatterns += [ path('', RedirectView.as_view(url='catalog')) ] I had put redirect url in one of the demo projects. But when I create other project in different directory and that too using separate environment, still default url is redirecting to this one. How, url mentioned in one project is affecting the other...? I have commented that out but still itis redirectly to this url..? Why..?
Rebellion
Every other project is affecting because of it. What should I do...?
Rebellion
try specifying app_name for each app
Tried by specifying a app name... But still default url '127.0.0.1:8000' is redirecting to '127.0.0.1:8000/catalog/'
Rebellion
Can I send you screenshot..?
Rebellion
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/catalog/ Using the URLconf defined in demo.urls, Django tried these URL patterns, in this order: admin/ myApp/ The current path, catalog/, didn’t match any of these.
Rebellion
This is how web page looks...👆🏾
Rotana
Can we get MAC Address of client with Django ?
Krunal
Is there any way to direct upload attachment from the email in django?
Doragonsureiyā
Can we get MAC Address of client with Django ?
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
Jaya
hey can anyone help me with websocket token authentication, i am little confused with it
Krunal
Use SMTP
I am using imap_tools and fetching the email. Should I use direct attachment object or need to save file somewhere and then need to upload.
Python Guy
how to get all comments of a post
Mirco
how to get all comments of a post
it depends on how you set up your models, we don't have any magic ball
Python Guy
it depends on how you set up your models, we don't have any magic ball
so, in comment I have field of post and author. Now I want to list all comment of a post in a post detail page
Mirco
https://dpaste.org/xVN4
ok so when you have a Post instance you can just do post.comments.all()
Jaya
hey can anyone help me with websocket token authentication, i am little confused with it
Jaya
i have done that part, just need a little clarification about how i should implement it in routing.py
Jaya
i have created that custom middleware for authentication , just want to know how to code that tokenauthmiddleware in routings.py file
Rebellion
It seems that I have to give up that default '8000' port and use other port... that's the only option left...
Mirco
It seems that I have to give up that default '8000' port and use other port... that's the only option left...
it depends on if you have the other project running it's normal you cannot have 2 projects on the same port
Rebellion
it depends on if you have the other project running it's normal you cannot have 2 projects on the same port
Pardon my ignorance, I'm new to Django. But, it was all okay before I declare 'RedirectView' is one of the projects. I could run all other projects on the same '8000' port. I Never had any problem with the port number.
Rebellion
Now, I'm trying to declare to new port number in settings.py under 'DATABASES' dictionary. But, it does not work. So, I'm using 'python manage.py runserver 7000' command to run server on port '7000'. Is there any way of putting port number in settings.py itself...?
Mirco
Jaya
how to authenticate websocket token via query parameter in django?
Jaya
yes
Azamat
Do u want to pass token in WebSocket?
Azamat
You can use web socket headers
Azamat
Do you connect to ws from Javascript?
Jaya
yes but the problem is i am facing some issues while sending token via headers so i want it to send it as parameter for authentication, i hope you are getting my question.😅
Guilherme
Good morning Guy, I need to connect 2 databases in my project, but I am nota able to look at the official Django documentation. Does anyone know I can make this connection or another link but step by step?
Azamat
And you can get it from self.scope in consumer
Jaya
so i should verify the token in consumers, is it a correct way to do so?
Azamat
You can also verify token in middleware
Azamat
Create custom middleware and check token there
Azamat
What middleware do you use in asgi.py?
Rebellion
Ain't you using the same virtual environment, that might be the problem
Nah, I created new directory in completely new drive and created new virtual environment in it. Then created project there... But, stiil it does show the same default redirect url. Only changing the server port solves this issues.
Mirco
Nah, I created new directory in completely new drive and created new virtual environment in it. Then created project there... But, stiil it does show the same default redirect url. Only changing the server port solves this issues.
It's normal, on that port is the first project that answers you not the second one The second one won't start if the same port is busy For instance if you use the default one : 8000
Rebellion
Yeah, thank you all for reply..!
Doragonsureiyā
Yeah, thank you all for reply..!
You're welcome! 😊
Anonymous
Djnago rest framework in how to set null value Example: box = serializer.serialziermethod() def get_box(self, obj): # return BoxSerializer(BranchBox.objects.by_user(self.context['request'].user).filter(branchproduct__product=obj).first()).data So, i want show there if box user have no any value there show box:null If box have value show box value
213
Hi there, any experience using azure ad to signup and signin users in a django website? The documentation is very poor on the net. Thanks for any help
RK
How to become full stack python developer.. Which technologies I need to learn
RK
Any one can help me
Umutbek
Django template
RK
Django template
I can't understand sir
Mohamad Reza
How to change admin panel theme color from dark to light ?? Searched on google but can't found the results I want
Mohamad Reza
How to become full stack python developer.. Which technologies I need to learn
HTML, CSS, Bootstrap (suggestion), Js (and one/two of its frameworks at least), Python (Django or flask)
RK
Is Angular complusary
213
you have to implement the normal OAuth flow
Do you have any documentation?
Mirco
Do you have any documentation?
internet is full of documentation on how to implement OAuth with Django Just search a little bit
213
internet is full of documentation on how to implement OAuth with Django Just search a little bit
Thats why i mentionned the special case using AAD 🙂. You think i did not used internet before coming here. If u think so, then we have to close this group, because internet is full of documentation
Mirco
Thats why i mentionned the special case using AAD 🙂. You think i did not used internet before coming here. If u think so, then we have to close this group, because internet is full of documentation
Again, even if it's AAD, OAuth is a standard so it's like login with Google etc etc I think you are smart enough to implement the same by knowing what OAuth is
Igor'
How Can I avoid CaptchaField() in pytest?Registration's test
Igor'
@pytest.mark.django_db def test_published_post_register(client): response_name = client.post(reverse('register'), { 'username': 'john', 'email': 'lennon@thebeatles.com', 'password1': 'Hack1234', 'password2': 'Hack1234'}) assertRedirects(response_name, reverse('main_page'))
Roman
Hi! i'd like to start with there is the python library verify_email, in python script it working well and correctly check email, but when i call this library in my django project(to check given email) i have error. i didn't find the way how to check email in django, can you help me with it?
Doragonsureiyā
Hi! i'd like to start with there is the python library verify_email, in python script it working well and correctly check email, but when i call this library in my django project(to check given email) i have error. i didn't find the way how to check email in django, can you help me with it?
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