Украинский
i think there isn't any videotutorial about it on udemy or such
You can simply make a seo optimized *abstract* model
Jimmies San
Украинский
😂😂😂😂😂 good joke man
I'm not joking. I used this method, but it is bit complicated.
Jimmies San
I'm not joking. I used this method, but it is bit complicated.
so you bind the presentation layer [how to reach your website, so urls and so on] to the model [domain] ???
Jimmies San
wow , seriously? wow...
Jimmies San
i am speechless
Украинский
so you bind the presentation layer [how to reach your website, so urls and so on] to the model [domain] ???
oh, you talking about global seo optimization of website not a post? Yes it is possible to do global seo with the models. But you will need to create a dashboard where you will manage the site keywords, og's and other stuff... In this case is very and very complicated work, but it's possible.
Random
django seo on google, first page, first 5 links, you are welcome
oh wow, i never thought wan also possible thanks a lot for mindblowing sugession
Random
was*
Jimmies San
you are welcome mate!
Fuad
Hi, I am new in Django, it seems easy issue, but I can't solve. already wrote my question to stackoverflow, but yet get right answer, please help me. https://stackoverflow.com/questions/64592126/how-get-image-from-images-model-to-home-page-in-django
𝔐𝔞𝔥𝔡𝔦 𝔉𝔦𝔯𝔬𝔲𝔷𝔧𝔞𝔥
Hi, I am new in Django, it seems easy issue, but I can't solve. already wrote my question to stackoverflow, but yet get right answer, please help me. https://stackoverflow.com/questions/64592126/how-get-image-from-images-model-to-home-page-in-django
hi, regarding your models, because inside Product_image has a foreign_key field to Product model, so there is no need to query and send images objects of the image model, you could just send a queryset of products objects, to the template then rich the images of each product by doing so: {% for pd in prodycts %} {{ pd.name }} {% for img in pd.product_image_set.all %} <img src="{{ img.url }}"> {% endfor %} {% endfor%} but its recommended to set a related_name when using foreign_key fields
Виктор
Hello, can u help me please? How to filter qs in django admin panel by django model's function. code. https://dpaste.org/KHhN Cant add this filter, because field calculate_score not found.
Виктор
Виктор
im resolve problem
Hola!
Best logic for student teacher 2 users to add in django abstract user with custom fields ...anyone know how to construct the model according to this?
𝔐𝔞𝔥𝔡𝔦 𝔉𝔦𝔯𝔬𝔲𝔷𝔧𝔞𝔥
is custom filter
for displaylist?
Виктор
𝔐𝔞𝔥𝔡𝔦 𝔉𝔦𝔯𝔬𝔲𝔷𝔧𝔞𝔥
yea
list_display = ['user__username', 'calculate_score']
Виктор
list_display = ['user__username', 'calculate_score']
is not working for Model's functions in list_filters
Виктор
list display is ok
𝔐𝔞𝔥𝔡𝔦 𝔉𝔦𝔯𝔬𝔲𝔷𝔧𝔞𝔥
is not working for Model's functions in list_filters
in this case, you could create a function in modelAdmin class to do so
karan
How to deploy Django website on server?
Виктор
in this case, you could create a function in modelAdmin class to do so
yes, in link i try, but after im use new_qs = [x.id for x in queryset if x.calculate_score()] qs.filter(id__in = new_qs)
Украинский
𝔐𝔞𝔥𝔡𝔦 𝔉𝔦𝔯𝔬𝔲𝔷𝔧𝔞𝔥
🇩🇪 kamoloff 🍁
Hi guys, I am working on a video hosting platform and I wonder is there any library to stream video files?
Arezoo
Hi .i wrote drf login method that give toke ...my front is react ...how to ise this token for next steps in browser?
Arezoo
?
#!/bin/sh Inَactive
Hi .i wrote drf login method that give toke ...my front is react ...how to ise this token for next steps in browser?
Next you can use this token to authenticate your requests to the server from your react app when you need to access something in the API
𝔐𝔞𝔥𝔡𝔦 𝔉𝔦𝔯𝔬𝔲𝔷𝔧𝔞𝔥
Hi .i wrote drf login method that give toke ...my front is react ...how to ise this token for next steps in browser?
hi, if you have no problem to check the answer in persian, I could give you a link
Deepak
When I use depth then foreign key field disappear in django rest framework
Deepak
Like depth=1
Deepak
Anyone getting my point?
Deepak
Means when I use depth=1 then foriegn key field from child sterilized model disappear
Shreehari
Hey guys What kind of optimisations can be done to reduce database storage size for a large scale projects with django?
Deepak
Have anyone any idea?
🇩🇪 kamoloff 🍁
You need to include id field in nested serializer
Shreehari
database storage?! And what is your db size?
i mean some kind of techniques for compressing data at database level.
Alex
i mean some kind of techniques for compressing data at database level.
Yeah, I got it. But why do you want to compress your data? Harddrives are cheap in the modern age so I cannot imagine why people would spare them.
Null Boy
When I want save a form in wagtail , this error Showing : {'path': ['This field cannot be blank.'], 'depth': ['This field cannot be null.'], 'title': ['This field cannot be blank.'], 'slug': ['This field cannot be blank.']}
Prasanna
Hey, I am creating a pdf using weasyprint, how do I add an watermark to the pdf pages and download in runtime without storing in database.
Alex
can you please elaborate a bit more.
I'm asking you the same.
Shreehari
I'm asking you the same.
for saving some space in the instance. Sorry if i have misunderstood your question.
Null Boy
please dont pass null/blank data
My models.py : class Order(Page): current_time = timezone.now() first_name = models.CharField(max_length=50, null=True, blank=False) last_name = models.CharField(max_length=50, null=True, blank=False) email = models.EmailField() address = models.CharField(max_length=250, null=True, blank=False) postal_code = models.CharField(max_length=20, null=True, blank=False) city = models.CharField(max_length=100, blank=False) created = models.DateTimeField(auto_now_add=True, blank=False) updated = models.DateTimeField(auto_now=True, blank=False) paid = models.BooleanField(default=False, blank=True, ) And My forms.py : class OrderCreateForm(forms.ModelForm): class Meta: model = Order fields = ['first_name', 'last_name', 'email', 'address', 'postal_code', 'city'] @alkalit
Rohan
I'm using ImageFormSet how to update image field?
Vxvek
Can any one tell me how to arrange the admin page models..because now it's coming in alphabetical order as default.. any one?
Vxvek
????
Rainur
Hello! I need to customize main page of django admin. I have one application called "Course" where i have 17 models. In main page of Admin it looks like usual admin. I need to move from Course app view 5 models to another view like Course app view (called Striming) but not creating this new app.
Rainur
How i can do it?) Please help
Rainur
Thank you!
Anonymous
Pls help me ..I want to learn django rest framework
Anonymous
Give resource s
Doragonsureiyā
Pls help me ..I want to learn django rest framework
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Mirco
or buy Django for APIs book
Anonymous
or buy Django for APIs book
Ok thanks .No video tutorials
Mirco
Ok thanks .No video tutorials
Udemy is full of them, just have a look there
Anonymous
Udemy is full of them, just have a look there
I have not found suitable stuff for django rest framework
Furqan
Use from .Views import *
Dhruv
Hi
Anonymous
How to create only video upload field in django like ImageField
Anonymous
I don't want to use FileField because it's can upload any type of content but I want to upload only video
Anonymous
But I put folder name in upload_to
Anonymous
upload_to='FolderName'
Anonymous
So how I can put this
Omair
I don't want to use FileField because it's can upload any type of content but I want to upload only video
You need to write a custom validator that will check the format/extension of the file being uploaded.
Anonymous
I am making a custom user model but not being able to login through that. Can anyone help