revsys / django-tos

A small app to ensure your users re-agree to Terms of Service changes
BSD 3-Clause "New" or "Revised" License
153 stars 42 forks source link

Where am I supposed to add the Option 2 - point 5? #42

Closed goromachine closed 4 years ago

goromachine commented 4 years ago

I already installed the last version (0.8.1) and started making the Option 2 Configuration because of Django Allauth.

After adding the apps, the urls and the middleware class (point 1,2,4) I made a python manage.py makemigrations and python manage.py migrate to create the tables on the DB.

If I try to enter the server I'm getting an error about not having any TOS yet, and so to add that I need to add the point 5 in which I should add the exception for staff and superusers in order to enter django-admin and populate it.

But I don't understand where am I supposed to add that file, and I imagine I should add the point 3 with the specific cache for that...

Could you please guide me on where to add that file on my project? Also if possible, a backend and location for cache that will to work on AWS elasticbeanstalk. I never worked with caches and so I would appreciate a lot a little guidance here too.

Thank you very much.

nicholasserra commented 4 years ago

Sounds like you need to add a TermsOfService object to the database. If you need to add exceptions for admins, section 5 shows how to add it to the app config for one of your django apps. It will be your apps.py for whichever app you want.

AWS has ElastiCache for caches. That setup is independent of any configuration for this library.

goromachine commented 4 years ago

Yes! I need to add an object and for that what I did locally was disable the middleware, add the object and then add it again. Now I'm going to try to add the point 5 to the apps.py as you said. Thank you.

I'm going to try the ElastiCache too.

Edit: It works fine, I had a problem but it was on my settings.py so everything is working now. Thank you very much!