The Biggest Cities have Democratic Mayors – Including the Best Biggest Cities

The biggest cities in the United States are run by Democrats. Sixty-two percent are Democratic according to a page in Ballotpedia. And that doesn’t mean thirty-eight percent are Republicans. From my own research I found 64 Democrats, 25 Republicans, and the remainder unknown.

When a big city makes the news for some negative reason, it’s usually a city with a Democratic mayor. Republicans are quick to point that out, although they fail to point out that most of those cities, like Flint or Jackson, have Republican governors.

But it’s not just the biggest cities that are mostly Democratic, it’s the best

Of U.S. News and World Reports 25 Best Places to Live, at least 19 are run by Democrats. Looking at 25 best cities in Niche, I came up with 12 Democratic cities and only three Republicans (a lot of unknown’s on that list). I never heard of Afar before, but their list of best large cities was the first hit my Google search, and that list is overwhelmingly Democratic.

This might be because a city needs infrastructure and services. It’s not good enough to tell residents that they’re on their own and to enjoy the low taxes, even though Republicans rarely meet their low-tax promises as well as they meet their low services promises.

Despite all the anti-Dem commenters who are quick to disparage Democratic leadership when a big city makes the news, it seems to me that Democrats run things pretty well.

In this modern age, try to keep your phone number and don’t lose your phone

At the library where I work stuff like this happens a lot

One case:
– Patron needs help unlocking iPhone
– Tried iTunes but patron also forgot iTunes password
– Sent password reset to Gmail but patron forgot Gmail password
– Gmail sent reset to phone but…

Another case:
– Patron forgot password to bank account
– Bank sent password reset to Gmail, but patron can’t access Gmail
– Gmail sent password reset to phone
– Patron doesn’t have that phone anymore

I wish I can get the word out that your phone is often your last resort to resetting passwords. Try not to lose access to your phone and try to keep your phone number.

If you only remember one password, let it be the one for your phone. If there’s only one thing you can keep from losing, let it be your phone.

Common Sense Gun Laws Won’t Disarm Us

This is mostly a response to a discussion in the comments section of a post on Libertas and Latte.  It’s a bit long for a comment so I’m posting it here.  I’m also posting it here because I’m a narcissist and want to post something on my own blog rather than someone else’s, but the first point is still valid.

The original post is about the Indiana mall hero.

I already posted the following comment:

I think I’m with the majority of people who support some gun control measures but not any that would have disarmed Mr. Dicken.

It’s frustrating to me that I don’t see enough people pointing that out. I see people on the right distorting reality as expected by holding up this story as the only piece of data we need to prove that gun laws don’t work, and guys on the left shooting themselves in the foot by only grudgingly acknowledging Mr. Dicken’s heroism rather than holding him up an example of the kind of legally armed citizen who would not be disarmed by common sense gun control measures

So what “common sense gun control measures” do I support and how far am I from fellow gun control advocates?

Starting with what I don’t support: I don’t support severe limits on magazines and I don’t support outlawing many features that some say differentiate an assault weapon from a hunting rifle.   And I cringed with Beto O’Rourke said, “Hell Yes”

On that last point, “Hell Yes” undermined years of Democratic talking points, and I’m surprised at how many people supported him in saying so.  My friends still post memes ridiculing right wing paranoia about gun-grabbers, even after Beto endorsed their paranoia.  I still don’t think it will happen. I don’t want to grab your guns and I don’t think it would be realistic to try.

Note: Gun-grabbing now also refers to red-flag laws, many of which I do support.  Here, I’m using “gun-grabbing” to mean outlawing the ownership, not just the sale, of weapons which are currently legal.

I support background checks, concealed carry licenses, red-flag laws, and maybe some high limits on how many rounds a single weapon can hold. But those limits would have to be high.  I wouldn’t want my 22 Marlin outlawed because I can drop more than 10 bullets into the loading tube.

The gun legislation that I support, and hope others get onboard with, might not disarm most of the nutjob shooters, but they’ll stop some. And as I said, none of these would have disarmed Mr. Dicken.

Specifying the value format for a Django DateTimeInput using type=”datetime-local”, especially when using inline formsets

TL;DR: For a DateTimeInput widget where type=’datetime-local’, specify the default format to include the T in the middle of the date-time string:

widgets={
   'when':forms.DateTimeInput(
       format='%Y-%m-%dT%H:%M:%S',  
       attrs={'type':'datetime-local'} 
    ),
    ...
}

This was driving me crazy!

I had a model inline formset using a form:

forms.py:

TicketNoteFormset = inlineformset_factory(Ticket, TicketNote, form=TicketNoteForm, extra=10)

