Re: Digest for django-users@googlegroups.com - 1 update in 1 topic

2023-08-30 Thread johnc711
kthrough/notification?email=johnc...@gmail.com&id=01H938JWJW3M4KAR7Y47711RQ0> AwayMail helps you auto-mange your email when you are away. Get Away django-users@googlegroups.com Google Groups Topic digest View all topics SEEKING REMOTE INTERNSHIPS - 1 Update SEEKING REMOTE INTERNSHIPS OGUNDEKO ABDU

Update in django value

2023-03-07 Thread Prashanth Patelc
How to update single record particular value in django.. h_date=Holiday.objects.filter(start_date=month_start,end_date=month_end).values_list('date',flat=True) for h_date in holiday: Model.objects.filter(emp=request.user). update(date =h_date,in_time=None) This above query is up

Re: Digest for django-users@googlegroups.com - 1 update in 1 topic

2023-02-18 Thread Ryan Austin
blog:  https://nsikakimoh.com/blog/learn-about-get_or_create-and-update_or_create. Hope that helps. On Feb 18, 2023, 8:01 AM -0500, django-users@googlegroups.com, wrote: > django-users@googlegroups.com Google Groups > Topic digest > View all topics > > • Orm query - 1 Updat

Re: Update from 3.9 to 3.10.8 and uninstall 3.9

2022-10-24 Thread Mike Dewhirst
B N Date: 24/10/22 19:27 (GMT+10:00) To: Mike Dewhirst Subject: Re: Update from 3.9 to 3.10.8 and uninstall 3.9 Thank you, that was quick.. My problem is/are the technical terms such as path and environment . It took me about 10 hours, (I am retired so have time), to upgrade to Spyder 5.3

Re: @cache_control decorator fails after update to 4.0.5

2022-06-22 Thread Matthew Hegarty
OK, silly me. I should have paid more attention to the message. This fixes it: @method_decorator(cache_control(max_age=60 * 60 * 24, immutable=True, public=True), name='dispatch') On Wednesday, 22 June 2022 at 12:51:18 UTC+1 Matthew Hegarty wrote: > Hi All > > I'm upgrading to 4.0.5 from 3.2.

@cache_control decorator fails after update to 4.0.5

2022-06-22 Thread Matthew Hegarty
Hi All I'm upgrading to 4.0.5 from 3.2.13 My integration test fails: class FaviconTests(SimpleTestCase): def test_get(self): response = self.client.get("/favicon.ico") self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response["Cache-Control"], "m

Re: i am facing problem with my project to update data in mysql using django

2022-06-20 Thread andrew snyder
can you conform that database user has permissions to update data in all three databases using a mysql client? On Thursday, June 16, 2022 at 12:02:00 PM UTC-4 rafiurra...@gmail.com wrote: > here is my problem description link in stackoverflow > if anyone can help me, i will be gra

i am facing problem with my project to update data in mysql using django

2022-06-16 Thread rafiur rahman rafit
here is my problem description link in stackoverflow if anyone can help me, i will be gratefull linkproblem link <https://stackoverflow.com/questions/72644894/why-i-can-not-able-to-update-my-data-in-django> -- You received this message because you are subscribed to the Google Groups &

Re: Auto Template Update

2022-05-31 Thread Ryan Nowakowski
There's a couple of ways to update the UI without the user doing anything. First, you can poll the server at a regular interval using JavaScript. Second, you can use a websocket to push updates from the server to the client. On May 30, 2022 6:28:40 AM CDT, Dev femibadmus wrote: >fine

Auto Template Update

2022-05-30 Thread Dev femibadmus
fine! we can submit form with ajax, and update little tag b cant update all. *Instagram* auto update likes, new post, message or even notification without any event, even if a event itself action how possible to update differents post likes, notification blah blah blah blah blah..*How

Multiple Update Tasks

2022-05-25 Thread Trippy Samurai
(serializers.ModelSerializer): class Meta: model = Task fields = ( 'is_done', ) def update(self, instance, validated_data): person = self.context['request'].user.person task_is_done = validated_data.

Re: Abridged summary of django-users@googlegroups.com - 1 update in 1 topic

