Mohammad
Hi
Suggest a comment app?
Shanks
Anonymous
Charanjit Singh
Upasana
i've a couple of doubts, can i dm someone here related to them?
Charanjit Singh
Upasana you can ask your doubt one by one here in the group
âshîsh
Upasana
cool
Upasana
i'm trying to include a css animation code off the internet in my code, its displaying plain text instead of animation. i've tried various codes and checked w various websites.
Upasana
https://del.dog/styling
Upasana
👆my code
Charanjit Singh
Upsana you have to link your css file also by using static method
Randy
I am having a problem with the model formset. When submitting, I initialize the formset with a queryset, where each form has an id. On the page in the browser, all id's for the instances are also visible. But when receiving in the POST method of the formset, the instances from the forms do not have an id, and when saving (), new instances are created in the database, which should not be.
Here is the view in the github:
https://github.com/alechries/MyHouse24Django/blob/master/MyHome24/apps/admin/views.py#L178
âshîsh
âshîsh
b
hey guys, I'm having problem with storing variable in virtualenvwrapper, I tried searching and stuff but not one example worked for me
Randy
Droll55
Hey. I am trying to integrate auto complete address field in my django app. The problem is that i gave no idea how to do it. I made an API places key, installed django-google-maps. The documentation is very poor, i did everything, but it does not works. Maybe there is someone experienced in that?
Anushka
Hey, guys
If anyone here is interested in learning computer vision, deep learning and machine learning.
Do check out this playlist on YouTube.
It covers the basics first and then move on to some really fun projects, including OCR and OMR.
So if you liked it, you can check it out on the link mentioned below.
https://youtube.com/playlist?list=PLL64AzDOoODnPUhvdsXQdvxyFxWm9UNNT
kichu
Randy
âshîsh
âshîsh
Randy
1. Before rendering the page in the view ID is
2. There is an ID on the page in the browser (in form.instance.id)
3. When the form is saved (submit), a POST request is sent and there is no ID in the received data in the form instances
form:
https://github.com/alechries/MyHouse24Django/blob/master/MyHome24/apps/admin/forms.py#L60
view:
https://github.com/alechries/MyHouse24Django/blob/master/MyHome24/apps/admin/views.py#L178
Dima
class BoardDetailApiView(generics.RetrieveUpdateDestroyAPIView):
serializer_class = BoardSerializer
queryset = Board.objects.all()
def get(self, request, pk, *args, **kwargs):
offset = self.request.query_params.get('offset') or 10
limit = self.request.query_params.get('limit') or 10
offset = int(offset)
limit = int(limit)
start = (offset // limit) - 1
end = (start + 1) * offset
cards = []
serializer = BoardSerializer(Board.objects.get(id=pk))
query = Card.objects.filter(board_id=pk)[start: end].select_related('textcard','progresscard', 'taskscard', 'habitcard')
for i in query:
if hasattr(i, 'textcard'):
cards.append(i.textcard.as_json())
if hasattr(i, 'progresscard'):
cards.append(i.progresscard.as_json())
if hasattr(i, 'taskscard'):
cards.append(i.taskscard.as_json())
if hasattr(i, 'habittask'):
cards.append(i.habittask.as_json())
return Response({ **serializer.data, 'cards': cards })
Hey guys, what i can do with this code, now it is very ugly
Hilariyus
Hi
Hilariyus
Hey amigo's I'm a fresher... Any anyone explain how to use dajngo... I'll hope that you all developera
Charanjit Singh
^o^
When I tried to load my website, it is not loading the static files. I have used this below documentation to implement azure storage account to serve media and static files. Media uploading is working fine. Anyone come across this issue before... https://medium.com/@DawlysD/django-using-azure-blob-storage-to-handle-static-media-assets-from-scratch-90cbbc7d56be
Hilariyus
^o^
Django built-in admin panel is working with its style. Only other CSS and js are not working
Hilariyus
I having some issues while running my django web app
^o^
^o^
Anyone had this issue before?
Василий
Hi everyone, maybe someone came across this problem
Василий
print('\udcfc'.encode('utf8','surrogateescape'))
Василий
print('\udcbd'.encode('utf8','surrogateescape'))
Tushar
Yes exactly!!
Charanjit Singh
If you are using filter and it is working then that means there are more id with same value and filter selects all the Id with same value and when you are using get it should give you error as there is more then one value if you are using get and there is more instance of the same value it returns error instead of data
Charanjit Singh
Do you have same Id for different user as well
Charanjit Singh
Yes correct its not possible I thought you might have not have made id as primary key or must have overided it
Charanjit Singh
Could you send snap of your code to analyse
Charanjit Singh
Right now it is not possible for me
Владислав
Good afternoon everyone. Who can advise the model for mods (files) and articles. I am making a game portal.
Mods and articles are identical in fields, but there are some other fields, for example, a link to a file, the same field only a link to a file # 2, size, version of the mod, author of the mod.
Maybe someone knows how to make one field a link to a file, but so that more links can be placed there, so as not to do url_to_1, url_to_2 in the model
Charanjit Singh
Is filter deleting all the data or a particular instance only
Harish
Filter returns a query set
Get returns an object
Managers are instantiated when you're dealing with querysets
Harish
It will
Harish
But I've had numerous issues with get and override the same to use a filter at the back
And then converting the query set to an object if the length is 1
Randy
I have a problem with id
1. Before rendering the page in the view ID is
2. There is an ID on the page in the browser (in form.instance.id)
3. When the form is saved (submit), a POST request is sent and there is no ID in the received data in the form instances
form:
https://github.com/alechries/MyHouse24Django/blob/master/MyHome24/apps/admin/forms.py#L60
view:
https://github.com/alechries/MyHouse24Django/blob/master/MyHome24/apps/admin/views.py#L194
Enigma
Hi everyone.
in my htmls i have a button that i want to show it (or enable it to click) each hour , can anyone help me with that?
Ankit
Hi
Ankit
Can anyone suggest me when we use celery , where to store mailid whatever we used to send mail. So that next time we will not send mail to rahte id
Javi
life
How to correct insert a value {{ }} to the template?
<img src="{% static 'main/avatars/{{ ch.avatar }}.png' %}"
life
after render I get: /static/main/avatars/%7B%7B%20ch.avatar%20%7D%7D.png
life
This work but I don't know is it a good idea:
{% static 'main/avatars/' as basedir %}
<img src="{{ basedir }}{{ ch.avatar }}.png">
Abeeb
Tukhtamurod
Tukhtamurod
As long as the User object has a delete() method not the filter or get methods, they even cant have that)) it should work. But filter returns list of objects, the vice versa should be working, delete method with get i mean, and also User.objects.filter(pk=id)[0].delete() perfectly works too
Tukhtamurod
If you want to check whether smth is being deleted or not do like that:
user=User.objects.get(pk=id)
print(user.delete())
It should return the deleted model with its fields in dic format @NuIllII
Ashutosh
A doubt
Class Based views
Or function based views.
.??
Ashutosh
And
How much db-query for
1) User.objects.all()
2) User.objects.all(
).prefetch_related('orders')
????
Harish
Enigma
JS
The time is diffrent for each user for example user 1 is 10:12 and user 2 is 10:59
Is it possible by js?
Enigma
Tukhtamurod
A doubt
Class Based views
Or function based views.
.??
Depends on you, function based views are good for new learners since all the work you have to do yourself, completely customizable, later you can migrate to class based views since they offer a lot out of the box, that makes developers work easier and robust
Tukhtamurod
Enigma
Is it a multiplayer game?
No its a shopping site but with free bounce cashes
The user can have free mony only once in a hour by watching ads
Enigma
Enigma
Tukhtamurod
꧁❦ I'm Farooq ❦꧂
Can any one help me to get idea about realtime environment