The Django administration site comes with a couple of default entries, depending on which apps and middleware is installed.
Usually there is at least "Users" and "Groups", and if the quite common "allauth" is installed, then there is also "Site", "SocialApp", "SocialAccount", and "SocialToken". They are not always necessary, especially when no Social Login is used. Or why have the "Site" administration when only Site=1 is used?
With a few tricks these can be removed from the admin menu.
Continue reading "Django: Remove default entries from admin menu"
The Huginn software is not only good for monitoring Twitter feeds, it can also be used to monitor websites for changes.
That's actually easy and needs only two agents:
Continue reading "Huginn: Monitor changes in websites"
The Django Web Framework makes it quite easy to add new referenced objects in the admin menu.
Let's say the model has two foreign keys in it:
class TeamMember(models.Model):
team = models.ForeignKey(Team, on_delete=models.CASCADE, verbose_name=_("Team"))
user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, verbose_name=_("User"))
And the admin form:
class TeamMemberForm(forms.ModelForm):
class Meta:
model = TeamMember
class CustomTeamMemberAdmin(admin.ModelAdmin):
form = TeamMemberForm
add_form = TeamMemberForm
model = TeamMember
fieldsets = [
(None, {'fields': ['team', 'user']}),
]
admin.site.register(TeamMember, CustomTeamMemberAdmin)
Then Django will show small a small green "
" sign next to the fields:

Continue reading "Django: disable inline option to add new referenced objects"
Vor einer Weile standen wir vor dem Problem dass wir ein neues Auto brauchen.
Zu den Gründen warum wir dann doch ab und zu ein Auto brauchen, und warum es kein Elektroauto geworden ist, steht mehr am Ende des Artikels.
Nachdem feststand, dass wir ein neues Auto brauchen, haben wir eine Weile gesucht, Probe gefahren, Autohäuser besucht ect. Manches hat uns nicht gefallen, bei manchen Autohäusern sind wir auf unfreundliche Verkäufer gestoßen, manche haben sich nie wieder gemeldet. Der größte Teil war jedoch in Ordnung. Letztendlich hatten wir eine Liste von drei verschiedenen Angeboten, und haben uns dann für einen Golf 8 (Modell 2021, in schwarz, ganz wichtig, mit Schiebedach, auch ganz wichtig) entschieden.
Der Golf ist ein grundsolides Auto. Verarbeitung und Aufbau sind in Ordnung. Man merkt dem 8er aber an, dass Volkswagen krampfhaft versucht das Auto “online” zu bringen und mit digitaler Technik voll zu packen. Hier sind meine Beobachtungen nachdem das Auto jetzt eine Weile hier ist.
Continue reading "Volkswagen Golf 8"
This posting is mainly a reference for myself, because I was looking for this specific issue a couple times.
OpenStreetMap (OSM) is a map of the world, created by anyone who wants to contribute. It so happens that data might be missing (just go and add it, if you see that something is not on the map). It also happens that someone adds too much data.
In my case someone added "Wikidata" entries to each and every footpath.The OSM folks in Berlin made a great effort to find the etymology of names, and add them to Wikidata. And then link the street names to the Wikidata entries. That's nice and very useful, but it's enough to do that for streets. Not for every path, including the underground parking.
I raised this in the Berlin Telegram channel, and we agreed that it's best to keep the etymology tags to the main streets. Now I had to find all the entries which were tagged with a Wikidata entry, and update most of them.
Continue reading "Search objects based on a specific criteria (Key:name:etymology) in JOSM"