Email or username:

Password:

Forgot your password?
352 posts total
Nikita

#Heroku is shutting down their free Dynos and #Postgres offering. I find it sad, since now there is one place less for beginners to host their #Django projects for free. More reasons to migrate to React SPA garbage.

The email, where they’ve told me this, got sent twice. It didn’t specify, whether I’ve had any free Dynos, which made me log in. I guess my password was incorrect, but instead of telling me this, the website said “There was a problem with your login”. Could you elaborate? Ugh.

Nikita

After resetting my password, I was able to log in. I have had, in fact, some free Dynos (all asleep for ages). Deleted them and my account as well. Minus one personal data location to worry about :)

Nikita

I hate having too many tabs open. More than 5–7, and I find it too cluttered already. But when I have to have too many tabs open (exam session woo-hoo), the Tree Style Tab extension is a frickin' lifesaver. Why didn’t I try it sooner?!

Garrit 🏡🛠️

@kytta I keep trying to love this extension, but for some reason I always neglect it. It just doesn't feel well integrated, so my brain only sees an annoying banner on the side of my browser. I should give it a couple more shots, maybe then it finally sticks.

Nikita

Saw this on one support website. If you have to write your date format after your date, you’ve failed.

Use the unambiguous ISO format (2022-08-15) or spell out the month (Aug 15 2022 or 15 Aug 2022)

Nikita

Oh, and by the way, this screenshot is from when a website team confirmed they started working on my account deletion.

It’s been five days, and they’re still on it. Might be a very complicated SQL query…

Dušan 🇷🇸 :arch: ⚛️

@kytta I never understood why the day is after the month. Maybe it caters well to the English pronunciation, August 15th 2022, but at that point just write it like that in the first place.

Nikita

After almost a year of preparations, I have finally done it: I have planted the first seed of my digital garden ✨

sona.kytta.dev/

It runs on Mycorrhiza [1], a wonderful wiki engine by @bouncepaw

Right now there are some jots about software development, but I plan to expand it with basically everything I’m passionate about…

…which is basically software development 😂

[1]: mycorrhiza.wiki/

#moa

[DATA EXPUNGED]
[DATA EXPUNGED]
Nikita

Did anyone try #OpenBSD (and/or #FreeBSD, #NetBSD, etc.) as the main OS for a #RaspberryPi? I have a Model 3B+ and I wonder, whether it works smoother than Debian/Ubuntu. And, if you tried BSD on your Pi, which distro have you found works best?

jbz

@kytta hi,
I did use openbsd on my pi3 as a server. Worked very well, no issues except the slowness of the OS. I saw (after replacing i with Debian) that the cpu freq could be tuned up...

I then have to find the time to reinstall it.

PS: I have Openbsd running on a pi400 as my desktop OS. No hardware acceleration, no graphic drivers except simple framebuffer but it does the thing for what I do (web, music, writing).

David de Groot 𓆉

@kytta @RussSharek I ran an OpenBSD pi for a while. It worked, and was stable, but iirc a little tricky to get set up initially.

Ludovic Hirlimann

@kytta I tried FreeBSD, was running a tor bridge on it. Quite happy with it.

Nikita

Is there a good (preferably FOSS) per-app network speed limiter for #macOS? Something where I can say ‘Process X may only use 1 Mbps’?

softwareupdated just loves downloading the latest Monterey installer every week, which eats up the bandwidth of my whole network 😠

fatboy :unverified: :mxlinux:

@kytta From what I understand of Apple, is that they're very much against any backend tweaks. As far as browser engine and dns server. So I doubt it, via extrapolation

Blueberry

@kytta not that I know of, but for that problem specifically maybe you can turn off automatic updates

Nikita

Needed to implement a quick draft of a website, which basically pulls data from an API and displays it neatly on the page. For some reason, I decided to make it a #JavaScript SPA. Immediately regretted it due to no built-in parsing of dates and 0-indexed months 🙄

Rewriting it as a thin client with a lightweight #Python (or #Go, I haven’t decided yet) back-end. Good morning! :blobcatgooglycofecup:

Nikita

For those, who wonder: No, my SPA is not a thin client, it can be thinner! The API accepts date as parameter, and I want for the client users to ba able to put the desired date as a query parameter. Such a pain in the butt to do this in JS, so my website will be static — even better.

Nikita

Woke up, wanted to react to #GitLab removing one-year-old repositories, but they already U-turned on it. That was quick :D

Nikita

SSH commit signing has been around for over 7 months now, but GitHub is still behind on that feature (unlike @gitea and thus @codeberg)

Yet another reason to #GiveUpGitHub

Nikita

#Django devs, I need your help!

Is there a way to display a model object’s data in a ModelForm as an uneditable field?

Use case: User A submits an order for User B to execute. On creation time, User A can choose an executor. User B can edit the order submitted to him, but can’t edit the ‘executor’ field any more. I do still want to show it in the HTML form, though.

Is there a way to cleanly implement it with ModelForm?

Plz boost because I’ve been sitting at this for two hours now 😩

Show previous comments
Brian :fedora: :python:

