You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A valid Django request object is get_real_ip()'s requirement. Best is to get the user's IP address in the very first request and store it in user's session or DB. Then you can use it wherever you want.
StackOverflow is the right place for usage & how-to questions.
I have a model in my project without view which creates a new associated record on
post_save
of parent model.I used
Since this does not require any view. I want to use
get_real_ip(request)
in the modelpre_save
receiver as shown above.But this is returning error
The text was updated successfully, but these errors were encountered: