Django Bot
>> Blogs
- Evennia in Hacktoberfest 2017
Anonymous
Guys
Anonymous
In unit tests, when I send a get request to an url and it redirects to another
Anonymous
and then assertTemplate
Anonymous
Will it count?
Anonymous
like If I assert for the redirected url template
Django Bot
>> Blogs
- A Complete Beginner's Guide to Django - Part 5
Anonymous
Hello guys , I was wondering if someone has idea of how to create a realtime-chat application without JS files only with SQL and Python/Django ?
Ghazwan
Ghazwan
Why don't you want to add js files?
Ghazwan
Use librejs if you're Stallman follower
Anonymous
Anonymous
Do you have any ideas of how that can be done ?
Anonymous
Thanks
Ghazwan
Ghazwan
Ghazwan
But not recommended
Anonymous
Ghazwan
Anonymous
But not recommended
can you explain me why please ? , is that has something to do with security/privacy?
Ghazwan
You won't work alone, in teams they all write js and you are the only one who write python in the client side which is unacceptable
Ghazwan
You must learn JavaScript
Anonymous
That's clear enough , Thanks man
inchidi
Anonymous
inchidi
no problem with the backend, django can do it. but to make sure its "realtime" you will need jacascript in your browser if its webapp. html and css cant do that alone
inchidi
Anonymous
actually it doesn't matter if it's realtime , it's okey if it will take few seconds to receive message (after refreshing the page of course) .
Anonymous
I just didn't figure out how to do it exactly
Django Bot
>> Jobs
- Python / Django Developer
- Python / Django Developer
>> Blogs
- Understanding Routers in Django-Rest-Framework
karry
What have i done wrong here?
inchidi
there written indentation error
inchidi
>>>for board in board_list:[enter]
>>>[space]print(board)[enter]
>>>[enter]
Anonymous
Anonymous
I really appreciate that
karry
Anonymous
Anonymous
Anonymous
you have this github repository with a few examples even multichat app
Anonymous
https://github.com/andrewgodwin/channels-examples
Anonymous
Hello Juan B , thanks for replying
WebSockets requires JS enabled on the browser , and this example contains JS files
Anonymous
the example just has jquery as dependency, it's right you need to be enabled any option in the browser but that just if you don't have you webpage secured with ssl
Anonymous
you can try to download the example and run it, I didn't need change any option in my browser
Anonymous
and y teammates neither
Anonymous
I got that , thanks I'll try it right now (y)
Abhi
i have a function that will list the files and directories from a given folder.
Abhi
how can i write unitest for it ? what thing should i test ?
Anonymous
Anonymous
check if goes wrong if it's used wrongly
Anonymous
check it's flexibilty
Anonymous
why do ya guys use test.py like a lot ?
Anonymous
i debugg frm user prespective 😂
Anonymous
Yeah
Django Bot
>> Blogs
- Upgrade All Pip & Python Packages & Store an Archive
Django Bot
>> Blogs
- Overriding Django Model behaviour with Proxy Model
- how to pass extra context data to serializers in django-rest-framework ?
Ghazwan
What's you guys best practice in django ? Template directory for each app or main template dir with apps in it ?
Ghazwan
I hear it's usual to have template dir for each app but it feels kinda messy
Anonymous
It depends
inchidi
Django Bot
>> Jobs
- Senior Web Backend Developer
Ghazwan
Ghazwan
Ghazwan
Don't create template dir for each app, that was the title
Anonymous
Django Bot
>> Jobs
- Tech Lead
Anonymous
return queryset.filter(user__username__iexact=self.kwargs.get("username"))
Anonymous
old school here, is kwargs.get necessary here ?
Anonymous
it's queryset in listview that return all the articles that are posted by a certain user
Anonymous
yes
Anonymous
actually it depends on what you named the dict arguement
Anonymous
or prefixed with **
Ghazwan
https://medium.com/@raiderrobert/djangos-selected-related-is-basically-magic-20fffaf834fa
Ghazwan
i did not know it is that important.
Anonymous
wow! I never read about that
Tushar