These are chat archives for django/django

26th
Jun 2017
John
@flyboy1565
Jun 26 2017 00:12
also anyone know why I am getting a CORS error when trying to use axio to hit my REST API
Anish Shrestha
@annshress
Jun 26 2017 03:25
CORS error obviously occurs because you are probably running two different servers. Play around with corsheaders in you django settings
lookup_field - The model field that should be used to for performing object lookup of individual model instances. Defaults to 'pk'. Note that when using hyperlinked APIs you'll need to ensure that both the API views and the serializer classes set the lookup fields if you need to use a custom value.
John
@flyboy1565
Jun 26 2017 03:35
ya, i fixed the CORS with a the CORS app that someone else built. So now i'm just stuck with the URL/View issue
John
@flyboy1565
Jun 26 2017 04:43

one problem fixed... on to the next one.. getting an error

Exception Type: AssertionError at /api/phones/2942/
Exception Value: Expected view PhoneBillingDetailAPIView to be called with a URL keyword argument named "store.store_number". Fix your URL conf, or set the `.lookup_field` attribute on the view correctly.

don't know how to use link the OneToOneField

Anish Shrestha
@annshress
Jun 26 2017 05:46
Good for you
never used hyperlinkedmodelserializer before ...
John
@flyboy1565
Jun 26 2017 07:31
me neither, just used the hyperlinkedfield
Shashank Parekh
@sp1rs
Jun 26 2017 10:58
Moving from django 1.8 to 1.11 ? Need some advice . And also why .render() takes dict as args instead of context.
?
João Ricardo Lhullier Lugão
@jlugao
Jun 26 2017 12:48
hey guys has anyone here used model_utils' SoftDeletableModel ??
Miracle Ayodele
@iammiracle
Jun 26 2017 20:37
hi guys, what is the best method for registration when you have more than one type of user
i created a app for individual user and created another for agent users, slightly different informations
i dont know if that's the best practice or i an make this more professional
Shashank Parekh
@sp1rs
Jun 26 2017 20:41
In my case is use is_staff, in User model to differentiate normal user and agent user
Not sure if creating 2 different table makes any difference
John
@flyboy1565
Jun 26 2017 23:16
I'm looking for someone with Django Channels experience that might be able to help me with understanding how to set things up.