Tuesday, June 28, 2022

Re: Need some help

Yup

On June 26, 2022 8:11:01 PM CDT, Rohit Lohar <loharrohit696969@gmail.com> wrote:
Can I make a form with the help of htmx such that the whole form has a small container is dynamic and else whole part is static?

On Mon, Jun 27, 2022, 4:07 AM Ryan Nowakowski <ryan@fattuba.com> wrote:
If you want the initial input field value to change dynamically when the select field option changes, there's a bunch of different ways to do this. My current favorite is htmx

https://htmx.org/

- Ryan



On June 26, 2022 5:10:19 AM CDT, Rohit Lohar <loharrohit9860@gmail.com> wrote:
Hi there, 
I am currently making a form where the user will have a option to select from the drop down and an input field next to it. So basically the drop down will have the list of products and the input field will be having an initial value depending upon the choice selected by user. The product name and price have their seperate table so how can I achieve this.
Thank you

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/86BB9A38-A8CC-4029-AAB4-ED2B6E31D22D%40fattuba.com.

Thursday, June 23, 2022

Re: server can't connect in browser

ok this is networking 101 stuff

if the server is running on 127.0.0.1 8000 (or whatever port)

and you are trying to access from another system you need to use the ip
address of the server (not 127.0.0.1) and it needs to be accesable on
your network to be able to find it.

best to try telneting to the server as a test to verify ip & ports are
correct.

example :

telnet 192.168.0.2<ipaddress> <space> 8000 <port> for example if you get
a response then you are good to go.

ie

"telnet 192.168.0.2 8000"





Happy Thursday !!!
Thanks - paul

Paul Kudla


Scom.ca Internet Services <http://www.scom.ca>
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email paul@scom.ca

On 6/22/2022 1:46 PM, Django-Admin wrote:
> Try opening the link in a browser in the same EC2 instance, if you are
> not doing so.
>
> On Wednesday, June 22, 2022 at 6:37:18 PM UTC+5:30 kamald...@gmail.com
> wrote:
>
> Hi all,
> I am quite new in django. Just started my first project in it.
> I started an ec2 instance, setup virtual environment and run server
> through
> python manage.py runserver command.
> Server is up with no errors. But when I copy the link and open in
> browser it says site can't be reached. Screenshots of it are
> attached for reference.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscribe@googlegroups.com
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dfe8f847-65bc-4602-b3b9-9e7a81998459n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dfe8f847-65bc-4602-b3b9-9e7a81998459n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/eef876cb-0c0c-5123-63f2-3fc6b727eac5%40scom.ca.

Re: ?? question ,its urgent

Better use JSON Field to store all the informations

