ContactUs is a Django application designed to provide administrators with control over user contact permissions. Admins can manage which users are allowed to reach out, and can block users based on their IP address or email address.
- Admin Control: Allows administrators to manage user contact permissions.
- IP Address Blocking: Admins can block users based on their IP addresses.
- Email Blocking: Admins can block users based on their email addresses.
- Easy integration into existing Django projects.
-
Clone the repository:
git clone https://github.com/me-sarvar/contactUs cd contactUs -
Install the app:
pip install -r requirements.txt # if you have requirements.txt file, if not skip this step -
Add
contactusto yourINSTALLED_APPSinsettings.py:INSTALLED_APPS = [ # ... other apps 'contactus', ]
-
Run migrations:
python manage.py migrate
-
Create a superuser (if you haven't already):
python manage.py createsuperuser
-
Access the Django admin panel:
Navigate to
/admin/in your browser and log in with your superuser credentials. -
Manage contact permissions:
In the admin panel, you'll find the "ContactUs" section. Here you can:
- Add or remove users from the allowed contact list.
- Add IP addresses to the blocked list.
- Add email addresses to the blocked list.
- AllowedUser: Stores users who are allowed to contact.
- BlockedIP: Stores IP addresses that are blocked.
- BlockedEmail: Stores email addresses that are blocked.
Contributions are welcome! If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.