SantiU
what cheap hosting do you recommend?
Un
Best one you read ?
Un
Django for Beginners by William Vincent
Do you have free copy for it ??
Mirco
Do you have free copy for it ??
Nope, you have to buy it
Mahmoud Orabi
Why, when I am working on a project, I turn off the laptop, and then continue later, the project does not respond to the modifications of the css codes
Kehje
Hello friends Please tell me what is better to use for caching. I am writing content aggregator on Django, there will be a tape with a selection of posts on different topics. After all, it is not right every time to receive data for the tape, it must be saved
Tejas
Why do we need lookup_url_kwarg anyone would like to explain
Mahmoud Orabi
I don't get.
How do I clean the cache
Ogundare
How do I clean the cache
Ctrl + shift + del
Kene
Why do we need lookup_url_kwarg anyone would like to explain
If you're extending a view that retrieves an object. Basically telling the view to pick the value in the url and use it in your query
Tejas
My understanding is that if we want to rename the url field we can use from url_kwarg to set it
Alexey
good afternoon help pliz you need to make Django friends with Kerberos and apache2
mod_auth_kerb for apache + django.contrib.auth.backends.RemoteUserBackend for Django
Niko
Hi guys, does anyone know how to crop a photo in django using Pillow while the file is in InMemoryUploadFile? I will transform it into a Pillow, but it is not recognized if use crop()
😎😎
Anyone plzz help me in django application...i have all the codes but don't how to deploy it
😎😎
Plzz anyone...my intervis day after tomorrow
😎😎
My project is advertisement Classification-deploy on Google app engine
Smile
hi ! I do a search on the project and get data using input name = "q" in html form with self.request.GET.get('q') but after press "search" all data disappears from the form. how to leave data in form after search ? ( still fill form) Solved: html form has attr "value". Can fill it using user input.
😎😎
I have to do the screen sharing and take help
Charly
I have to do the screen sharing and take help
No, ask your doubts here do not request DMs
Yaroslav
Hi guys!I have got a problem.Media url is returned not full. /media/songs/wallhaven-136m9w.png
Yaroslav
How can i solve it?
Sukhmanjeet
Unable to resolve "from PIL import Image" even though Pillow is installed
Daniel
guys, how do I get an id? i did this: parent=Post.objects.only("id").get(id=self.kwargs["id"]) print(parent)#it gives me the description of the post print(parent.id)#it gives me the id but when I submit it... Cannot assign "UUID('123456789')": "Post.parent" must be a "Post" instance.
Naggafin
seems like a relation issue to me based on the error message
Naggafin
in any case you should be using values() in your query: .filter(id=<your id>).values('id', flat=True)[0]
Daniel
can you be more specific by "when I submit it"?
form.instance.parent=parent.id I want to give post's id to the repost
Naggafin
form.instance.parent=parent.id I want to give post's id to the repost
I'm still not entirely sure what you're trying to do. do you have a foreign key relationship and you're trying to set post as a related model or something?
Naggafin
and the way you're trying to set it is by directly assigning the foreign object's primary key value? is that why you're getting its id?
Naggafin
when managing relations, typically you don't want to work with primary keys directly if you can avoid it. it's better to use something like add(). example. say you've got a model called Post. it has a foreign key field pointing to another model called Content. if you wanted to add a specific Content to a specific Post, this is how you'd do it: post = Post.objects.get(...) content = Content.objects.get(...) # this way post.content = content post.save() # or this way content.posts.add(post)
Naggafin
the first way is setting the related field's value. the second way is setting the reverse relation's value which propagates back to the 'parent' object in question
Naggafin
well that should still be simple enough
Naggafin
you could for example do the following: post = Post.objects.get(...) repost = Post.objects.get(...) parent_post = Post.objects.get(...) post.repost = repost post.parent = parent_post post.save()
Emmanuel
Please how can I create an invoice with Django
noob
Hi guys I have a post model like this class Post(models.Model): ........ Likes=models.ManyToManyField(User) I want to add one more field to my query set which is "isliked" Which tell about is logged in user like the post or not Can anyone help
.
Hi guys I have a post model like this class Post(models.Model): ........ Likes=models.ManyToManyField(User) I want to add one more field to my query set which is "isliked" Which tell about is logged in user like the post or not Can anyone help
If the isliked or not property something that can be just for display in a page template, you can use a custom tag for this. Perhaps something like this in template {{ post|isliked:request.user }} And like this in custom_tags.py def isliked(post, user): Check if user is in post.liked
Anonymous
what are django's architectures? is microservice an architecture?
Kapil
Subscribe to Eco to scale your dynos. why this error come
Kapil
i used heroku
Kapil
this command used "heroku run bash "
𝙰𝚜𝚑𝚠𝚒𝚗
Subscribe to Eco to scale your dynos. why this error come
Heroku isn't free anymore, you have to buy dynos.
Emmanuel
Help a Dev
Charly
Help a Dev
Impossible to help without specific detailed questions
Jj
Impossible to help without specific detailed questions
Hi guys 👋, I'm new to python Django nd I wanted to ask if learning python Django is possible on mobile?
Jj
Help a Dev..
Jj
I'm new to python Django nd I wanted to ask if learning python Django is possible on mobile?
Emmanuel
Impossible to help without specific detailed questions
I am trying to generate an invoice with Django
Doragonsureiyā
I am trying to generate an invoice with Django
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
İremsultan
hey guys i was trying to add a user sign up page to my page and it works just it does not redirect me to home page and it does not give me warnings when passwords do not match. can anyone fix it if i send you the files?
İremsultan
how can i see my main page's view name
Samyak
I created a signup page, if the user is logged in and i close the tab.. and again i open login page, i dont want user to again put username and password and i want user to redirect to profile page.. how can i do that?
Boat
how can i see my main page's view name
return redirect("home page url name")
Samyak
Sessions
Can u please send me the code for similar condition
𝙰𝚜𝚑𝚠𝚒𝚗
how can i see my main page's view name
Go to urls.py file in urlpatters find this ('/') pattern and assign name="homePage" attribute to it
Smile
Hi Is a good practice to realise search for all project in file utils.py/search.py? Or what a better way ?
Adilet
hi guys, i have json column in my model, inside of json body i have underscored field, something like {"__myfield": 1}, how can i filter it? MyModel.objects.filter(data____myfield=1) does not work
Adilet
is there any way to get it worked? maybe escaping somehow