On Mon, Jun 20, 2022 at 12:16 PM Abhinandan K <abhinandan@snakescript.com> wrote:
how to store the data in django databse table if user append fields according to their need
for example i have 1 one field 1) name 2) age 3) salary and the sign('+)
if user click on + sign row append one plus in form..my question is that i want to store the data in all appended textboxes in single field in database,,

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp6UPLakoi-JhcgB4U89-iKfDwAaxDWwW547tFKyk_imrg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WZmMSjWKoTxGvmvuk_paEkvpvD5NjX0ri7cRrDe%2BtMtfg%40mail.gmail.com.

Sunday, June 19, 2022

?? question ,its urgent

how to store the data in django databse table if user append fields according to their need
for example i have 1 one field 1) name 2) age 3) salary and the sign('+)
if user click on + sign row append one plus in form..my question is that i want to store the data in all appended textboxes in single field in database,,

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp6UPLakoi-JhcgB4U89-iKfDwAaxDWwW547tFKyk_imrg%40mail.gmail.com.

Friday, June 17, 2022

its urgent...

is anybody know how to scrap all businesses from google maps and save into csv with selenium.... and whenever search that business it gave result of that business... 
also its important to me that how generate google maps api without billing... 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp6QVZAY75%3DMHEugVpH5HBGBiGdyNyDf7QfkdiA1SHU39Q%40mail.gmail.com.

CSRF issue in default login

Hi.

I'm fairly new to Django. Here's what I need insight on:

Local server, no issue.

On production: CSRF 403 error on login.

There's a cookie loaded on the login page containing csrftoken: pAFeeUI8YFXZ2PKRYxOTX1qz4Xgto42WVNi7FFvBlZDqcFLwQ2rdQvVeZBHFSpLW

(Local and Session storage are empty)

In the FORM element:

<input type="hidden" name="csrfmiddlewaretoken" value="Vz4FiujD4qkLpxCwWNJU0HCWs4u0Qf4RrMHyJf66rK0cznDbOimeTb7BnIVckANR">

Notice they don't match.

I tried running ./migrate.py clearsessions.

Once, yesterday, it seemed that the error did not occur in an Incognito Window, but today it persists even in an incognito window, as well as a different browser.

One additional piece of information, I have allauth installed, but it doesn't seem to be correctly configured. It's login page is not loading.

Additionally, the problem was there even when I removed allauth from Apps and Authentication Backends.

Thanks much.

–Mike

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/551AFE93-8B25-4CB9-8D3F-F1BF1EC4F585%40mzoo.org.

is anybody know how to add multiple fields on html form when user click on + icon

for example-
fields are-
name,age,salary.  +
and when user click on + sign same fields increased according to user clicks on + sign..

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp7YOmRprYhKu0Xb0%3DTVQqLTMEn7St2xRVrQjJeQ%2BghOgg%40mail.gmail.com.

Thursday, June 16, 2022

Re: Can't login with Username

You could use manage.py shell to set the email address of your super user.

On June 13, 2022 12:22:30 AM CDT, Sudip Khokhar <sudip.flyontechsolution@gmail.com> wrote:
Hi All,

I am practicing Django since 3 months and recently I encountered an issue with my practice project as I made a super user and didn't added email to it.
Then after I set email as the USERNAME_FIELD = 'email' in my django model to access the database. But not I don't know how to add email after making migrations to it.
I had also tried by commenting USERNAME_FIELD = 'email' and REQUIRED_FIELDS = [], but didn't worked well and I'm unable to login to my django admin database.

Here i don't understand what to do is somebody can help me to understand it in easy way step by step process......

The core aim is to match existing customers (stored in an Excel sheet) against Google Maps entries, to detect existing customers and distinguish them from new potential customers.

Customer: a customer in this context is a Google My Business entry for example a Restaurant.

The problem is that the existing customer names are not exactly the same as the Google Maps entries, so we can't compare them directly. In order to overcome this problem, one has to scrape the existing customers in Google Maps, hence obtaining the same type of data.

Example: Business Database has: the name "Coffee Shop 123", but in Google Maps it is "Coffee Shop 123 Munich".

If you search for "Coffee Shop 123 in Munich" you will get the desired data that is in this case: "Coffee Shop 123 Munich"

There are ca. 15k to 25k customers to cross-check and due to the secrecy of the entire project, we never have access to the dataset, instead an autonomous application is required that can process the given input.





--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp4txB%3DfsD3RDdJVNtv_B6yQsXT1bPB_WBNB6hps5m4W4A%40mail.gmail.com.

Wednesday, June 15, 2022

Re: Added new column to model and run migrations but not applied to database table

Hello Django experts,

We are seeing this problem again and think that this should be a serious bug in Django. We are wondering whether any one in this community is having the same issue. I would appreciate it if you could share your thoughts on this because we are really unhappy to see this problem again and again. 

Thanks 
~Salima

On Mon, Aug 16, 2021 at 9:47 AM Salima Begum <salima.b@rohteksolutions.com> wrote:
Hi,
I am hitting this problem again with new code merges into the deployment server. Last time, I fixed the issue by doing like this

"I have tried all the ways what you guys suggested me But here I don't want change database why because it is deployment server so, when I run manage.py makemigrations migrations are applied and changes are reading but when I run manage.py migrate changes are not taken to database so, Manually I queried queries to add columns into respected tables into database."

I really think this might not be a sustainable solution. So, I would really like to fix this permanently. I would appreciate it if someone could suggest a remedy for this issue.

Thank you in advance
~Salima

On Tue, Jul 27, 2021 at 5:18 AM guna visva <gunaselanv@gmail.com> wrote:
having had the unfortunate phase of dealing with it , sorting it requires some patience

the issue is the tables in django_migrations is not in sync with rest the rest of your database or migrations files. 

You have to first remove the addition in field etc and make sure the database tables are first in sync with your models, then 1. delete migrations files and 2. delete django_migrations. Then 3.makemigrations and 4. migrate fake.  All risks are yours to take

Then finally just add your fields and makemigrations and migrate

The above might/or not work as it might give some content type errors 




On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com wrote:
Is in settings.py also in installed app? Without that migrations don't work

Salima Begum <sali...@rohteksolutions.com> schrieb am Di., 20. Juli 2021, 19:00:
Hi ,
Thank you for your responses.
 I have tried all the ways Which you people suggested I am not getting any error while running makemigrations or migrate and 
python manage.py migrate --fake-initial. But those migrations are not applying to the database. How can I fix this issue without deleting the database? 

Thank you
~Salima
 

On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas <amanv...@gmail.com> wrote:
if it is saying no changes detected while running makemigrations and you are sure that you changed models.py  then these things you can try:

1: python manage.py makemigrations appname

if this will not work then do that

2: delete migrations folder from your app and delete database then run again python manage.py makemigrations




On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <sali...@rohteksolutions.com> wrote:
Hi all,

I have added a new column to the existing model while developing. Then I run makemigrations and migrate. It is not applied to the database table which is created based on that model. How can I fix this issue? Please help me to complete this issue.

The below issue I am facing in deployment server after adding new field and deployed into server.

```
psycopg2.errors.UndefinedColumn: column shopping_ls_product_search.quality_prdct does not exist
LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
```
Thank you
~Salima

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f8458021-e0c0-4c30-8188-0c08932b1deen%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMSz6b%3Dhdi%2B-8g2hM1sJf%3DjqZRxPQoZ9mwqaNMGL64rAqLbijQ%40mail.gmail.com.

Tuesday, June 14, 2022

Re: How to hash fields and detect changes in a record

On 6/12/22 11:40 PM, Mike Dewhirst wrote:

-------- Original message --------
From: Ryan Nowakowski <tubaman@fattuba.com>
Date: 13/6/22 07:09 (GMT+10:00)
Subject: Re: How to hash fields and detect changes in a record

On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote:
> On 10/06/2022 11:24 pm, Ryan Nowakowski wrote:
> > On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote:
> > > I think the solution might be to hash note.title and note.note into a new
> > > field note.hash on being auto-created. On subsequent saves, compare the
> > > latest hash with note.hash to decide whether to delete auto-inserted notes
> > > prior to generating the next set. Those subsequent saves could be months or
> > > years later.
> > Hashing is useful if you want to check that something has been
> > unexpectedly changed.  I assume the note can only be changed through
> > your web app so you know when a user is changing a note.
>
> These are automatically generated notes which taken together constitute
> advice on how to deal with the analysis. Users can edit them. For example,
> someone might record some action taken regarding the advice. I don't want to
> delete that. If nothing has been edited, it is safe to delete.
>
> So how do I know it is the same as when originally generated - and safe to
> delete - except by storing a hash of the interesting fields.

Because when the user edits a note, during the form.save()(assuming
you're using Django forms), you'll set `altered_by_user` to True.

Notes can also be altered in the Admin


You have a couple of choices then.  You could alter the note details view in the admin to set the altered_by_user field.  Alternatively and more generically, you could check the pk field in your model save method.  If it is None, then you are creating a new note.  If the pk field is not None, then you are updating an existing note so you can set altered_by_user to True.


> And if that is the best approach, what sort of hashing will survive Python
> upgrades etc?

Pick a hash algorithm[1](ex: sha256).  The output will remain the same
even with Python upgrades.

So the mechanism doesn't need to be a hash - as you said.I now just sum ord(char) for the title and the note and keep that in a flag field.

Summing the ordinal of the characters won't catch transposition:

>>> chars = 'ab'  >>> sum([ord(c) for c in chars])  195  >>> chars = 'ba'  >>> sum([ord(c) for c in chars])  195  

Better to use a real hash algorithm if you're trying to detect changes.  My note above about hashing not being required is because you don't need to detect changes because you explicitly already know when changes are being made.

Re: python instagram bot to upload posts

On 14/06/2022 08.06, Abhinandan K wrote:
> hello every one i'm trying to create a python instagram bot to upload
> posts..
>

That's great but how is this related to Django?

Maybe you should consider finding another place for all your questions
as none of them really fit here.

Before doing that I would also strongly recommend reading something like
this:

https://www.propublica.org/nerds/how-to-ask-programming-questions

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/76cfacd6-da78-f5e6-f55e-fee7ecd895aa%40stacktrace.dk.

Monday, June 13, 2022

python instagram bot to upload posts

hello every one i'm trying to create a python instagram bot to upload posts..

error-gives-", line 132, in upload_photo
    if not compatible_aspect_ratio(get_image_size(photo)):
  File "/Users/mac/Documents/Abhinandan_Projects/complete_BOT_project/milestone_5/env/lib/python3.10/site-packages/instabot/api/api_photo.py", line 224, in get_image_size
    raise RuntimeError("Unsupported format")
RuntimeError: Unsupported format
code..
from instabot import Bot

bot=Bot()
bot.login(username='username',password='******')
bot.upload_photo('/Users/mac/Documents/Abhinandan_Projects/complete_BOT_project/milestone_5/ok.png',caption='ok its here')

it gives error..
", line 132, in upload_photo
    if not compatible_aspect_ratio(get_image_size(photo)):
  File "/Users/mac/Documents/Abhinandan_Projects/complete_BOT_project/milestone_5/env/lib/python3.10/site-packages/instabot/api/api_photo.py", line 224, in get_image_size
    raise RuntimeError("Unsupported format")
RuntimeError: Unsupported format

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp5MYC0QE71SiVj8CtFzCdbad%2BftQV%3DR-rsHgye2SbK0%3Dg%40mail.gmail.com.

Sunday, June 12, 2022

Re: How to hash fields and detect changes in a record

On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote:
> On 10/06/2022 11:24 pm, Ryan Nowakowski wrote:
> > On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote:
> > > I think the solution might be to hash note.title and note.note into a new
> > > field note.hash on being auto-created. On subsequent saves, compare the
> > > latest hash with note.hash to decide whether to delete auto-inserted notes
> > > prior to generating the next set. Those subsequent saves could be months or
> > > years later.
> > Hashing is useful if you want to check that something has been
> > unexpectedly changed. I assume the note can only be changed through
> > your web app so you know when a user is changing a note.
>
> These are automatically generated notes which taken together constitute
> advice on how to deal with the analysis. Users can edit them. For example,
> someone might record some action taken regarding the advice. I don't want to
> delete that. If nothing has been edited, it is safe to delete.
>
> So how do I know it is the same as when originally generated - and safe to
> delete - except by storing a hash of the interesting fields.

Because when the user edits a note, during the form.save()(assuming
you're using Django forms), you'll set `altered_by_user` to True.

> And if that is the best approach, what sort of hashing will survive Python
> upgrades etc?

Pick a hash algorithm[1](ex: sha256). The output will remain the same
even with Python upgrades.

[1] https://docs.python.org/3/library/hashlib.html

> > Since you're
> > expecting users to change some of the notes and you know when they do,
> > hashing might be overkill. Instead, add a boolean `altered_by_user`
> > field to the note model. Initially when you automatically create the
> > note altered_by_user would be set to False. If a user changes the note,
> > set altered_by_user to True.
>
> Not sure this would work. Note creation and eventually automatic deletion is
> all driven from model methods executed on saving.

Why wouldn't this work? During note creation, altered_by_user would be
set to False automatically because that's the default. When
automatically deleting, do:

Note.objects.filter(altered_by_user=False).delete()

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20220612210931.GA32625%40fattuba.com.

Friday, June 10, 2022

Re: How to hash fields and detect changes in a record

On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote:
> The use case is auto-deletion of out-of-date records if they have not
> changed.
>
> That might sound weird but it is the solution I have come to for a
> particular problem. My software analyses chemical properties and writes note
> records containing advice, each with a FK to the chemical.
>
> When values change sufficiently on the chemical, the software would
> construct a set of mostly different note records. The problem is that note
> records still exist from the previous set of properties. These would
> definitely confuse the user and thereby invalidate the advice.

You might consider versioning your chemical model objects. Then when
values change sufficiently on the chemical model object, you can create
a new version of the chemical object, leaving the old notes associated
with the old version of the chemical object. In your web app, you could
allow the users to browse old versions of the chemical including the
notes which may have been altered.

> The workaround is for the user to delete all notes *prior* to re-saving and
> auto-generating a new correct set of notes. There is a proviso that you
> wouldn't want to delete notes altered by users. I would document that so
> users understand why the software skipped deleting those notes.
>
> I think the solution might be to hash note.title and note.note into a new
> field note.hash on being auto-created. On subsequent saves, compare the
> latest hash with note.hash to decide whether to delete auto-inserted notes
> prior to generating the next set. Those subsequent saves could be months or
> years later.

Hashing is useful if you want to check that something has been
unexpectedly changed. I assume the note can only be changed through
your web app so you know when a user is changing a note. Since you're
expecting users to change some of the notes and you know when they do,
hashing might be overkill. Instead, add a boolean `altered_by_user`
field to the note model. Initially when you automatically create the
note altered_by_user would be set to False. If a user changes the note,
set altered_by_user to True.

> If unchanged, the old note is safe to delete because it is no longer
> relevant.
>
> I've googled around and there are lots of possible solutions but it seems
> the major problem might be that hashes are difficult to guarantee when the
> environment - such as the version of Python - changes.
>
> Also, I'm not convinced I have chosen the correct strategy.
>
> Hope I've explained the problem adequately.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20220610132452.GA18658%40fattuba.com.

How to hash fields and detect changes in a record

The use case is auto-deletion of out-of-date records if they have not
changed.

That might sound weird but it is the solution I have come to for a
particular problem. My software analyses chemical properties and writes
note records containing advice, each with a FK to the chemical.

When values change sufficiently on the chemical, the software would
construct a set of mostly different note records. The problem is that
note records still exist from the previous set of properties. These
would definitely confuse the user and thereby invalidate the advice.

The workaround is for the user to delete all notes *prior* to re-saving
and auto-generating a new correct set of notes. There is a proviso that
you wouldn't want to delete notes altered by users. I would document
that so users understand why the software skipped deleting those notes.

I think the solution might be to hash note.title and note.note into a
new field note.hash on being auto-created. On subsequent saves, compare
the latest hash with note.hash to decide whether to delete auto-inserted
notes prior to generating the next set. Those subsequent saves could be
months or years later.

If unchanged, the old note is safe to delete because it is no longer
relevant.

I've googled around and there are lots of possible solutions but it
seems the major problem might be that hashes are difficult to guarantee
when the environment - such as the version of Python - changes.

Also, I'm not convinced I have chosen the correct strategy.

Hope I've explained the problem adequately.

Thoughts appreciated

Cheers

Mike

--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce245947-54ac-150c-b295-0d489d20db40%40dewhirst.com.au.

Thursday, June 9, 2022

Re: Problems sending email with django

Hi

I've used mailjet in a Django app.

Both using the rest API with requests, ( for our transactional mails )and via authenticated SMTP for our error alerts.

I don't recall any specific challenges on the Django side , although setting up domain vaith was a bit more involved iirc.

Are you having a specific problem you can share?

Thanks

On 8 June 2022 10:23:47 BST, Israel Akinoso <akinosoissy@gmail.com> wrote:
Please is there anyone who has integrated mailjet into their django project, I really need  guidance

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Json Object type field in Model in Django

Hii Community,

can we add a field in model that stores json and we can access it's keys to get there respective values, if yes please let me know and how we can use that this thing too.

Thanks and Regards
Mukul Verma

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/82b3719b-cb25-4a63-973a-744d44cb7e9an%40googlegroups.com.

Re: how to convert xlsx file into jpg


On Thu, 9 Jun, 2022, 15:01 Jitendra kumar Patra, <jitendrapatra115@gmail.com> wrote:
Message me 7008080545 .I will help you 

On Thu, 9 Jun, 2022, 14:55 Abhinandan K, <abhinandan@snakescript.com> wrote:
IS anybody know how to convert xlsx file into jpg format in python on mac ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOAROfmjHD-iehiq10mPPPX%2BrVBTy_-qMYUbaiGqE_pKhF5OXA%40mail.gmail.com.

how to convert xlsx file into jpg

IS anybody know how to convert xlsx file into jpg format in python on mac ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%40mail.gmail.com.

Tuesday, June 7, 2022

Re: Having Trouble Creating a Test Database

Yes. All migrations have been done. 




On Tue, Jun 7, 2022, 9:01 AM Sebastian Jung <sebastian.jung2@gmail.com> wrote:
Do you have make manage.py migrate and afzer this manage.py makemigrations?

Mark Phillips <mark@phillipsmarketing.biz> schrieb am Di., 7. Juni 2022, 17:02:
I can't seem to be able to create a test database for my django project. I get this error:

django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist")


Thanks!

Mark

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEqej2Mucd0G9%3DRfS4df26HbgVAPvuPMRgisPVvy3otowamVPQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKGT9mzijrc%3DXNS2cUvuLZ8o8KniTWvTHic-Qicw_Jat-ztYxQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEqej2P4Awv-nPP86_Km5UkZa9ToPBfFEe%2BBcy5mE4UQ0-RfCw%40mail.gmail.com.

Re: Having Trouble Creating a Test Database

Hi
Why do not you use mock for data base 
?
If you use mock data base you do not need test data base and your data base will not be change

On Tue, 7 Jun 2022, 7:32 pm Mark Phillips, <mark@phillipsmarketing.biz> wrote:
I can't seem to be able to create a test database for my django project. I get this error:

django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist")


Thanks!

Mark

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEqej2Mucd0G9%3DRfS4df26HbgVAPvuPMRgisPVvy3otowamVPQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKjZekPLRqO3kavteb%3Da4pt2RMrNSDW1wLtUhs6i_1haBFyEOg%40mail.gmail.com.

Re: Session in Python for Login and Logout

-----BEGIN PGP PUBLIC KEY BLOCK-----

xsDNBGBJfrABDACxIFOMQIsP94wTkgf76JEHyTITmYnprsTeRmDet01G5etZ9ZHm
RmrqYVFzXu1aSBbaejm/ppbRrBB7YmFETbpnZepWJnuhridvjV37duRH3g/9ppiy
tNkhOOIYA/l8ppvyaRlrp/jPjAm27HVxi1Nu0syaWwTFKbUTtLKldIhuWvAXkgxp
xyBdB3jfmKoJ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
BHO6KilQ+QLzSektD8IpHM7tR6P+5PP6AQ==
=NePe
-----END PGP PUBLIC KEY BLOCK-----


On 07/06/2022 06.59, Mukul Verma wrote:
> yeah i was saying in Django Thanks Everyone please tell me something in
> steps for this like how to use session variable in django and can create
> session currently i am able to generate token (access and refresh) and
> further need to create session  with this.
>

https://docs.djangoproject.com/en/4.0/topics/http/sessions/

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5fc1ebc5-d538-2f13-55f0-2cecd9b79ba5%40stacktrace.dk.

Re: Having Trouble Creating a Test Database

Do you have make manage.py migrate and afzer this manage.py makemigrations?

Mark Phillips <mark@phillipsmarketing.biz> schrieb am Di., 7. Juni 2022, 17:02:
I can't seem to be able to create a test database for my django project. I get this error:

django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist")


Thanks!

Mark

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEqej2Mucd0G9%3DRfS4df26HbgVAPvuPMRgisPVvy3otowamVPQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKGT9mzijrc%3DXNS2cUvuLZ8o8KniTWvTHic-Qicw_Jat-ztYxQ%40mail.gmail.com.

Having Trouble Creating a Test Database

I can't seem to be able to create a test database for my django project. I get this error:

django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist")


Thanks!

Mark

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEqej2Mucd0G9%3DRfS4df26HbgVAPvuPMRgisPVvy3otowamVPQ%40mail.gmail.com.

Re: Session in Python for Login and Logout

-----BEGIN PGP PUBLIC KEY BLOCK-----

xsDNBGBJfrABDACxIFOMQIsP94wTkgf76JEHyTITmYnprsTeRmDet01G5etZ9ZHm
RmrqYVFzXu1aSBbaejm/ppbRrBB7YmFETbpnZepWJnuhridvjV37duRH3g/9ppiy
tNkhOOIYA/l8ppvyaRlrp/jPjAm27HVxi1Nu0syaWwTFKbUTtLKldIhuWvAXkgxp
xyBdB3jfmKoJ4rvTzZU+saKgaFExRmdd5TptwRP9cPRWIoR5fcRA8RQ1X66NkIpl
VBbH7NeLuTtICAa0dnyTh50x+Wapu1kDEWmr8ssUzf6c8yBJAHKBohQowZmQ8sYt
w2h4gX0zT4V3TY9y8TvTFGhPlM7l5QRFBlZqCBp5K/6xkyaAf+VlUwsdMqe8UOz5
mMJ5ZLU9JEzFyfSiM8xScwIzPcyQhOiLAgqIozTag+9B6QgD66Xa80yrFmfXyVtU
OtS6ykQsepR/fq6ySUKjWGFJ/Psq0wNuBaCHzEwEfeShZquL/jXmcUFJhVbeDYIZ
cPngktFCZ30fYuMAEQEAAc0mS2FzcGVyIExhdWRydXAgPGxhdWRydXBAc3RhY2t0
cmFjZS5kaz7CwQ8EEwEIADkWIQS5plkBvlt0D6iFDi7l2crGSqpV6wUCYEl+sQUJ
BaOagAIbAwULCQgHAgYVCAkKCwIFFgIDAQAACgkQ5dnKxkqqVeuAxQwApU4laVk3
4B2dZpFUMmkO46OeimzLiZaNYgs+SVIDw/WtaVbLUq+KH/TIMTiX5wgGRZ4WEC2L
4w66j8EzVx8vE2fNPx+yP1bM+lfbk1UBbtt9o6F6vIGzV0lHfO8rAPo4wB7lP0QB
dOAaJqnnDecGgse91HAqk1TR7oH4W7QkAshNbWEJfHpgJHNqXUa/2dp8jPAQfVcH
S0j5/4ovfVKgmkD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IG2RSE0N6C4RfKIC03ysl
L4lnhSc426Bnxkf8sZm+oFo4ian0GcuNdIQBdBdAek9F2CX6whDbL4mZFAeY/e6e
mWmP8Y/z4X2qaCpW/GHS+XFccT1h8CxqsFxnAhnecjdMCv/TJLXMNk9LihEeUEZo
4U7bitCfyO17dt6NC/7wbGZCJmNPO7V3YYeI8MwzOkvmXqLcHz0IPQATuLMB1HKr
oG/Vrwq029ftqnuDluS/DzmuIqWLuAT+2nIe1JLWFlS9OUTi4i+y0NDlxWCZOaGp
ucR+ueFKv1de3nVjdd6oN+MIO9gQ3NE53FrO46A3APy6Ex02Mxub8nNnQjXcStHZ
BHO6KilQ+QLzSektD8IpHM7tR6P+5PP6AQ==
=NePe
-----END PGP PUBLIC KEY BLOCK-----
On 07/06/2022 06.59, Mukul Verma wrote:
> yeah i was saying in Django Thanks Everyone please tell me something in
> steps for this like how to use session variable in django and can create
> session currently i am able to generate token (access and refresh) and
> further need to create session  with this.
>

https://docs.djangoproject.com/en/4.0/topics/http/sessions/

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0bb76cb7-85e8-129f-2a86-2817506e7c0a%40stacktrace.dk.

Monday, June 6, 2022

Re: Session in Python for Login and Logout

yeah i was saying in Django Thanks Everyone please tell me something in steps for this like how to use session variable in django and can create session currently i am able to generate token (access and refresh) and further need to create session  with this.

Thanks

On Tuesday, 7 June 2022 at 08:10:44 UTC+5:30 juw...@gmail.com wrote:
I think what he meant is 'session' in django.


For example, django app wants to know who is the current user, can use something like:
`request.user`

On Mon, 6 Jun 2022 at 22:45, 'Kasper Laudrup' via Django users <django...@googlegroups.com> wrote:
On 06/06/2022 11.16, Mukul Verma wrote:
> Hii,
>
> Help me out in this stuff please, some steps for solve this out
>

Python is a programming language so there's no such thing as a "session
for login and logout".

If you want someone to help you, you should try to clarify what you
actually need help with. I assume you mean something with Django
sessions but it's impossible for me or anyone else to know exactly what
kind of issue you need to solve.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ade6fd19-d942-f5e9-dc9e-1f921d94b648%40stacktrace.dk.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/41e0599f-6f42-4a1a-a8d0-cf51d8ad5a30n%40googlegroups.com.

Re: uvicorn and ASGI

Hi Dan. 

Your question interested me so I went looking. The page you link to further links to the uvicorn documentation which seems to indicate their suggestion for production deployments is to use gunicorn and the uvicorn worker. 

Their rationale seems to be that uvicorn is great at running an event loop and operating asynchronously but the worker process management including increasing and decreasing them and hitless upgrades were managed by gunicorns more mature features here. 

The way I am conceptualising the core benefit here is multi core machines where workers can be thrown into different process threads to utilise all available cores while the asynchronous benefits improve parallelisation of requests where applied to reduce time to run particular views to completion. So they work together for best effect. 

https://www.uvicorn.org/#running-with-gunicorn

Regards
Alexander

Alexander Neilson
Neilson Productions Limited
021 329 681
alexander@neilson.net.nz

On 6/06/2022, at 16:06, Dan Davis <dansmood@gmail.com> wrote:

I am doing some work comparing various ASGI frameworks, SQL Alchemy, just writing the SQL, and that sort of thing, in order to determine what I think.  Speed isn't every thing, but speed is a thing.

Anyway, I was reading about this at https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/uvicorn/ and it is curious that the advise is to run uvicorn as a work rather than a full ASGI server.  Can someone explain why this is necessary or better?

Thanks,

-Dan

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5dbf8350-1c28-4eb1-a3c8-f3a06566a06dn%40googlegroups.com.

Sunday, June 5, 2022

Re: Best approach for audit logging in Django.

i also have the question regarding this, is that i have to create auditing log file for all the activities performing in the project smallest or biggest may you please tell how to initiate this task from beginning.

Thanks
Mukul Verma

On Friday, 3 June 2022 at 23:32:04 UTC+5:30 sutharl...@gmail.com wrote:
Hi Sencer, signals will be helpful only if you are auditing on certain models 
but if you are trying to audit a set of views then middleware will be a better choice since that will be more manageable

On Fri, 3 Jun 2022 at 18:29, Jason <jjohn...@gmail.com> wrote:
one good source when you have a question "is there anything in django that does X?" is to go to djangopackages.org.

https://djangopackages.org/grids/g/model-audit/, for example, is a list of packages for model auditing and history

On Friday, June 3, 2022 at 6:33:37 AM UTC-4 sencer...@gmail.com wrote:
Hi,

I've been planning to add audit logging to the project.

But, I can not decide which approach is the best;
Using signals or creating middleware?

Project needs to being log events on change of model object with these informations below:

- If a record is inserted, updated and deleted:
   - who is taking this action (ForeignKey)
   - what is the action (Choice)
   - which applications model object affected (ContentType)
   - affected object (Generic relation)
   - current data in json format
   - previous data in json format


Kind regards,
Sencer HAMARAT

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f5586723-4e6a-4ce6-93d9-b74cd277dc91n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/415a6eee-74b2-4cbf-b708-2ff15091aeecn%40googlegroups.com.

Re: Nested json in django rest framework

Thanks for your time I've learnt something new from your message and I solved the problem yesterday itself it was my mistake I added the wrong model to serializer

On Sunday, 5 June 2022 at 23:15:47 UTC+5:30 Kasper Laudrup wrote:
On 05/06/2022 07.06, Koushik Romel wrote:
> I want those #One and #Two to be in curly braces {} and not as square
> bracket [] , and Thanks in advance

A good start would be to understand what the difference between square
brackets and curly braces is. The JSON format is very simple:

https://en.wikipedia.org/wiki/JSON#Syntax

So you actually want to convert your array to an object with anonymous
properties/members. That doesn't really make any sense and wouldn't be
valid JSON.

Of course you could write a dirty hack and do it anyway but I seriously
doubt that's really what you want.

Hope that helps.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1e14a36d-0960-4083-a208-9396340c3912n%40googlegroups.com.

Re: ComboBox

Thanks for the responses. 
rgam - I appreciate what you are saying. I think it is roughly what I am doing now, but it is a bit clumsy in that  the user (of a financial application) will typically have a list of regular  customers to select from, and also may have other customers that are one-off, or infrequent which they will not want to clutter their options list with but still need to record against a transaction.
Ryan - thanks, the datalist looks like it might be right option. I will look at custom widgets.

All the best - Phil
On Wednesday, 1 June 2022 at 09:13:11 UTC+1 rgam...@gammascience.co.uk wrote:
Hi

If any arbitrary text is allowable, then at the model level I'd just use a CharField. I wouldn't add a choices= argument to the field unless is the value is strictly constrained to those choice as other test would then fail validation.

At the Form level, I'm not sure. I'd probably work just mirror what the frontend needed.

Does that help ?

On Tue, 2022-05-31 at 09:52 -0700, Phil Parkin wrote:
Hi all

I am converting a desktop application to Django web application. The desktop app uses comboboxes (editable dropdown/select). Is their any elegant way of applying the same functionality in Django? Stack Overflow etc. all seem to be about dropdown select lists only.

I can see ways of doing this with a Choicefield plus a separate Charfield, but is there a better way?

Thanks -Phil 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1b7836ae-e52e-4e35-aefc-739ce6f586d0n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cdd3deef-3f9b-401b-b7df-864848d09086n%40googlegroups.com.

Saturday, June 4, 2022

Re: ComboBox

The HTML element you probably want is a datalist[1]. There's no built-in Django support for datalist[2] so you'll probably need to create a custom widget.

[1] https://stackoverflow.com/a/14614750
[2] https://code.djangoproject.com/ticket/32125

On May 31, 2022 11:52:31 AM CDT, Phil Parkin <philparkin2611@gmail.com> wrote:
Hi all

I am converting a desktop application to Django web application. The desktop app uses comboboxes (editable dropdown/select). Is their any elegant way of applying the same functionality in Django? Stack Overflow etc. all seem to be about dropdown select lists only.

I can see ways of doing this with a Choicefield plus a separate Charfield, but is there a better way?

Thanks -Phil