CiviWiki/OpenCiviWiki

Register admin for remaining models

brylie opened this issue · 20 comments

We haven't registered all project models with the Django Admin, making it difficult to manage content in a centralized manner.

Task

For each model in our project,

  • register the model with the Django Admin, if not already registered

Instructions

Start by reading the following guides.

The only files that should be changed are admin.py in each app. Look in the models.py for each app and compare it with the admin.py in the same app. Find any models that have not been registered in admin.py and add them.

Resources

Hi! I could take on this issue during the weekend if that's okay 😊

Thanks, @aitorres! 😃

Hi , want to work to this issue

Hi @coderrohanpahwa, since @aitorres has been assigned to this task, do you want to look at other issues in the project to contribute?

Yes , I want to contribute in the project

Hi can I contribute in this issue?

Thank you, @coderrohanpahwa and @PrakharMundra, for offering to take this issue. Currently, @aitorres is assigned to the task. Let's give @aitorres some more time to work on the issue.

Hi,
Is the work finished?
Can I take it if it is still available?

@aitorres, can you give us a status update? Should we re-assign this issue?

Hi @brylie, so sorry for the delay. I had a personal / family situation this week and will be unable to complete the change :-( I'm unassigning myself from the issue. Again, so sorry for the radio silence and thanks for the opportunity 🙏

Hello @brylie if this issue is still open I'll love to be assigned to it. Thank you!

@aitorres, all good. I hope things are alright for you and your family.

@TimOsahenru, thank you for your offer to help. I'll assign you to the task.

Thank you 🙏

Hello @brylie I've successfully solved this issue (I guess), but I'm experiencing a bit of a challenge committing my changes(I'm new to open source) below is the error message when I try to commit changes

pyproject.toml:1: error: Error importing plugin "mypy_django_plugin.main": No module named 'mypy_django_plugin'
Found 1 error in 1 file (errors prevented further checking)

Hm. I think I encountered that issue before, also.

For now, let's just run ´poetry remove mypy´ and also remove the related django stubs ´poetry remove django-stubs´ package.

Delete the following lines from ´pyproject.toml´after uninstalling ´mypy´ and ´django-stubs´.

# delete these from pyproject.toml
[tool.mypy]
plugins = ["mypy_django_plugin.main"]

[tool.django-stubs]
django_settings_module = "myproject.settings"
´´´

Hello @brylie thanks for the tip it worked, I've successfully committed changes and made a pull request... I'll be waiting for a feedback from you.

@TimOsahenru, I've added some instructions in the issue description.

@PrakharMundra, would you like to work with @TimOsahenru on this issue?

Hello @brylie @PrakharMundra I'm having issues with committing my changes I have modified the pyproject.toml file but I'm still getting an error message

project\common\utils.py:3: error: Library stubs not installed for "requests" (or incompatible with Python 3.10)
project\common\utils.py:3: note: Hint: "python3 -m pip install types-requests"
project\common\utils.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
project\common\utils.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)

I initially reached about this issue somedays ago but got not response from you.

@TimOsahenru, we have removed the mypy and django-stubs dependencies from this project in PR #1441. If you are getting errors related to mypy or django-stubs, your development branch is likely out of date. Make sure you are working from the latest development branch.