@kytta If I understand your problem correctly, you could inject arbitrary HTML key value pairs via the widget attrs property in the ModelForm or add a conditional check that if an order exists in the form template disable the widget? Sorta like this:

{% if obj %}
<fieldset disabled><div class="control">{{ field }}</div></fieldset>
{% else %}
<div class="control">{{ field }}</div>
{% endif %}

Anthony Sorace

@kytta @ru (I have not done this particular case myself, but…) You can define attrs on a widget; I *think* this is just a question of setting the “readonly” attr on the one in question. Note that you’ll likely want to validate that field server side on submission to guard against folks editing the html directly.

Nikita

For all interested, here's how I solved it:

1. I defined the "executor" <input> as disabled and readonly
2. I made the "executor" field in the form not required
3. I also put self.object.executor inside form.initial on form render
4. On form_save(), I replace form.instance.executor with values from form.initial

May be hacky, but seems pretty bulletproof to me. And the code is pretty clean!

Thanks to @ru, @bpepple, and @a for helpful tips! ✨

For all interested, here's how I solved it:

1. I defined the "executor" <input> as disabled and readonly
2. I made the "executor" field in the form not required
3. I also put self.object.executor inside form.initial on form render
4. On form_save(), I replace form.instance.executor with values from form.initial

Nikita

I would never imagine that picking apart old #legacy code would be a fun activity for me. But now, having replaced 30+ lines of unprofessionally written jQuery mess with two lines of backend Python code, I feel so euphoric. Took me an hour to even get the sense behind it, but it’s rewarding. I guess I definitely chose the right profession 😄

Finner

@kytta my primary function in my day job is reading and understanding old messy programming in sometimes obsolete controls systems and reprogramming those functions in newer controls systems using modern standards. I really enjoy it, so I know what you mean. It can be fun and quite satisfying.

Nikita

Me: *run a single MariaDB container*
Container: *requires no more than 100 MB of memory*

Docker: *eats 4GB*

I hate Docker Desktop so much :blobcatangery:

Nikita

Quite sad that this is the first time in my life that I've encountered a website that actually does respect DNT 😕

rugk

@kytta still stupid it anyway shows a popup. But BTW I heard #geizhals does that too.

Григорий Клюшников

Medium also respects it somewhat. They'll track the crap out of you themselves, but won't show youtube embeds to "protect your privacy" 🤡

Nikita

When developing a web app locally, which credentials do you use for testing?

Anonymous poll

Poll

user[name]/pass[word]
2
22.2%
admin/admin
5
55.6%
root/toor
1
11.1%
other (reply)
1
11.1%
9 people voted.
Voting ended 23 Jun 2022 at 15:07.
Nikita

TIL that the HTML attribute ‘bgcolor’ with the value ‘crap’ produces a brown-ish background on the element. There is a bizarre algorithm behind it, which is shipped with every browser because of, you guessed it, compatibility with Netscape Navigator.

stackoverflow.com/questions/83

Nikita

#AskFedi iPhone users:
A friend of mine got herself an iPhone 13 and thinks about getting a protective glass for the camera. Anyone here who can recommend or advise against it? Is there a need for one, does it peel off nicely, do the photos look different?

P. S. Please no "apple bad" replies :D

Benjamin Hollon 🇺🇸🇲🇾🇮🇳🇦🇫

@kytta It's been pretty good for me; I've gone through two of them in the last year and a half.

birnim

@kytta Ok, no "apple bad". What about "apple overpriced"? 😂

Ruud

@kytta The glass on the camera's is very strong. I've never used protective glass on it, never seen a scratch.

Nikita

I don't know why, but I really like the peaceful and cozy vibes of this picture 😌

Nikita

Hey Fedi, do you know if there is a federated (perhaps even #ActivityPub-powered) cooking recipe hosting service? If not, let's 👏 make 👏 this 👏 happen!

I hate modern recipe websites. All of them are full with ads and tracking. The leading recipe hosting in my country loads over 30 different trackers, and that's excluding the ads!

Show previous comments
rich

@kytta hmm, recipe sharing was the original intent of the gnutella network if I remember correctly

DELETED

@kytta In French, there's cuisine-libre.org/ which is quite good.

I know there's a Nextcloud app for that: apps.nextcloud.com/apps/cookbo

But it is not federated.

Nikita

A hundred replies later, here’s what I gathered:

— people seem to like the idea :D
— there are other projects with similar idea of making recipes publishing more communal
— there are quite a few recipe formats: Schema.org, FatHub, RecipeML, h-recipe, Cooklang
— semantic markup is a must
— discoverability will be tricky
— Nextcloud has a cookbook app; it is unclear how it works with (federated) Nextcloud Social
— name ideas: Recipedia, Cookwyrm :blobcatgoogly2:

I’m quite hyped to say the least

A hundred replies later, here’s what I gathered:

— people seem to like the idea :D
— there are other projects with similar idea of making recipes publishing more communal
— there are quite a few recipe formats: Schema.org, FatHub, RecipeML, h-recipe, Cooklang
— semantic markup is a must
— discoverability will be tricky
— Nextcloud has a cookbook app; it is unclear how it works with (federated) Nextcloud Social
— name ideas: Recipedia, Cookwyrm :blobcatgoogly2:

Go Up