Site Tools


onny:notizen:programmierung

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
onny:notizen:programmierung [2026/08/18 11:23] – [mariadb / mysql] fdc9:281f:4d7:9ee9::1onny:notizen:programmierung [2026/10/06 19:56] (current) – [php] fdc9:281f:4d7:9ee9::1
Line 676: Line 676:
 <code php> <code php>
 if ($config['listCalendars'] ?? false) { if ($config['listCalendars'] ?? false) {
 +</code>
 +
 +check if string in array
 +
 +<code php>
 +if (in_array('trashbin', $config['match'], true)) {
 +    // trashbin was requested
 +}
 </code> </code>
 ==== nextcloud app dev ==== ==== nextcloud app dev ====
Line 939: Line 947:
   AND (`componenttype` = 'VEVENT')   AND (`componenttype` = 'VEVENT')
 ORDER BY `lastoccurence` DESC; ORDER BY `lastoccurence` DESC;
 +</code>
 +
 +==== django ====
 +
 +admin, searchable dropdown. plan field will be searchable.
 +
 +<code python>
 +class GovernmentPlanUpdateAdmin(admin.ModelAdmin):
 +    [...]
 +    autocomplete_fields = ["plan"]
 +    
 +[...]
 +
 +class GovernmentPlanAdmin(admin.ModelAdmin):
 +    form = GovernmentPlanForm
 +    [...]
 +    search_fields = ("title",)
 +</code>
 +
 +===== nix =====
 +
 +====== lib ======
 +
 +remove prefix
 +
 +<code nix>
 +stripped =
 +  lib.removePrefix "www."
 +    (lib.removePrefix "https://" url);
 </code> </code>
onny/notizen/programmierung.1787052238.txt.gz · Last modified: by fdc9:281f:4d7:9ee9::1