The specified form (TicketNoteForm) had a widget specified for a DateTime field:

forms.py:

class TicketTicketNoteForm(forms.ModelForm):
    class Meta:
        model = TicketNote
        fields = [
            'when',
            'text',
        ]
        widgets={
            'when':forms.DateInput(attrs={'type':'date'}),
            'text':forms.TextInput(attrs={'class':'len100'})
        }

My mistake was using DateInput for the field ‘when’, which was a DateTimeField, not a DateField
models.py:

class TicketNote(models.Model):

    when = models.DateTimeField(
        'when',
        default=datetime.now,
        help_text='The date that the note was submitted'
    )

In the HTML forms, the initial value, as expected, was a date-time value but the value attribute of the field was a date value without the time


<input type="date" name="ticketnote_set-0-when" value="2022-01-22 06:52:09" id="id_ticketnote_set-0-when">
<input type="hidden" name="initial-ticketnote_set-0-when" value="2022-01-22 06:52:09" id="initial-ticketnote_set-0-id_ticketnote_set-0-when">
    

The difference between initial and non-initial caused a record to be created even if the form was blank

But it was still broken after I fixed it

Leaving out the widget declaration works, but then I just get a plain text field and I want to take advantage of the browser’s popup calendar

I thought I had the problem fixed by specifying the widget as

forms.py:

DateTimeInput(attrs={'type':'datetime-local'}), 

but that’s still giving me some problems. It worked fine in Firefox, but Chrome ignored the value attribute. So in Chrome

<input type="datetime-local" value="2022-01-01 08:01:00">

displays a blank datetime input and submits an empty string if not updated

I’ll update if I find a good solution.

Update: This works in Firefox and Chrome:
forms.py:

widgets={
   'when':forms.DateTimeInput(
       format='%Y-%m-%dT%H:%M:%S',  
       attrs={'type':'datetime-local'} 
    ),
    ...
}

What Chrome was rejecting was having the value specified without the T between the date portion and the time portion. Django was producing the value without the T. By adding the format argument, I was able to make Django produce a default value that Chrome accepts.

Who gets credit for the hoax?

Is COVID-19 a hoax or is it a disease that can be cured with hydroxychloroquine?  or ivermectin?

Why wasn’t Trump treated with hydroxychloroquine when he got COVID-19?

Is it no worse than the flu or is it a deadly Chinese bio-weapon for which Dr. Fauci has the blood of millions on his hands?

If the vaccine is a hoax but Donald Trump’s Warp Speed program should get credit for it, does Donald Trump get credit for the hoax?

If the vaccine is not a hoax and Donald Trump’s Warp Speed program should get credit for it, does it matter that Pfizer, the first company to produce a vaccine, refused Warp Speed money so they wouldn’t be constrained by Warp Speed rules?

Why are both Donald Trump and Joe Biden vaccinated?  Is there anything else they agree about?

Virginia HD64: Your candidate or Dominion Energy’s candidate?

Dominion Energy is the top donor to Michael Drewry’s opponent.   Michael is not accepting donations from big donors like Dominion Energy, because Michael Drewry wants to work for you.  As our delegate in the 64th District, Michael Drewry will represent and fight for the people, as he did on the Surry County Board of Supervisors

As it says on his website,

By the end of the year, all of Surry County will have broadband internet access. And, while his opponent now voted against a Virginia House resolution recognizing water as a human right, Michael brought brand-new water infrastructure to Dendron.

Drewry for Delegate

If you donate to or volunteer for Michael Drewry’s campaign, you will be among real people working for a better future. If you live in the 64th House of Delegates district in Virginia, a vote for Michael Drewry is a vote to put power back in the hands of the people who make up the district.

Despite what you heard, we didn’t defund the police, we increased their funding

At a recent meeting of the Suffolk Democratic Committee, Delegate Clinton Jenkins announced some accomplishments made by the General Assembly. One of those accomplishments was an increase in funding for law enforcement. As I remember, he said, “Despite what you heard, we didn’t defund the police, we increased their funding,” and in response to that, the Suffolk Democrats applauded.

Terry McAuliffe is now fighting accusations of defunding the police when during his time, he, too worked to increase funding for law enforcement.

The phrase “Defund the Police” means different things to different people, except maybe for Republicans who seem unified in thinking the phrase means abolishing rule of law and creating a consequence-free environment for criminals. That’s not what it means to any Democrat.

Whatever the phrase might mean to various proponents and opponents across the nation, it’s a moot point in Virginia where the Democratic chair of the Judiciary Committee said, “No, we don’t need to take money from law enforcement […] We need the police.”

Don’t let Republicans gaslight you into thinking that a vote for Democrats is a vote for crime. The opposite is true, especially in Virginia.

