tz
am I going in right direction?
🏳️‍🌈Robby [ Private Message = Spam]
am I going in right direction?
Want to learn JavaScript and conquer the world? Start here: Tutorials and Books - JavaScript For Cats is a dead simply introduction for new programmers. - MDN JavaScript Guide has the most standard and straightforward tutorials. If you need references, MDN is here for you too. - You Don’t Know JS is the best book to learn JavaScript from. It’s free to read on GitHub. - Eloquent JavaScript is another great introduction to programming and learning JavaScript. - Modern JavaScript Cheatsheet helps you understand and learn all the new features in the language. - JSBooks, a collection of free JavaScript books. Videos and Courses - JavaScript: Understanding the Weird Parts an incredible course which teaches the concepts of the language. First 3 hours are free on YouTube, you can but the whole course from Udemy - FunFunFunction makes the learning process enjoyable. - Javascript30, 30 videos to level up your skills. - Traversy Media great contents mostly aimed for begginers. Learn by Doing - FreeCodeCamp, learn to code by building projects. - CodeAcademy, learn to code interactively. - Codewars, train with programming challenges. Functional Programming This where the true the good parts show theirselves. - JSUnconf 2016, learn functional programming basics with this talk from Anjana Vakil. - FunFunFunction's videos are a great start. - Mostly Adequate Guide to Functional Programming and Functional Light JS will make you master the functional programming. - JavaScript Allongé, programming from functions to classes. - Functional Programming Jargon in simple terms. - awesome-fp-js is a good reference for functional programming in JavaScript. Other Resources - Spellbook of Modern Web Dev is a big picture of modern JavaScript development. - What the fuck JavaScript?, list of funny and tricky JavaScript examples. What’s next? You can learn Node.js for backend, or go crazy with front-end frameworks, or even further, create mobile applications.
🏳️‍🌈Robby [ Private Message = Spam]
https://developer.mozilla.org/en-US/docs/Web for everything web
Omair
Hi I am trying to display values instead of just length of list of a manytomany field in drf and when i follow https://stackoverflow.com/questions/33182092/django-rest-framework-serializing-many-to-many-field I dont get the student_subject field all together
Omair
My models https://pastebin.com/WMyGB69Y
Omair
My serializers https://pastebin.com/4MCaa7bp
inchidi
My serializers https://pastebin.com/4MCaa7bp
i cant see anything wrong in your serializer, what do you mean by "dont get the student_subject field all together"?
inchidi
maybe check again if your views use correct StudentSerializer?
Omair
i cant see anything wrong in your serializer, what do you mean by "dont get the student_subject field all together"?
When I open the respective URL mapped I only get fields such as fist name last name and others except the student _subject field.
Omair
View https://pastebin.com/6NMsZBme
inchidi
View https://pastebin.com/6NMsZBme
why you didnt use generics.RetrieveAPIView instead?
Artyom
Hi guys! I didn't do this before. I wish that id/token of User is related with the one model. I want to do some query in my model, and User id or analog User characteristic will has a filter role. How I can do it?
Artyom
I use standart django.contrib.auth User
Omair
why you didnt use generics.RetrieveAPIView instead?
Retrieve api view wasn't returning multiple instances
inchidi
Retrieve api view wasn't returning multiple instances
so if you filter Student by certain id you'll get more than one student object?
Omair
so if you filter Student by certain id you'll get more than one student object?
The students id is unique for every student but retrieve api view is throwing multiple instances error which it should not must be some problem in the data entries of this many to many field because after reading multiple references on serializing relations what I am doing right now should logically work
Алишер
Hello, guys I have admin for my django project, I have model User. I want to add a button for every User row on admin site. You may select month day after click on this button. After click on month day in calenday you will see special page with list of some rows (depends on choosen day). How can I do that? Can someone write an algorithm of actions for me to do for implementing such functionality?? Which part of documentation to read for such things?
Anonymous
I can't make a post request with json content type This is the curl command: curl -iX POST -H "Content-Type application/json" -d '{"name":"amir"}' localhost:8000/users/ when I print: print(request.body) I get: b"'{name:amir}'" While it should be: b'{"name": "amir"}'
Artyom
why django throws this: TypeError at /api/cutarea-fca/ int() argument must be a string, a bytes-like object or a number, not 'AnonymousUser'
Artyom
when I use this in my view: def get_queryset(self): user = self.request.user return Fca.objects.filter(user_check=user) serializer_class = FcaSerializer permission_classes = (permissions.AllowAny,)
Artyom
like a part of seriallizers.py class
Artyom
and I use api after loggining
S.
Hi Firends I have a problem I need a model as myCustumer myCustomer can be company or person if my custumer is company; Custumer has different field - example:(company name - company type - etc) if my custumer is user; User has differend field- example: (user name - user surname - etc) how can i make this model Lastly my english level is low. I wish you can understand me :)
Anonymous
Hi Firends I have a problem I need a model as myCustumer myCustomer can be company or person if my custumer is company; Custumer has different field - example:(company name - company type - etc) if my custumer is user; User has differend field- example: (user name - user surname - etc) how can i make this model Lastly my english level is low. I wish you can understand me :)
I've seen exact same code Complexity in this code does not come because of models but it will appear in views and templates (if you want to write good code) You will need to use ContentTypes Example is presented in the book named Django 2 by example (last project, it'sabout an e-learning website) You should read it. It's excellent It's not something that can be explained here Or you can download the source code, and read it's source code instead of book
Anonymous
About models I can say you make a base model and define attributes, functions and ... that are common Then you make your classes and inherit from that base class
Anonymous
Suggest editor for django similar to atom
Anonymous
In ubuntu
🏳️‍🌈Robby [ Private Message = Spam]
🏳️‍🌈Robby [ Private Message = Spam]
Emacs
cj
In ubuntu
Atom runs in Ubuntu... 🤷🏻‍♂️
cj
VIM ❤️
🏳️‍🌈Robby [ Private Message = Spam]
Spacemacs has support for Django — use the develop branch: git clone -b develop https://github.com/syl20bnr/spacemacs.git
🏳️‍🌈Robby [ Private Message = Spam]
Suggest editor for django similar to atom
Emacs/ Vim With the LSP server for python running :)
🏳️‍🌈Robby [ Private Message = Spam]
https://github.com/palantir/python-language-server
Yunindyo
Suggest editor for django similar to atom
I think vscode is best choice, but if you familiar with vim, my recommendation is spacevim 😂😂😂
Alexander
Suggest editor for django similar to atom
But IDE for Django-based projects is much better choice)
Michail
I have a weird error - Server Error (500) when trying to add new user `auth/user/add/`…checked all stackoverflow answers, still have no idea. dj version 2.1.7
🏳️‍🌈Robby [ Private Message = Spam]
A 500 error means something is wrong server-side.
🏳️‍🌈Robby [ Private Message = Spam]
Any number of things could cause this — please review http://catb.org/~esr/faqs/smart-questions.html
🏳️‍🌈Robby [ Private Message = Spam]
Why do people ask questions in such a poor way and expect people to be able to help with "My application returns 500 — help me fix it" without telling us ANYTHING useful This is common sense shit
Michail
i just got stuck. forgot about it, you’re right … enabled DEBUG=True
🏳️‍🌈Robby [ Private Message = Spam]
https://www.dontasktoask.com
🏳️‍🌈Robby [ Private Message = Spam]
Satyam read that link. Stop asking meta questions.
🏳️‍🌈Robby [ Private Message = Spam]
I love how people actually provide information. Some of you need to stop spamming your questions everywhere while providing bad information. Review how to ask smart questions — because the way you ask questions isn't going to get you any help, but it will tick people off.
Turtle_In_Hurry
yea okay ill remember it thanks
Anonymous
Hello everyone, In my app I want to check for a certain model instances are present or not. If not create them.. I coudn t figure out how to do that from the docs
Алишер
How to render html tags in Django Admin change_form? Part of my Admin model class TaskAdmin(admin.ModelAdmin): def _passed_dealer_points(self, obj): return '\n'.join([format_html("<a href='#'>{}</a>", i.title) for i in obj.passed_dealer_points.all()]) _passed_dealer_points.allow_tags = True readonly_fields = ('_passed_dealer_points',) admin.site.register(Task, TaskAdmin)
Алишер
In change form it shows me raw html code, but I want rendered view - clickable link
🏳️‍🌈Robby [ Private Message = Spam]
Google is your friend. Use it. You're going to learn a language that does nothing to prevent, and even aids you in shooting your foot off at times. Not a language to bullshit and try to get by with learning the bare minimum.
Алишер
I solved Used format_html_join
Maz
ok ok, got your point. totally agree. maybe you should write a whole book 😂
This group was actually pretty peaceful with calm answers before Ms Toxicity joined up and brought rudeness to the game.😂
Michail
This group was actually pretty peaceful with calm answers before Ms Toxicity joined up and brought rudeness to the game.😂
hope he'll be annoyed with mere mortals asking dumb questions and leave soon 🙈
Anonymous
Using django-extensions graph_models Output graphs have lowest resolution How can I improve quality?
Krishna Praneeth
i have one doubt about
Krishna Praneeth
urls
🏳️‍🌈Robby [ Private Message = Spam]
urls
dontasktoask.com
Krishna Praneeth
dontasktoask.com
what is it?
amit
Getting an error invalif literal for int() with base 10 For code i wrote . md【'id']=md['id'].astype('int')
🏳️‍🌈Robby [ Private Message = Spam]
what is it?
a url to a site explaining how to avoid meta questions
Krishna Praneeth
what happens when we add a path to re_path
Anonymous
An error I guess
Сергей
Hi, for example I have a field title = models.CharField('name', max_length=200, blank=True, null=True, default=None) if I wanna write a data I do obj.title = "data", can I get access to this field by label name?
Krishna Praneeth
?
my urls are adding up
Krishna Praneeth
my urls are adding up
i have path ("http://127.0.0.1:8000/tweet/302/") and if again view it it's getting appended like ("http://127.0.0.1:8000/tweet/302/tweet/302")
Krishna Praneeth
okk