GithubHelp home page GithubHelp logo

Comments (8)

maximlomakin avatar maximlomakin commented on May 27, 2024 1

In my application I need device-session-user schema.

I don't think that renaming of the variable is a good idea. With that we should rename field too. In the end, this will create problems with backward compatibility or clarity. And this problems cannot be resolved within small pull request.

from fcm-django.

xtrinch avatar xtrinch commented on May 27, 2024

I am not sure why exactly is this necessary, you will find in official django docs that changing the auth user model is via AUTH_USER_MODEL settings variable.

from fcm-django.

maximlomakin avatar maximlomakin commented on May 27, 2024

This is necessary if you need to change model to which device's user field refer without changing AUTH_USER_MODEL. I.e to bind the device to non-user model. I think for this we need separate settings variable in the FCM_DJANGO_SETTINGS.

from fcm-django.

xtrinch avatar xtrinch commented on May 27, 2024

Alright, if the point is to point to a non-user model, perhaps we should name the variable differently. Something like DEVICE_FOREIGN_KEY. Although is there a specific reason you need this? I'm just trying to envision why this would be necessary

from fcm-django.

 avatar commented on May 27, 2024

relation "fcm_django_fcmdevice" does not exist
what could be it's reason?

from fcm-django.

salberin avatar salberin commented on May 27, 2024

In my application I need device-session-user schema.

I don't think that renaming of the variable is a good idea. With that we should rename field too. In the end, this will create problems with backward compatibility or clarity. And this problems cannot be resolved within small pull request.

I'm having the exact same problem. For us, this creates a circular dependency between the model and our application: we extend the FCMDevice model, but the user-model on the FCMDevice needs to point to another model in our application. Hence, an circular dependency exists.

from fcm-django.

zt-initech avatar zt-initech commented on May 27, 2024

Everything is fine except that the file migrations/0001_initial.py uses settings.AUTH_USER_MODEL instead of FCM_DJANGO_SETTINGS['USER_MODEL'], so running ./manage.py migrate creates the fcm_django_fcmdevice database table with the wrong foreign key (in case FCM_DJANGO_SETTINGS['USER_MODEL'] is not the same as settings.AUTH_USER_MODEL).

Please fix this.

from fcm-django.

xtrinch avatar xtrinch commented on May 27, 2024

Resolved @ #33

from fcm-django.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.