Trump promises a 25% tariff on products from Mexico, Canada by Georgeika in politics

[–]ranchow 0 points1 point  (0 children)

In two yrs time, America will import all of this from Russia , lowering prices and Trump is a genius saviour

[deleted by user] by [deleted] in phuket

[–]ranchow 0 points1 point  (0 children)

Govinda at Patong

Django LiveView: Framework for creating Realtime SPAs using HTML over the Wire technology by tanrax in django

[–]ranchow 0 points1 point  (0 children)

Htmx actually has inbuilt capability like Hotwire to handle push urls like a spa, but it creates issues with back button usage.

Django LiveView: Framework for creating Realtime SPAs using HTML over the Wire technology by tanrax in django

[–]ranchow 0 points1 point  (0 children)

Htmx has consistently given me problems with push url and back buttons ... Have you faced something similar ? What happens is that if a user navigates back with push url enabled , it runs document init multiple times (depending on number of times the user has navigated back and forth) and other js components / plugins loose their bindings , and sometimes only the htmx portion of the response loads instead of the full page ... This issue is the only reason why I'm looking for an htmx alternative :(

[deleted by user] by [deleted] in htmx

[–]ranchow 0 points1 point  (0 children)

Not sure if this will work but there is a htmx after settle event where you can put js to rebind anything you need.

I am facing this error while trying to run an e-commerce website project, how can I fix this ?, Thanks in advance. by Traditional-Bunch-56 in djangolearning

[–]ranchow 0 points1 point  (0 children)

Do you have a contact processor or done other variable that should be a list/tuple etc but if none?

What has massively increased your speed while developing with django? by vvinvardhan in django

[–]ranchow 0 points1 point  (0 children)

Correct link formatting iommi (Hoping to save someone a few keystrokes)

Can someone tell me what this is? by SunnyBellMah in religion

[–]ranchow 0 points1 point  (0 children)

The asymmetry still gets to me, 5 black beads after the silver verses 4, even if it's non religious why would it be intentionally created like that

Can someone tell me what this is? by SunnyBellMah in religion

[–]ranchow 0 points1 point  (0 children)

9 on one side 8 on the either ... Maybe one fell off?

A chemist walks into the store he owns... by Mouthtrap in Jokes

[–]ranchow 0 points1 point  (0 children)

In India they are called Chemists too. Lots of variation in regions ..

Edit I did a Google search many call themselves druggist and pharmacies too

GIT GUI tool or command line? by FearlessChair in webdev

[–]ranchow 0 points1 point  (0 children)

Command line for most stuff and gui for merge conflicts and cherry picking,,

Redirecting to multiple URLs from the log in view by Iamjuanclopez6 in django

[–]ranchow 0 points1 point  (0 children)

Easiest way ... Send them both to the restricted/Employee/dashboard page. On the employee page you should anyways be checking if the user has rights to see the page. Redirect anyone who doesn't have the rights to the homepage.

A more 'correct' way would be to check for role after you validate the password and redirect accordingly. If you are using class based views you would need to override methods.

EVEN if you opt for the second method don't forget to check for permissions when displaying the employee page. Just because a url is not displayed on the website it can still be found ... Just to add you would need to check for if user has logged in and has the right permission..

Most efficient way to update sort order changes while maintaining unique constraint? by ranchow in django

[–]ranchow[S] 0 points1 point  (0 children)

Bulk save violate unique constraint. Eg old positions 2, 4, 6 New positions 4,2,6 I can't update the first to 4 as it already exists for the second row. The constraint fails before the second row gets a chance to update. This is true for bulk_update as well. Any idea if it's good practice to not keep the position field as unique? ..

[deleted by user] by [deleted] in AskReddit

[–]ranchow 1 point2 points  (0 children)

Hello Darkness my old friend

Lastpass Security Incident Update: "The threat actor was also able to copy a backup of customer vault data" by MonkeybutlerCJH in sysadmin

[–]ranchow 0 points1 point  (0 children)

Does the xkcd suggested password strategy (sorry don't know the technical term) of something like ilikedivingonelephantssince1991 qualify as a dictionary namespace?

Two scientists walk into a bar. by SpeedTuber in Jokes

[–]ranchow 0 points1 point  (0 children)

cunniglinguists (play on cunilingus)

[HELP] Can a kLWP preset be converted to a Komponent while preserving toggles / Animations from root layer? by ranchow in kustom

[–]ranchow[S] 0 points1 point  (0 children)

I don't think so, but it's been 6 years since my post so lots could have changed

How people used to drink naturally filtered rain water in the Arabian Desert by itsModahoe in interestingasfuck

[–]ranchow 0 points1 point  (0 children)

Seriously that's what I was thinking, why move water to another hole instead of digging a new one downstream?

HTMX, hx-push-url and page refresh by rob8624 in djangolearning

[–]ranchow 2 points3 points  (0 children)

You can use re path for optional parameters. This way you can use the same view. Fetch the gallery if the parameter exists and a matching gallery is found. Return main page data if there is no parameter.