2022-05-23 Thread Madhav kapadia
> >- Django SMS project <#m_8380133182519162853_group_thread_0> - 1 Update > > Django SMS project > <http://groups.google.com/group/django-users/t/5c1cd9921e0c30ec?utm_source=digest&utm_medium=email> > Benjamin Schollnick : May 22 09:41AM -0400 > > >

Re: Image Update not Working in Production, Please Help

2022-05-18 Thread Kasper Laudrup
On 15/05/2022 03.15, Wisdom Ugochukwu wrote: I hosted a Django project on Name Cheap, it works well on development, but on going live I noticed image creation and update is not working here is the error I'm getting! Please kindly help /lib64/libc.so.6: version `GLIBC_2.14' not found

Image Update not Working in Production, Please Help

2022-05-15 Thread Wisdom Ugochukwu
I hosted a Django project on Name Cheap, it works well on development, but on going live I noticed image creation and update is not working here is the error I'm getting! Please kindly help ImportError at /admin/store/otherimages/2/change/ /lib64/libc.so.6: version `GLIBC_2.14'

Re: How to allow user only update who belong to that post ?

2022-04-07 Thread Lakshyaraj Dash X-D 25
7, 2022, 23:14 Kasper Laudrup wrote: > On 07/04/2022 09.57, OG TV wrote: > > Hello everybody Please kindly help me out for my Django project I try to > > update the post from the specific admin but even i'm not belong to that > > post but i'm still can update that pos

Re: How to allow user only update who belong to that post ?

2022-04-07 Thread Kasper Laudrup
On 07/04/2022 09.57, OG TV wrote: Hello everybody Please kindly help me out for my Django project I try to update the post from the specific admin but even i'm not belong to that post but  i'm still can update that post so the point is I want to allow user can only update the post

Re: How to allow user only update who belong to that post ?

2022-04-07 Thread John Dollosa
rojectSerializer > > permission_classes = ( > permissions.UpdateOwnPost, > IsAuthenticated, > ) > > Hope this helps. > > On Thursday, 7 April 2022 at 20:20:31 UTC+8 phans...@gmail.com wrote: > >> Hello everybody Please kindly help me out for my Djang

Re: How to allow user only update who belong to that post ?

2022-04-07 Thread John Dollosa
uot; authentication_classes = (TokenAuthentication,) serializer_class = serializers.ProjectSerializer permission_classes = ( permissions.UpdateOwnPost, IsAuthenticated, ) Hope this helps. On Thursday, 7 April 2022 at 20:20:31 UTC+8 phans...@gmail.com wrote: > Hello everybody Please k

How to allow user only update who belong to that post ?

2022-04-07 Thread OG TV
Hello everybody Please kindly help me out for my Django project I try to update the post from the specific admin but even i'm not belong to that post but i'm still can update that post so the point is I want to allow user can only update the post who belong to that post I meant wh

Re: Update to Tutorial 4 - Generic Views

2022-03-11 Thread Heman Okumbo
on your way towards becoming a great developer. On Fri, Mar 11, 2022, 18:48 Antonis Christofides < anto...@antonischristofides.com> wrote: > Hello, > > why do you say that importing of TemplateView is missing? I don't see > TemplateView being used anywhere in that page. > > Regards, > > Antonis >

Re: Update to Tutorial 4 - Generic Views

2022-03-11 Thread Antonis Christofides
Hello, why do you say that importing of TemplateView is missing? I don't see TemplateView being used anywhere in that page. Regards, Antonis Antonis Christofides +30-6979924665 (mobile) On 11/03/2022 07.42, Dan Cox wrote: Hi I've been searching on how I might contribute to the tutorials bu

Update to Tutorial 4 - Generic Views

2022-03-11 Thread Dan Cox
Hi I've been searching on how I might contribute to the tutorials but I can't seem to find a way. If you could help me there I could take this question to a potentially more useful place. Anyway; I am pretty new to Django but I've been following the tutorials and in the Generic Views section h

Re: How to trigger a function with an update view

2022-02-13 Thread 'MH' via Django users
self).save(commit=False) > instance.flag1 = 'flag1' in self.cleaned_data['multi_choice'] # etc > if commit: > instance.save() > return instance > > > 'MH' via Django users schrieb am Sa., 12. > Feb. 2022, 22:11: > >>

Re: How to trigger a function with an update view

