M
sorry i'm forget _self_
Mirco
sorry i'm forget _self_
You are forgetting to tell us the piece of code where this property is
Nitikesh
Defining custom methods on a model to add custom row-level functionality to the objects. What does it mean?
Mirco
Defining custom methods on a model to add custom row-level functionality to the objects. What does it mean?
You can add useful methods to your model that you can use when you use your model instance into your views for example
Nitikesh
So what row level functionality is it depicting of?
Mirco
I don't really know what you mean with row level But that custom methods you can use when you retrieve model instances
Mirco
For example you wanna make some calculations
Nitikesh
Ok got it, row-level functionality means each model instance can have access to the custom method
Nitikesh
Thanks for helping
Mirco
Model is just a class and custom method is a simple method you can use when you have the instance of that class
Nitikesh
Yep got it thankyou
Anonymous
hi guys plz help here
Anonymous
i am building a portfolio site in django, when i run the command python manage.py runserver i get the following error
Anonymous
What error ?
Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\Data Engineer\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner
Anonymous
thsnks
Shaun
Could not find in docs. Anyway to split app/tests.py into multiple test files?
Shaun
I found it - https://realpython.com/testing-in-django-part-1-best-practices-and-examples/#structure
Alo
Hello! Can anyone help me? I have an abstract class ModelWithTimestamps(SoftDeleteModel, models.model) and I have models for example Customer(ModelWithTimestamps). When I run makemigrations, it generates me in order first the fields of ModelWithTimestamps and then those of Customer, how can I specify the order backwards? Current: id deleted_at created_at updated_at project user_id Target: id project user_id created_at updated_at deleted_at
Soekarmana
can anyone give me a suggestion about good calendar library in django? i need the ability to import.ics file and modifying occurrence i've done some research and found django-scheduler, but the documentation is kinda confusing im interested in this library : https://djangopackages.org/packages/p/joyous/ the description says : A calendar application for Wagtail can this library used without wagtail cms? anyone got experience with this library?
setiawan
I want to ask, I have a field problem in the database, I want to do a division where each value field is divided using the max value of the field value, how do I do that? Thank you
Soekarmana
@Inchidi on my own template
inchidi
@Inchidi on my own template
then you dont need "django package" tho, any javascript library for calendar can do
inchidi
for instance: https://fullcalendar.io/docs/initialize-globals
Pandu
Guys I need best UI for signup, signin, contact form any one help?
Junaid Khan
Can anyone tell me how can i make login logout with authentication in django
Junaid Khan
any good blog or tutorial will be more appreciable
Momin
Please can anyone help me. I want to learn django so for learning django what all requirements i will need . I know python and what i need to learn for django . Please help me
Ankit Anand
Any one help me django 3 login signup and handling if user is authenticated then login modal not show in page
Amen
I was thinking of building a blockchain crypto currency system with python on Django framework any insights on what I should watch out for or is it a good Idea to use python
Imgene
Hello !
Imgene
what can I use for process manager django rest
Imgene
like https://pm2.keymetrics.io for NodeJS
Nitish
i am sending image through api and i am printing the serializer.data it is showing the image but not saving in the db please help me
Denys
Hi guys, Has anyone used WebRTC in their projects?
M
Hi guys, Brother, I have an error like this full_clean() missing 1 required positional argument: 'self' https://pastebin.com/pepkc7bu where do you think my mistake is? plans to update the data Thanks 🙏🏻
­
Hi, everybody. Can you tell me how to distribute models across different applications in the admin panel, without creating separate applications? If someone can help write in a personal account, I will explain the problem with screenshots(
­
Hi, everybody. Can you tell me how to distribute models across different applications in the admin panel, without creating separate applications? If someone can help write in a personal account, I will explain the problem with screenshots(
Amen
Yep
But if you’re thinking to implement that on safari then you’re fucked
Vishal
hi guys i have mentioned this on the top of index.html { % load static % } yet it is displays error of " Invalid block tag on line 8: 'static'bootstrap/dist/css/bootstrap.min.css''. Did you forget to register or load this tag? " please can anyone help me??
Amen
It should be {% static ‘bootstrap/dist/css/bootstrap.min.css’ %}
Amen
Don’t surround static with colons
Vishal
It should be {% static ‘bootstrap/dist/css/bootstrap.min.css’ %}
this is what i mentione in index .html the previous was from error page so static was surrounded by 'static' <link type="text/css" rel="stylesheet" href="{% static'bootstrap/dist/css/bootstrap.min.css' %}">
Vishal
Yea
still the error is same
Amen
Maybe space them out and check for typo
Vishal
space has no effect
Vishal
For what extends keyword is used?
Jes
Guys, quick question about serializers. I have 2 models: Sessions (id, client, description) Clients (id, name, data) I want to serialize sessions so they include clients.data: { id: 5, client: { data: “something”, }, description: “desc”, } I can do so by creating a serializer for clients like this: class ClientSerializer(serializers.ModelSerializer): class Meta: model = Client fields = (“data”,) and then use this serializer inside the sessions serializer: class SessionSerializer(..): client = ClientSerializer() class Meta: model = Session fields = “__all__” Works fine but I’m curious if there is a way to do so without using a ClientSerializer? PS: those are DRF serializers
Anonymous
Hello developers, I need a developer who has knowledge about Elasticsearch queries on Django
Shreehari
hey guys, i need to create a field using which i will be able to filter. tags will be array of objects, which model.field should i use for this ? using django-fliters as default in the backend
Rajesh
Can anyone give me route for URL/employee/:empid I tried <str:empid> It's not working
Anonymous
t = tablecol.objects.values_list('col_name','col_ddlist') #t_list = tablecol.objects.values_list('col_list', flat=True) table_structure = [] list_store=[] #tt = Region_List.objects.all() for i in t: if i[1].lower() in tables1: print(i[1]) list_store=i[1].objects.all() c1 = tablecol(i[0], i[1]) table_structure.append(c1) list_store=[]
Anonymous
here I want to fetch data of table which match in tables list
Anonymous
like i[1].objects.all() but it gives error that 'str' object has no attribute 'objects'
Hernan
foo = eval(i[1]) foo.objects...blablablab
Ankit Anand
Tell me first where you stuck.?
Currently am doing login signup by using another template
Ankit Anand
But I want do that by using bootstrap modal if user not authenticate then show popup for login/signup
Nitikesh
Hey guys, I have problem in understanding How saving foreignkey fields work in django
George
I just found this tutorial. I think you will find it usefull, seems good to start if you don't want to read docs https://youtu.be/eCeRC7E8Z7Y
Doragonsureiyā
Hey guys, I have problem in understanding How saving foreignkey fields work in django
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. Include details such as libraries, platforms, modules, etc.