These are chat archives for django/django

8th
Oct 2018
Luke-VideoLibre
@LukeVideo
Oct 08 2018 10:15
@MilanRgm Did you declare Company as a django object for graphene to handle it ? You can't use django models directly in a mutation you must declare it's type to graphene.
I use a project with a Document model that i use to build a graphene object type as so in my schema.
class DocumentNode(DjangoObjectType):
    status = Statut()

    class Meta:
        model = Document
        filter_fields = {
            'name': ['exact'],
            ...
        }
        interfaces = (relay.Node, )
arpit anand
@mjarpitanand
Oct 08 2018 15:12
q = SomeModel.objects.all()
for qi in q:
         qi.<I want to pass a variable name here>
Any one please help??
arpit anand
@mjarpitanand
Oct 08 2018 16:13
this variable name will be having THE ATTRIBUTE
AlejandroMendez
@AlejandroMendez
Oct 08 2018 17:52
Hello, anybody with knowledge about django-import-export? i only need to know a way to use the validations of the model related
Paymahn Moghadasian
@paymog
Oct 08 2018 23:27

Anyone know how to get more log information from 400 requests when using django without setting DEBUG to True? The following log config doesn't seem to be working for me:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler',
        },
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'level': 'DEBUG'
        },
        'django.request': {
            'handlers': ['console'],
            'level': 'DEBUG'
        },
    },
}

I'm using graphene to get graphql with django if it matters.