123 karma · joined Mar 30, 2011 (15y ago) · 64 submissions
comment 5y ago · link · parent
@inertia("User/List")
@api_view(["GET"])
def get_users(request, **kwargs):
// ...
return Response(data={"users": users})
This can return JSON or HTML with the data injected.comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
I guess in fairness you probably don't want to follow people who tweet like this but these kinds of tweets will still be hard to avoid. I'd rather just pay twitter $x/yr for no ads.
comment 6y ago · link · parent
comment 6y ago · link · parent
It has some limitations but mostly it was useful to learn that google app scripts are a thing.
comment 6y ago · link · parent
I'm not sure this is correct, but I'm willing to be convinced if you can expand a little more. I guess I see it as censoring the act of censoring.
> If this is true, i.e. reporting of the censorship increases the visibility of the bad idea, then it completely destroys the pro-censorship argument that it reduces the visibility of bad ideas. It would also immediately cease to be true if censorship ever became uncontroversial, in which case you couldn't claim that it's giving the allegedly bad idea a chance at a fair debate.
In this case, it is true. But youtube censorship is not equivalent to societal censorship, it just signals that youtube does not endorse Icke's ideas and does not wish to publish them, but people can still evaluate them somewhere else.
> Is somebody suggesting that YouTube should be prohibited from creating and distributing their own videos?
No, the suggestion is they should not be allowed to write their own terms and enforce them.
comment 6y ago · link · parent
- booting people off platforms is a "bad idea" which you wish to "suppress".
- booting people off platforms shines a light on their "bad ideas"
I'm sympathetic to the spirit of your comment, but I think Mr Icke has plenty of other ways to publish his ideas, and I don't believe youtube is suppressing them in a way that necessitates suppression of theirs.
comment 6y ago · link · parent
You can of course provide your own schema. This tool lets you design an API for a web service in a popular schema format called OpenAPI.
comment 6y ago · link · parent
[1]: https://github.com/rojoca/django-rest-inertia [2]: https://github.com/zodman/inertia-django [3]: https://github.com/zodman/django-inertia-demo
comment 6y ago · link · parent
This is probably partly due to the fact I find working with django rest framework serializers / views to be much nicer than django forms / views.
I think what puts most people off is the default requirement to go all-in and create an SPA with global state management and client-side managed routing, but this isn't actually necessary.
I have found incorporating Django with https://inertiajs.com to be a pretty solid alternative. I can write the whole frontend in React, and the backend in Django rest framework, but everything is still page based, so I don't require redux or any other kind of global state, just use the inertia utils to make page transitions.
NextJS is another alternative. To talk to a (django) API you need to go through getStaticProps and getServerSideProps which, depending on the location of your API server, can be a little slow, but you get pre-rendered HTML and page based routing so again no global state management required.
comment 6y ago · link · parent
Or, if it is a minor change, then conditionally include / exclude a small subset of tailwind classes.
The point is to not write your own CSS, you only use tailwind classes. In this way you can look at the template for each of your components and reason about / edit their style and layout easily.
comment 6y ago · link · parent
Here is an article by the author of this library with some justification for the appropriateness of statecharts in UI construction: https://dev.to/davidkpiano/no-disabling-a-button-is-not-app-...
comment 8y ago · link · parent
22.
The Humanity Star(thehumanitystar.com ↗)
5 points · by rojoca · 8y ago · 1 comment
comment 8y ago · link · parent
People cannot reasonably be expected to “stay calm” at a moments notice. That is completely unreasonable.
comment 9y ago · link · parent
comment 9y ago · link · parent
> Then if some law is enacted to prevent you from limiting that consumer, then you'll either make the lives of the others miserable or you'll be forced to spend more on your link and luckily pass the cost down to all your consumers. Right?
Yes but the consumers of the bandwidth are the locals in that small rural town, not netflix. Charge the locals for using more bandwidth because they are the ones requesting it.
comment 9y ago · link · parent
I think it would be good if the docs had the git commands that are run for a git-town command.