These are chat archives for django/django

2nd
Jan 2018
glitz20
@glitz20
Jan 02 2018 01:07
Do anyone of here use PyCharm?
I have been receiving weird language and characters while installing it
Screenshot (126).png
Peter Bittner
@bittner
Jan 02 2018 02:16
@sabin20 On Ubuntu the very same version works fine.
Jay Kim (Data Scientist)
@bravekjh
Jan 02 2018 08:08
Hi everyone. I joined this room first time today, nice to meet you all
Deniz Saner
@denizs
Jan 02 2018 11:39
Hey guys! Has anyone worked with the formtools form wizard and specifically managed to add forms at runtime?
mounikeshmintu
@mounikeshmintu
Jan 02 2018 12:33
guys in my ecommerce application i have created a custom model manager using cbv(DetailView)i have filtered my products as featured products but i dont know how to view them in template any kind of help is appreciated
avocadosarelife
@avocadosarelife
Jan 02 2018 16:33

Hi guys! I am having troubles trying to import the BASE_DIR from the settings.py file.
When I type this: from myproject.settings import BASE_DIR it looks fine, but when I run it I get the error:
ImportError: cannot import name 'BASE_DIR'

Why is that? Thanks :)

White Rabbit
@Wahtdb_twitter
Jan 02 2018 21:49
Any ideas why PATCH returns in response correct data which I would like to save but it doesn't save this data in database?
    def patch(self, request, object_id):

        try:
            object = Object.objects.get(id=object_id)
        except Object.DoesNotExist:
            return Response(status=status.HTTP_404_NOT_FOUND)
        serializer = ObjectSerializer(object, data=request.data, partial=True)
        if serializer.is_valid():
            serializer.save()
            return Response(serializer.data)
        return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)