2022-02-13 Thread Sebastian Jung
ce 'MH' via Django users schrieb am Sa., 12. Feb. 2022, 22:11: > Hi > > I have an update view which enables me via a form to update the data for a > particular model object instance (as it should do). However, when a > particular field gets changed I would not only need

How to trigger a function with an update view

2022-02-12 Thread 'MH' via Django users
Hi I have an update view which enables me via a form to update the data for a particular model object instance (as it should do). However, when a particular field gets changed I would not only need to update the fields in the database, but I would need the save routine of the update view to

Request result update only if I change even one character... Strange... :s

2022-01-08 Thread Sébastien Denooz
Hello to all of you, I have a very strange behavior that I do not understand and that I will try to explain here: *Global situation:* School management website. *Expected comportment:* User show student amout: 10. User Add 5, return to app, pull down to refresh and see 15. *Actual comportment

Re: How to update part of a JSONField with a computed value?

2021-12-07 Thread Bazil M H
t; which contains a simple dict (actually, a Django formset :-)). I would like > to update just one value in the dict. I can get this to work when the new > value is a hardcoded numeric 333 (quoted, as seems to be needed) like this: > > pay_items.update(inputs=JSONBSet('inp

How to update data without using the API

2021-11-12 Thread Antonio Stan
Hey, so i have 2 models, one for cars and one for transactions. I would appreciate if anyone could help me. When i create a transaction, i need to update the sum of prices in the cars model (i have a foreignkey allocated to cars id which goes into the transaction). So, how could i update the

Re: How to update old data with new data everyday from a scraper

2021-09-19 Thread Adib Neymar Jr.
obj = Hackathon(**each_dict) obj.save() On Saturday, September 18, 2021 at 10:31:46 AM UTC-4 J.T. wrote: > Take a look at update_or_create() > > > https://docs.djangoproject.com/en/3.2/ref/models/querysets/#update-or-create > > On Sat, Sep 18, 2021, 9:27 AM Adib Neymar Jr. wrote: >

Re: How to update old data with new data everyday from a scraper

2021-09-18 Thread Jason Turner
Take a look at update_or_create() https://docs.djangoproject.com/en/3.2/ref/models/querysets/#update-or-create On Sat, Sep 18, 2021, 9:27 AM Adib Neymar Jr. wrote: > Hello, > > What is a good way to compare new data with old data which is updated > everyday with Django ORM? Basica

How to update old data with new data everyday from a scraper

2021-09-18 Thread Adib Neymar Jr.
Hello, What is a good way to compare new data with old data which is updated everyday with Django ORM? Basically I have a scraper which fetches hackathons everyday (basically just a celery task) and I want the newest to be unioned it with my master database which has the latest fetched hackathons

Re: What is the difference bulk_update() and update() in django queryset.

2021-08-18 Thread M. GW
bulk_update() is a method that updates the provided list of objects into the database with one query. and update() is just for one object ambiti...@gmail.com schrieb am Donnerstag, 12. August 2021 um 00:03:25 UTC+2: > What is the difference bulk_update() and update() in django query

What is the difference bulk_update() and update() in django queryset.

2021-08-11 Thread Am bition
What is the difference bulk_update() and update() in django queryset. -- 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+unsubscr...@google

Re: Suggestions for update

2021-08-07 Thread Billy Muller
Wait.. there's a django discord server? How do I find it? On Tuesday, June 8, 2021 at 3:28:52 AM UTC-4 swiss...@gmail.com wrote: > Hi and thanks to everyone, I have a few opinions and suggestions I would > like to talk about which if possible I would also be part of contributors. > > We are all

How to update part of a JSONField with a computed value?

2021-08-04 Thread Shaheed Haque
Hi, I'm using Django 3.2 on Postgres12, and I have a model with a JSONField which contains a simple dict (actually, a Django formset :-)). I would like to update just one value in the dict. I can get this to work when the new value is a hardcoded numeric 333 (quoted, as seems to be needed)

Re: 2.2.* to 3.2.5 update: jsonb deserialisation is broken!

2021-08-01 Thread Jason
going from 2.2.x to 3.2 is three separate releases of django. That's alot to go in one jump. Might help if you update one release at a time and narrow down which version this regression is in. In addition, I'd check the changelogs for each version and see what, if any, might app

2.2.* to 3.2.5 update: jsonb deserialisation is broken!

2021-08-01 Thread Tim Richardson
[{...line1...},{...line2...}] this has always worked; this django project has always been on 2.2.x I use this code in production on a variety of postgresql datbase from v 9.6 to v12. As soon as I update to 3.2.5, I no longer get a dict. Instead, I get a string which is json. I have downgraded

Suggestions for update

2021-06-08 Thread Williams Andy Inc
Hi and thanks to everyone, I have a few opinions and suggestions I would like to talk about which if possible I would also be part of contributors. We are all Django users, there are many professionals here and also there are beginners and learners too, like myself a learner too. I am on a dis

Re: After user click on like button page should not refresh(redirect) and update count of likes

2021-05-05 Thread Aadil Rashid
You need write Ajax for this functionality to implement On Wed, 5 May, 2021, 6:40 PM Derek, wrote: > You'll need to use javascript for this - have a look at > https://data-flair.training/blogs/ajax-in-django/ for an example. > > On Wednesday, 5 May 2021 at 05:30:59 UTC+2 sali...@rohteksolutions.

Re: After user click on like button page should not refresh(redirect) and update count of likes

2021-05-05 Thread Derek
You'll need to use javascript for this - have a look at https://data-flair.training/blogs/ajax-in-django/ for an example. On Wednesday, 5 May 2021 at 05:30:59 UTC+2 sali...@rohteksolutions.com wrote: > When user click to like a post the web page should not refresh(redirect) > and count of the

After user click on like button page should not refresh(redirect) and update count of likes

2021-05-04 Thread Salima Begum
When user click to like a post the web page should not refresh(redirect) and count of the likes should be updated. How can I achieve this please help me. Here is my block of code ``` ``` views.py ``` def post_comment_like(request, id): if (request.session.

unable to update pdf and edit category.

2021-03-31 Thread Israr Hussain Rao
ter(Category_name =Category_Name).exists(): Category(Category_name=Category_Name).save() # createing a new category elif action=='update': Category.objects.filter(uuid =Category_Uuids[index]).update(Category_name=Category_Name)#UPDATE

Re: How to set daily update limit for django model(db)?

2021-02-13 Thread Chetan Ganji
Hi Shailesh, I am assuming you have created_at and updated_at fields (these or similar) on the model. You can write a query like below to get the count of no of rows updated that day using below code. Remember to update the filters of the queryset as required e.g. user. from django.utils import

Re: How to set daily update limit for django model(db)?

2021-02-04 Thread Shailesh Yadav
"Problem hai kuch to") >>> >>> return render(request,'app/uploadcts.html') >>> >>> On Friday, January 22, 2021 at 10:45:54 PM UTC+5:30 >>> gabriela...@gmail.com wrote: >>> >>>> Previous, you can use: >>>

Re: How to set daily update limit for django model(db)?

2021-01-25 Thread Jaimik Patel
ount() >>> >>> Also you can use xlrd library, for instance: >>> import xlrd >>> >>> #open excel file >>> documento = xlrd.open_workbook("ejemplo.xls") >>> >>> #We can save each one of the spreadsheet separately >>>

Re: How to set daily update limit for django model(db)?

2021-01-22 Thread Gabriel Araya Garcia
the spreadsheet separately >> libros = documento.sheet_by_index(0) >> peliculas = documento.sheet_by_index(1) >> >> On the other hand, the model has not contains records, it's only an >> structure definition of a table >> >> >> Gabriel Araya Garci

Re: How to set daily update limit for django model(db)?

2021-01-22 Thread Shailesh Yadav
briel Araya Garcia > GMI - Desarrollo de Sistemas Informáticos > > > > > El vie, 22 ene 2021 a las 12:58, Shailesh Yadav () > escribió: > >> Hi I'm having one Django web app where My *model A *contains 1000 >> records and I want to set a daily update limit for exa

Re: How to set daily update limit for django model(db)?

2021-01-22 Thread Gabriel Araya Garcia
7;m having one Django web app where My *model A *contains 1000 records > and I want to set a daily update limit for example if users are updating > that data by uploading a .xls file then it should count how many records > updated and once it is more than 500 then the user should get an E

How to set daily update limit for django model(db)?

2021-01-22 Thread Shailesh Yadav
Hi I'm having one Django web app where My *model A *contains 1000 records and I want to set a daily update limit for example if users are updating that data by uploading a .xls file then it should count how many records updated and once it is more than 500 then the user should get an

Re: Django Admin, how to update select user field with my own queryset after adding new foreign object

2021-01-08 Thread Mike Dewhirst
On 9/01/2021 5:58 am, Héctor Alonso Lozada Echezuría wrote: Best regards I have a very simple warehouse model that is related to the contrib.auth.User model through the asigned_seller field which should only allow those users with the seller role class PersonalWarehouse(ProductsMixin, Wareh

How to set daily Update limit on Django model

2021-01-04 Thread Shailesh Yadav
<https://stackoverflow.com/posts/65565954/timeline> I'm new to Django. I have created one Django App where users can update their Shift Timing(Morning/Evening/General) and based on this Shift Timing I am taking real-time data from Django Model and running Linux script which will be

Re: Wants to make webpage auto reload whenever database is update.

2020-09-19 Thread Unnati C
1 PM UTC+5:30, yingi keme >>>> wrote: >>>>> >>>>> You can use channels. Check out channels in django. It is a websocket >>>>> library and it will be useful for what you are looking for >>>>> >>>>> Yingi Kem

Re: Wants to make webpage auto reload whenever database is update.

2020-09-19 Thread Saurabh Pandey
ill be useful for what you are looking for >>>> >>>> Yingi Kem >>>> >>>> On 25 Nov 2017, at 4:55 PM, Unnati C wrote: >>>> >>>> Web page is about *displaying data from database*, Till now webpage is >>>> displayi

Re: Django and PostgreSQL update

2020-09-17 Thread Oussama Ben Rejeb
u can do a data dump before, but i think that there is no problem to update it On Thursday, September 17, 2020 at 2:29:46 PM UTC+2 dupakoo...@gmail.com wrote: > Hello everyone, > > I have a small database. Django version currently 2.2, postgres 9.2.24. I > forgot to note the ps

RE: Django and PostgreSQL update

2020-09-17 Thread dupakoor kannan
Hello everyone, I have a small database. Django version currently 2.2, postgres 9.2.24. I forgot to note the psycopg2 older version. It was working fine. I have updated django to 2.2.26 and psycopg2==2.8.3. Also, I made changes in my model and migrated. I come across this error during migration.

Re: Django ORM Model meta internal API to current API update

2020-09-08 Thread Shaheed Haque
On Tue, 8 Sep 2020 at 03:54, Asif Saif Uddin wrote: > any help? I can share the full function > I've poked around some of these dark corners, but only since the late 2.x series. After a bit of searching this find-the-field-that-connects-a-model-to-a-through-model

Re: Django ORM Model meta internal API to current API update

2020-09-07 Thread Asif Saif Uddin
any help? I can share the full function On Wednesday, August 19, 2020 at 3:42:09 AM UTC+6 vickkymb...@gmail.com wrote: > I don't bro i just started new in Django > > Victor > > On Tue, Aug 18, 2020, 3:46 PM Asif Saif Uddin wrote: > >> >> Hi, >> I have got an old project of django 1.8 which use

Re: Django ORM Model meta internal API to current API update

2020-08-18 Thread Mbah Victor
I don't bro i just started new in Django Victor On Tue, Aug 18, 2020, 3:46 PM Asif Saif Uddin wrote: > > Hi, > I have got an old project of django 1.8 which use codes like > > links = [rel.get_accessor_name() for rel in > self._meta.get_all_related_objects()] > > How would I upgrade this code s

Django ORM Model meta internal API to current API update

2020-08-18 Thread Asif Saif Uddin
Hi, I have got an old project of django 1.8 which use codes like links = [rel.get_accessor_name() for rel in self._meta.get_all_related_objects()] How would I upgrade this code snippets to django 2.2 LTS? TIA -- You received this message because you are subscribed to the Google Groups "Djan

reg: error after I update my user profile page successfully

2020-07-29 Thread 'Amitesh Sahay' via Django users
Hello All,  I have been facing a very notorious issue. I say notorious because, I do not see any issue with my back-end functionality. I have developed a method to update the default User model field(email), and other extended User model(custom fields like country, state, phone etc). Below is

Update a template

2020-07-28 Thread Samuel Nogueira
Hi folks, I’m facing a problem in my template and it’s respective view.  Basically , in my template I have a list of objects displayed  with no filters whatsoever and I want to add a button that triggers an action wich filters the same list of objects. How can I do that? ---

Re: Using primary key to update via POST request.

2020-07-21 Thread Liu Zheng
Hi, do you mean in the GET request, the user provides the pk (perhaps in URL) or the server sends to users an object where pk is a field? If it's the former, then @George's answer is the right one. An example of what you are trying to achieve will be helpful. Best Zheng On Tue, Jul 21, 2020 at 1

Re: Using primary key to update via POST request.

2020-07-20 Thread George
You use request.GET['choice_filed'] On Monday, July 20, 2020 at 9:14:48 AM UTC+5:30, Arpana Mehta wrote: > > Hi, > I have a class with a GET and a POST request. I am sending the data ( with > pk of the object ) in my GET request and I want the frontend to use that pk > to refer to the exact inst

Using primary key to update via POST request.

2020-07-19 Thread Arpana Mehta
Hi, I have a class with a GET and a POST request. I am sending the data ( with pk of the object ) in my GET request and I want the frontend to use that pk to refer to the exact instance of the model whenever doing any operation. In my POST request I am only sending the `choice field` value. How do

how to update inlineformset in class based view

2020-06-16 Thread hunar
hi i want to update my formset , but it only update my parent model https://stackoverflow.com/questions/62408161/how-to-update-multiple-forms-in-one-go <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_te

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread hajar Benjat
>>>>>>> CASCADE,related_name="mail_item_event_cd") >>>>>>>office_Evt_cd = models.ForeignKey(Office,on_delete=models.CASCADE, >>>>>>> related_name='office_Ev') >>>>>>> Date_Evt = models.DateTimeFiel

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread Motaz Hejaze
t;>>>>>Pays_origine = models.ForeignKey(Pays, on_delete=models.CASCADE , >>>>>> related_name='paysOrigine') >>>>>>Pays_destination = models.ForeignKey(Pays,on_delete=models.CASCADE >>>>>> ,related_name='paysDest

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread hajar
Pays_origine = models.ForeignKey(Pays, on_delete=models.CASCADE , >>>>> related_name='paysOrigine') >>>>>Pays_destination = models.ForeignKey(Pays,on_delete=models.CASCADE, >>>>> related_name='paysDestination') >>>>>

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread Motaz Hejaze
DateTimeField() >>>>Pays_origine = models.ForeignKey(Pays, on_delete=models.CASCADE , >>>> related_name='paysOrigine') >>>>Pays_destination = models.ForeignKey(Pays,on_delete=models.CASCADE, >>>> related_name='paysDestination

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread Uri Kogan
='paysDestination') >>>Expediteur_id = models.ForeignKey(Client,on_delete=models.CASCADE, >>> related_name='expedi') >>>Destinateur_id = models.ForeignKey(Client,on_delete=models.CASCADE, >>> related_name='destin') >>

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread hajar
Client,on_delete=models.CASCADE, >> related_name='expedi') >> Destinateur_id = models.ForeignKey(Client,on_delete=models.CASCADE, >> related_name='destin') >> >> >> >> Le mardi 12 mai 2020 06:43:43 UTC+1, hajar a écrit : >>> &

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-12 Thread Uri Kogan
y(Pays,on_delete=models.CASCADE, > related_name='paysDestination') >Expediteur_id = models.ForeignKey(Client,on_delete=models.CASCADE, > related_name='expedi') >Destinateur_id = models.ForeignKey(Client,on_delete=models.CASCADE, > related_name='destin

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-11 Thread hajar
7;) Expediteur_id = models.ForeignKey(Client,on_delete=models.CASCADE, related_name='expedi') Destinateur_id = models.ForeignKey(Client,on_delete=models.CASCADE, related_name='destin') Le mardi 12 mai 2020 06:43:43 UTC+1, hajar a écrit : > > hello django u

Re: Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-11 Thread Uri Kogan
I think, for that you'll have to show your "mail_item" model too. On Tuesday, May 12, 2020 at 8:43:43 AM UTC+3, hajar wrote: > > hello django users , > > I am trying to update a class using signals , you will understand once you > see the code below > >

Tried to update field X with a model instance, < X >. Use a value compatible with CharField.

2020-05-11 Thread hajar
hello django users , I am trying to update a class using signals , you will understand once you see the code below class mail_item_count(models.Model): country = models.CharField(max_length=100) count = models.IntegerField(default=1) def __str__(self): return

Django signal to perform update on field when updating m2m field's object.

2020-04-29 Thread surya bhusal
https://stackoverflow.com/questions/61503270/how-to-update-model-field-using-django-signals-when-updating-object-in-m2m-field -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Re: NoReverseMatch at /update-orders/12 Reverse for 'update_order' with arguments '('',)' not found. 1 pattern(s) tried: ['update\\-orders/(?P[0-9]+)$']

2020-04-24 Thread Raja Sekar Sambath
Sergei Sokov wrote: > Hello everybody > > I have a problem: > > NoReverseMatch at /update-orders/12 > > Reverse for 'update_order' with arguments '('',)' not found. 1 pattern(s) > tried: ['update\\-orders/(?P[0-9]+)$'] > > R

Re: NoReverseMatch at /update-orders/12 Reverse for 'update_order' with arguments '('',)' not found. 1 pattern(s) tried: ['update\\-orders/(?P[0-9]+)$']

2020-04-23 Thread Anonymous Patel
join that as well https://youtu.be/RPl-3CqTjQE Raj Patel On Thu, 23 Apr, 2020, 11:59 pm Sergei Sokov, wrote: > Hello everybody > > I have a problem: > > NoReverseMatch at /update-orders/12 > > Reverse for 'update_order' with arguments '('',)' not

NoReverseMatch at /update-orders/12 Reverse for 'update_order' with arguments '('',)' not found. 1 pattern(s) tried: ['update\\-orders/(?P[0-9]+)$']

2020-04-23 Thread Sergei Sokov
Hello everybody I have a problem: NoReverseMatch at /update-orders/12 Reverse for 'update_order' with arguments '('',)' not found. 1 pattern(s) tried: ['update\\-orders/(?P[0-9]+)$'] Request Method: GET Request URL: http://192.168.0.249:8000/update-o

Re: Web page -form-update - not working

2020-04-18 Thread Kasper Laudrup
On 18/04/2020 17.58, Body Abdo wrote: Hi all; I have a problem when edit my form ... my page doesn't update I would start by not ignoring all errors like you do with: except: pass Errors should be handled or at least logged, not ignored. That would most likely tell you why it&

Web page -form-update - not working

2020-04-18 Thread Body Abdo
Hi all; I have a problem when edit my form ... my page doesn't update models.py class Hard_number(models.Model): hard = ( ('SD1', 'SDD1'), ('SD2', 'SDD2'), ('SD3', 'SDD3'), ('SD4', '

Re: Update on a ModelChoiceField using Models Forms

2020-01-29 Thread Crissy Ball
the reflected data that was > previously saved, so that the user decides if he wants to update it or not. > > This is my ModelForm > [image: image.png] > > So you sent the form according > [image: image.png] > > result > [image: image.png] > > But the data th

Update on a ModelChoiceField using Models Forms

2020-01-29 Thread Tatiana Mesa
Hi community, I have a ModelChoice and when updating that field that is in that select in the view (HTML), I would like to see the reflected data that was previously saved, so that the user decides if he wants to update it or not. This is my ModelForm [image: image.png] So you sent the form

Update en un ModelChoiceField utilizando Models Forms

2020-01-29 Thread Tatiana Mesa
Hola comunidad, Tengo un ModelChoice y al momento de actualizar ese campo que esta en ese select en el vista (HTML), quisiera que se viera el dato reflejado que estaba guardado anteriormente, para que el usuario decida si lo quiere actualizar o no. Este es mi* ModelForm* [image: image.png] Así

m2m field widget to add or update data as inline formset

2020-01-28 Thread Suraj
Hello everyone, This may be quite simple, but I am unable to find a widget which will function same as m2m widget of django, but will also create new model instance if it doesn't exists. E.g. If I had models as: class Outcome(models.Model): outcome = models.CharField(max_length=255) out

How can i update a choice value in Model Field

2019-12-30 Thread Yash Garg
max_length=8,null=False,blank=False,choices=APPROVAL_CHOICES, default='Approved') i wants to update value of approval_status field from views.py- if Splash.objects.filter(ip_address = ipaddress).exists(): obj.approval_status = 'Pending' i also tried- obj.approval_status =

Update value in database

2019-12-19 Thread Nuno Vieira
sends the id of the property and the field name to update (delete) on database. function delete_img(i){ var prim_key = document.getElementById('list_id').value; var id_number = i.id; $.ajax({ type: 'GET',

Re: how to update many to many fields in django?

2019-12-15 Thread Motaz Hejaze
Call me on skype lets see your code and your problem .. My skype : m3tz-hjze On Sun, 15 Dec 2019, 5:49 pm Ahmad Ebrahim, wrote: > I'm struggling with this problem for 2 weeks please help me. > > > https://stackoverflow.com/questions/59269426/how-to-update-many-to-many-fie

how to update many to many fields in django?

2019-12-15 Thread Ahmad Ebrahim
I'm struggling with this problem for 2 weeks please help me. https://stackoverflow.com/questions/59269426/how-to-update-many-to-many-fields regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Update _id field before .save() for ForeignKey

2019-11-30 Thread Dvenum
Thanks, its interest to know more about pk management, but this is another case. Now I update pk for child objects and this is fastest way, what I found. If django will reread .pk before save, it will the same. Want to know, maybe my logic can be altered from the start. How peoples create batch

Re: Update _id field before .save() for ForeignKey

2019-11-30 Thread Integr@te System
reate(companies) >>> #company.id is 1 >>> >>> Instead to ask pk from database, it can be used from >>> company_value.company.id. Django save pk value to internal meta >>> (models/base.py) and does not update it. This works too: >>> value.compan

Re: Update _id field before .save() for ForeignKey

2019-11-30 Thread Dvenum
not necessary: >> company = Company() >> #company.id is None >> companies.append(company) >> Company.objects.bulk_create(companies) >> #company.id is 1 >> >> Instead to ask pk from database, it can be used from >> company_value.company.id.

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Integr@te System
any.id is None > companies.append(company) > Company.objects.bulk_create(companies) > #company.id is 1 > > Instead to ask pk from database, it can be used from > company_value.company.id. Django save pk value to internal meta > (models/base.py) and does

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Dvenum
internal meta (models/base.py) and does not update it. This works too: value.company = value.company # pk updated I want to ask, each child object should be created only when parent is saved to db? Maybe django has something to cover this case? On Sat, Nov 30, 2019 at 7:52 AM Charles Lee wrote

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Charles Lee
is slowly enough. I have two ways to resolve: > 1. I can make intermediate class or tuple and create CompanyValue objects > only when companies is saved to db. Hard to support, hard to filter, not so > clean. > 2. I can use dirty hack to update _id field: > for v in values: >

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Charles Lee
is slowly enough. I have two ways to resolve: > 1. I can make intermediate class or tuple and create CompanyValue objects > only when companies is saved to db. Hard to support, hard to filter, not so > clean. > 2. I can use dirty hack to update _id field: > for v in values:

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Dvenum
to filter objects >> and can do it only when all of them are collected. Also, it has performance >> issues 100k+ of requests is slowly enough. I have two ways to resolve: >> 1. I can make intermediate class or tuple and create CompanyValue objects >> only when companies is saved t

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Integr@te System
hen all of them are collected. Also, it has performance > issues 100k+ of requests is slowly enough. I have two ways to resolve: > 1. I can make intermediate class or tuple and create CompanyValue objects > only when companies is saved to db. Hard to support, hard to filter, not so >

Update _id field before .save() for ForeignKey

2019-11-29 Thread Maxim Bulatov
I have two ways to resolve: 1. I can make intermediate class or tuple and create CompanyValue objects only when companies is saved to db. Hard to support, hard to filter, not so clean. 2. I can use dirty hack to update _id field: for v in values: v.company = v.company Can you advice mor

Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-27 Thread Patrick Carra
okay so I dumped all the contents of my editCircuit.html into a file called circuitinfotable_form.html and now I get my form. But I still don't understand why I had to use this name since I never specified it anywhere. -- You received this message because you are subscribed to the Google Group

  1   2   3   4   5   6   7   8   9   10   >