Under Democratic leadership, including during the McAuliffe years of 2014 to 2018, Virginia has had the lowest crime rate in the region (see CDC data and Virginia Ranks Among States with Lowest Crime Rates). That, along with Virginia’s excellent economy, mean things are, and have been, pretty good in Virginia.

But Republicans think it’s time for a change.

A Guy Who Hates Me Gave Me a Jump in Virginia Beach

My wife’s car has a loose battery connector but that’s not why the battery drained today. It drained because I forgot the lights don’t turn out if you don’t open the driver’s door even if you take the key out of the ignition. Stupid feature. When I couldn’t start the car, I called the roadside service that I have through my insurance company.

The guy that arrived saw our bumper stickers and said he was willing to help me even though I was a Biden loving bastard.

Before I came up with a good response, he showed me the loose battery terminal. I said, “I know, but that’s not the problem today.” He fussed with it a bit and said, “Just for giggles, let’s try it now”, then added, “Just for kicks”

The car didn’t start because the battery was drained because of the lights. Like I said, the connector wasn’t the problem today. So he jumped it and got me going.

I didn’t get angry, but I didn’t shy away from talking to him. I don’t remember everything we said but I found out he hates Republicans, too. But he really hated Biden. At one point he spoke about all the illegals coming in. I said, “What about all those Haitians that we’re deporting?”. He said we’re not deporting any Haitians. He said they’re letting them in and telling us they’re being deported. He said they’re lying to me and I believe them.

He was already in his truck by then, and he backed away without saying anything else.

I did right by not insulting the guy – not saying he’s delusional or whatever, because I keep reading insults don’t work. Listen patiently and defend the truth. But I could have done better on the second part. The truth is I wasn’t ready for a debate and delusional people can say whatever they want, but defending the truth means keeping your facts straight.

I would have liked to have asked him, “If everyone is lying, how do you know what to believe?”

That I’m writing this post suggests he’s in my head more than I’m in his. Maybe being hateful and delusional is better for your mood than being contemplative and worried. While I was waiting for the jump I read an opinion piece saying, “The United States is heading into its greatest political and constitutional crisis since the Civil War, with a reasonable chance over the next three to four years of incidents of mass violence, a breakdown of federal authority, and the division of the country into warring red and blue enclaves.” This guy showing up didn’t give me much reason to doubt that.

This paragraph is two days older than the rest of the post. I didn’t think it was relevant at the time, but the insurance company gave this guy the wrong phone number and the wrong color of my car. He found me because my hood was up. He also noticed that my battery bracket was broken. He shook the battery and said, “Here’s why your connector keeps coming loose, buddy”. That sounds reasonable. He alternated between calling me “buddy” and “bastard”. The point is while none of this makes him a genius, I don’t think the guy was stupid. Just delusional. Brainwashed. When talking with these people, we shouldn’t assume their all stupid.

In Django, Using Form to get Field Labels in ListView and DetailView

I don’t know if this is good practice, but to get field labels in a ListView, DetailView, or DeleteView it seems to work fine if you just add a form to the context:

views.py:

class ItemDetailView(DetailView):
    model = Item 
    context_object_name = "item"

    def get_context_data(self, **kwargs):
        context_data = super().get_context_data(**kwargs)
        # just to get the labels
        context_data['form'] = ItemForm
        return context_data

item_detail_view.html:

<div class="label">{{ form.name.label_tag }}</div><div class="value">item.name</div>
<div class="label">{{ form.brand.label_tag }}</div><div class="value">item.brand</div>
<div class="label">{{ form.sn.label_tag }}</div><div class="value">item.sn</div>

You can use label instead of label_tag

This works fine with most fields but fails with ManyToMany fields. Still, it seems to be the easiest way to get most field labels without having to type them in.

Is this a great idea or am I missing some reason that this is bad?

He did what he did but…

Federal judge tosses most claims against Trump, Barr and U.S. officials in clearing of Lafayette Square

https://www.washingtonpost.com/local/legal-issues/lafayette-square-lawsuit-claims-dismissed/2021/06/21/8c0e8416-d2ce-11eb-ae54-515e2f63d37d_story.html

Even though

Officials used batons, clubs and spray and fired projectiles as more than 1,000 largely peaceful demonstrators gathered

and the judge

acknowledged claims that Trump tweeted threats and encouragement of violence against protesters, and ordered Barr take charge of the situation before Barr mobilized law enforcement and appeared at the square just before it was cleared.

because apparently,

these events weren’t enough to allow conspiracy claims to go forward

So once again, Trump wiggles out of responsibility for a crime we know he committed because we can’t prove he conspired to commit it.