VOGONS

Common searches


First post, by jedie

User metadata
Rank Newbie
Rank
Newbie

Hi,

i started a open source project to catalog my retro computing stuff. Maybe it's also interesting for you 😉

Source code is here: https://github.com/jedie/PyInventory/

It looks like:

PyInventory v0.1.0 screenshot 1.png
Filename
PyInventory v0.1.0 screenshot 1.png
File size
192.42 KiB
Views
310 views
File license
CC-BY-4.0
PyInventory v0.1.0 screenshot 2.png
Filename
PyInventory v0.1.0 screenshot 2.png
File size
163.15 KiB
Views
310 views
File license
CC-BY-4.0
PyInventory v0.1.0 screenshot 3.png
Filename
PyInventory v0.1.0 screenshot 3.png
File size
93.89 KiB
Views
310 views
File license
CC-BY-4.0

Reply 1 of 7, by jedie

User metadata
Rank Newbie
Rank
Newbie

v0.2.0 is out... changes:

Simplify item change list by nested item
Activate Django-Import/Export
Implement multi user usage
Add Django-dbbackup
Add docker-compose usage

looks like:

PyInventory v0.2.0 screenshot 1.png
Filename
PyInventory v0.2.0 screenshot 1.png
File size
123.45 KiB
Views
296 views
File license
CC-BY-4.0

Reply 2 of 7, by gex85

User metadata
Rank Member
Rank
Member

Wow, that's super cool because I have been thinking of building something very similar myself. I was thinking of doing it with either PHP (codeigniter framework, which I really like) or C# (.NET Blazor framework). I just didn't have the time to start yet 😉

There are a few things that I would add:

EDIT: Nevermind, I should have read the readme in the Github repo first... most of these things are obviously planned or already implemented anyway 😄

1. Possibility to add pictures to each component, should be easy to implement.

2. A functionality to compose systems from the components in the database and showcase them. This might be achieved with your location tag, but I was thinking of something a bit more advanced. It should at least be possible to add photos to a system the same way they could be added to single components, and add some descriptive text, maybe with some formatting like markdown. Just like with the location tag, it would be possible to see which component is built into which system at any time.
As long as you have complete OEM systems like the HP Vectra in the screenshot, it would probably work well enough to list them as a component of type "PC", but most people tend to build their own systems anyway.

3. Maybe have a generic "attachment" functionality for components so you can add drivers etc. (to remove redundancy if you have, lets say, two 440BX boards, attachments could be linked between components, too).

4. Make it multi-user capable and let users decide what to share with others and what to keep private. Of course that would pose some risks in terms of copyright violations etc. etc.

5. Maybe the price you bought an item for, and the source.

Don't get me wrong, I'm not saying you should implement these features - it's just the way I have thought about such a system in the past.

Once I find some time I will have a closer look and try to host it myself. Not experienced with Django at all and my Python knowledge is very basic, but I think I should get it up and running...

👍

1992 - i486DX2-66 // 1997 - P1-233 MMX // 1998 - P2-350 // 2000 - P3-650 // 2001 - Athlon 1400 // 2003 - Athlon XP 3200+ // 2008 - Xeon E5450 // 2015 - Xeon E3-1240v5

Reply 3 of 7, by gex85

User metadata
Rank Member
Rank
Member

One more thought: In case I own quantities n > 1 of a given piece of hardware, let's say a sound card or a CPU, I would have to create n entries in the database and enter all the details n times. Whenever I change a description, I would have to do it n times because otherwise it would get inconsistent.
You could instead introduce a more generic hardware database and something like an ownership relation between a "model" (like an Intel Pentium III 450 MHz, spec-code SL364) and a specific, individually owned component. The models could even be shared across all users and all information that is specific to your individual item, like purchasing date, price, a picture, modifications, etc. could be attached to the ownership relation. That might however require to build up a central, curated list of hardware, which would be very time-consuming for a single individual. Maybe users could send in hardware information (like pull requests in git) that would then be merged into the central hardware list by privileged users (mods/admins).

