Refactor: Rename models to singular form and fix admin registration#643
Conversation
|
@mlodic can you take a look |
|
Please fix the formatting @srijan2607 |
|
@regulartim can you run the workflow once again ? |
|
First of all, thanks for your work! :) Two things:
|
|
Hi, @regulartim and thanks for the review! On your questions: Why this is a breaking change Config improvement (logging path) I’ll revert the settings.py changes on this branch and push an update to the PR. I’ll also open the follow-up issue unless you’d prefer to create it yourself. |
|
@regulartim |
|
@regulartim what is the best way to get in touch with you have some questions |
I suggest the honeynet slack: https://gsoc-slack.honeynet.org/ |
Ok, then we just have different definitions of what is a breaking change and what is not (I'm not saying you're wrong). What's important to me right now is: if we merge your code and build a release, will updating my GreadyBear instance cause it to stop working? I think not. Do you agree? |
|
Make sense @regulartim it wont effect the working of the GreadyBear will keep this terminology in mind. |
|
I am not sure if my terminology is correct though. But for the purpose of this PR, this is was matters to me. |
Description
This pull request introduces a set of database model renames to improve naming consistency and clarity across the codebase. The models
MassScanners,Sensors, andWhatsMyIPhave been renamed toMassScanner,Sensor, andWhatsMyIPDomainrespectively. All references throughout the application, admin interface, cronjobs, and tests have been updated accordingly. Additionally, a new migration is included to apply these changes to the database schema and indexes, and a minor improvement was made to the logging directory configuration.Model Renaming and Migration:
MassScanners→MassScanner,Sensors→Sensor,WhatsMyIP→WhatsMyIPDomainingreedybear/models.py, and updated all usages throughout the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]0023_rename_massscanners_massscanner_and_more.pyto rename the models and associated indexes, and to update theStatisticsmodel'sviewfield choices.Configuration Improvement:
DJANGO_LOG_DIRECTORYsetting now reads from the environment variable if set, with a default fallback, improving deployment flexibility.Renamed Django models from plural to singular names to fix double-pluralization in the admin interface (e.g., "Sensorss").
Specific changes:
MassScanners->MassScannerSensors->SensorWhatsMyIP->WhatsMyIPDomainUpdated all references in code (
models.py,admin.py, cronjobs) and generated migrations.Related issues
Closes #638
Type of change
Checklist
develop.Black,Flake,Isort) gave 0 errors.