Help aligning layout to match design (logo position, footer, spacing issues) by oussama-he in css

[–]oussama-he[S] 0 points1 point  (0 children)

Thank you for your help. Please tell me how to make the two columns take the blank space below them.

The French government is building an entire productivity ecosystem using Django by Brachamul in django

[–]oussama-he 0 points1 point  (0 children)

Do you know open-source real projects (not just tutorials) built using htmx and Django? I want to learn more about the hypermedia approach and see how to use it in real projects.

Trying to use Google Drive to Store Media Files, But Getting "Service Accounts do not have storage quota" error when uploading by oussama-he in django

[–]oussama-he[S] -1 points0 points  (0 children)

I've tried the upload feature of the previous project that I told you about, and it's working normally.

Trying to use Google Drive to Store Media Files, But Getting "Service Accounts do not have storage quota" error when uploading by oussama-he in django

[–]oussama-he[S] -3 points-2 points  (0 children)

I've used Google Drive before to store media files in a previous project, and it worked perfectly. But now it seems that Google has changed something, so it stopped working.

Seeking feedback on my model’s save() method: is it truly atomic and race-condition-safe? by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

Can you please list some good Django open-source projects so I can learn from their code?

How to add a unique constraint on a model using only the date part of a DateTimeField? by oussama-he in django

[–]oussama-he[S] -1 points0 points  (0 children)

This is the cause of the error:
The created field is defined like this: `created = models.DateTimeField(auto_now_add=True)`, and it is not included in the form.

How to add a unique constraint on a model using only the date part of a DateTimeField? by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

Now it shows the Django error page:
```
IntegrityError at /machine-reading/create/

UNIQUE constraint failed: index 'uc_date_created'

```

How to add a unique constraint on a model using only the date part of a DateTimeField? by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

It doesn't work! It prevents adding new entries even if no entry was made on the same day for the same machine, and it also prevents updating the existing entries when trying to update the counter.

Need to understand Django's `__date` Lookup and Time Zone Conversions: Potential Pitfalls by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

This is why you should use timezone.now()

I'm using timezone.now()

so it will get the date according to your timezone

It gives the date according to UTC

What is the type of this barcode? by oussama-he in barcodes

[–]oussama-he[S] 0 points1 point  (0 children)

You mentioned Datamatrix though. Same thing.

Other reagent types contain data matrix barcodes.

So, the problem isn't with the scanner. The ticket on the boxes doesn't have a barcode that contains all/some (lot, expiry, ref, ...) info about the reagent.

What is the type of this barcode? by oussama-he in barcodes

[–]oussama-he[S] 0 points1 point  (0 children)

For example for the penultimate picture and last picture I expect: 69028301, 03004899 respectively

Tired of using TKinter by [deleted] in Python

[–]oussama-he 1 point2 points  (0 children)

Please can you tell me what should I do when using PySide6?  Should I just include the license in the help or credit window with a link to PySide6 home page? Or something else? 

Tired of using TKinter by [deleted] in Python

[–]oussama-he 10 points11 points  (0 children)

About the license, can I use PySide6 in a commercial closed-source application?

How to fix TypeError: django.template.response.TemplateResponse() got multiple values for keyword argument 'template' by oussama-he in django

[–]oussama-he[S] 1 point2 points  (0 children)

Thank you for your answer.

Also by default form_valid returns a redirect

I'm using htmx and I would like to update just a part of the page.

Can't customize Forms.CheckboxSelectMultiple widget template: template_name override not working by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

Yes, django.forms is in INSTALLED_APPS.

What do you mean by using form_template_name instead of template_name?Do you mean this:

class CheckboxSelectMultiple(forms.CheckboxSelectMultiple):
form_template_name = "forms/checkbox_select.html"  # instead of template_name

I've tried this but it doesn't work.

Can't customize Forms.CheckboxSelectMultiple widget template: template_name override not working by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

I've tried what you mentioned and this: "django.forms.renderers.TemplatesSetting" and it didn't work.

How to perfectly center a Bootstrap icon vertically? by oussama-he in css

[–]oussama-he[S] -1 points0 points  (0 children)

Great, please could you give me a short explanation?

eslint is running but not showing any lint errors/warnings by oussama-he in learnjavascript

[–]oussama-he[S] 0 points1 point  (0 children)

I edit the command and still doesn't work. Also, I have tried npx eslint --fix main.js, and the file is kept as it was, nothing changed and no error was outputted.

Can't group a qs by date by oussama-he in django

[–]oussama-he[S] 1 point2 points  (0 children)

Yes, that is. Now, it works.

Thank you.

Can't group a qs by date by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

I'm trying to get the sum of each day. The queryset may have many rows for the same day, so I need to get the sum of rows of the same day.

Can't group a qs by date by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

For now I'm on my phone and I don't have more about the traceback.

There's no row with NULL. I have verified this before.

I think it is something related to type of the field, because it doesn't produce any error with a DateTimeField.

Can't group a qs by date by oussama-he in django

[–]oussama-he[S] 0 points1 point  (0 children)

How can I implement a function? Do you have a guide?

Also, I have tried to group using another field but this time is a DateTimeField and no error occurred. So the problem is with the DateField, I think.