1992 - i486DX2-66 // 1997 - P1-233 MMX // 1998 - P2-350 // 2000 - P3-650 // 2001 - Athlon 1400 // 2003 - Athlon XP 3200+ // 2008 - Xeon E5450 // 2015 - Xeon E3-1240v5

Reply 4 of 7, by jedie

User metadata
Rank Newbie
Rank
Newbie

There are several updates...

One of the big last one: Now there are a separate section to store Information (incl. images/files/links) independent of items/locations...

Attachments

Reply 5 of 7, by gex85

User metadata
Rank Member
Rank
Member

Good to see that this is still under active development!
I tried to set pyInventory up on my own VPS with Docker in production mode. My config is a bit different because I am using Traefik as a reverse proxy and therefore kicked Caddy out. I managed to get everything up and running (django container starts fine, postgres container too, reverse proxy works, etc.) but I am experiencing an error that I haven't been able to solve yet:
After having everything up and running, I went to the console of the django container and created a super user with ./manage.py createsuperuser. This seemed to work flawlessly and I checked the PostgreSQL database to confirm that the user had been created successfully. However, when I try to log in, I receive an error stating that my user access is disabled due to too many failed login attempts. How can I resolve this? I tried creating a second super user (which also worked, I can see it in the database) but hit the identical problem.
Edit3: I just deleted all entries from the axes_accessattempt table via psql and now logging in also works.

Also, the static content cannot be loaded, I see errors like this on the console:

2021-11-02 11:10:29,538  WARNING ...ackages/django/utils/log.py:224 Not Found: /static/admin/css/responsive.css

This is a bit odd since the /static directory is being mounted correctly and I can access it from the command line within the container.
Edit: The static files not being accessible is probably caused by me switching from Caddy to Traefik. I didn't notice that the static files were served directly by Caddy. Is there a simple way to have these files served by django itself?
Edit2: I resolved this by spinning up a dedicated nginx container for serving the static files, seems to work fine. But I am still not able to log in 🙁

1992 - i486DX2-66 // 1997 - P1-233 MMX // 1998 - P2-350 // 2000 - P3-650 // 2001 - Athlon 1400 // 2003 - Athlon XP 3200+ // 2008 - Xeon E5450 // 2015 - Xeon E3-1240v5

Reply 6 of 7, by jedie

User metadata
Rank Newbie
Rank
Newbie

New version v0.12.0 is available...

Now it's not possible to overwrite a newer item with a older one (e.g.: open the same item in different browser tabs and save the older one)

v0.12.0 update is available via YunoHost: https://install-app.yunohost.org/?app=pyinventory

Reply 7 of 7, by jedie

User metadata
Rank Newbie
Rank
Newbie
gex85 wrote on 2021-11-02, 10:28:

I receive an error stating that my user access is disabled due to too many failed login attempts. How can I resolve this? I tried creating a second super user (which also worked, I can see it in the database) but hit the identical problem.
Edit3: I just deleted all entries from the axes_accessattempt table via psql and now logging in also works.

Login protection comes from upstream project: https://github.com/jazzband/django-axes

There are django manage commands to reset the states, e.g.:

manage.py axes_reset

See also: https://django-axes.readthedocs.io/en/latest/ … ts-and-lockouts

Maybe there is something wrong with your setup and transfer the real IP address to the container?
You can also deactivate django-axes completely (e.g.: set AXES_ENABLED=False in your local settings). But then you didn't have a brute-force login protection 😉
There are a few settings, that you can tweak, see: https://django-axes.readthedocs.io/en/latest/ … figuration.html

There is also a deployment setup using docker-compose, here: https://github.com/jedie/PyInventory/tree/master/deployment (But i didn't use is anymore, so i think i will remove this in the future. Because i use YunoHost)