Re: Django Admin Custom View Query Generation

2020-04-26 Thread Ram
Hello Derek, Thanks for providing good references for Django Admin Customization. I'm looking for a way to customize the following requirements. I thought you might have some idea of how to achieve this. 1. We extract data from XML files and upload the data into our Django based web app but we

Re: Django ORM query with joins

2020-03-30 Thread Anoop Thiparala
id', 'details', 'user__name' ) >> >> On Mon, 30 Mar 2020, 5:26 pm Anoop Thiparala, > > wrote: >> >>> I need help with a django query...I have two models >>> >>> 1)* POSTS* >>> ==>id >>> ==>details >>> ==>user(fore

Re: Django ORM query with joins

2020-03-30 Thread Suraj Thapa FC
Sorry its like this... posts.objects.values('id', 'details', 'user__name' ) On Mon, 30 Mar 2020, 7:46 pm Suraj Thapa FC, wrote: > posts.model.values('id', 'details', 'user__name' ) > > On Mon, 30 Mar 2020, 5:26 pm Anoop Thiparala, > wrote: > >> I need help with a djan

Re: Django ORM query with joins

2020-03-30 Thread Suraj Thapa FC
posts.model.values('id', 'details', 'user__name' ) On Mon, 30 Mar 2020, 5:26 pm Anoop Thiparala, wrote: > I need help with a django query...I have two models > > 1)* POSTS* > ==>id > ==>details > ==>user(foreign key to user table) > > 2) *USER* > ==>i

Django ORM query with joins

2020-03-30 Thread Anoop Thiparala
I need help with a django query...I have two models 1)* POSTS* ==>id ==>details ==>user(foreign key to user table) 2) *USER* ==>id ==>email ==>name *SQL VERSION:* SELECT POSTS.ID, POSTS.DETAILS, USER.NAME FROM POSTS, USER WHERE POSTS.USER == USER.ID; I require these d

Extracting Month from date during a query

2020-03-22 Thread Eswar Subramanyam
, as if Djongo ORM i use doesnt implement this function. Can anyone hint me on how to keep the grouping by month at this query level without having to do it manually at the serverside or client side ? Thank you Es. -- You received this message because you are subscribed to the Google

Regarding the postgres sql query

2020-03-20 Thread Devendra reddy
Hi to all , Help me to fix this problem . Into the table the data is inserting for every 5 minutes. But I want to get the data for every one hour from the table and want to send the response to the JSON or UI . Thanks and regards Devendra. -- You received this message because you are

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread mohamed alisaleh...@gmail.com
بتاريخ الأربعاء، 19 فبراير، 2020 10:51:53 م UTC+3، كتب Ricardo H: > Hi Simon,  > > > It was ok on 2.2.6, only on 3.0.3 it fails. > > > I use BigIntegerField because I use it for some calculations after that, but > even if I try with DurationField it doens't assert right. > > > Definitely

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Simon Charette
Hello Ricardo, I suggest you follow these docs to submit your bug report and link to this thread. https://docs.djangoproject.com/en/3.0/internals/contributing/bugs-and-features/#reporting-bugs I'd mention that the issue is also present if you use `output_field=DurationField` as

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Ricardo H
Hi Simon, It was ok on 2.2.6, only on 3.0.3 it fails. I use BigIntegerField because I use it for some calculations after that, but even if I try with DurationField it doens't assert right. Definitely must be caused by this patch, if I can't find another solution, where and how should I

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Simon Charette
ed django from 3.0.2 to 3.0.3 the result of the > following code has changed when using a MySQL database. It produces a wrong > sql query and also the wrong result for "*end_total_time"* attribute. > Is this a bug ? also is there any other way to get the wright result us

Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Ricardo H
Hello, after I updated django from 3.0.2 to 3.0.3 the result of the following code has changed when using a MySQL database. It produces a wrong sql query and also the wrong result for "*end_total_time"* attribute. Is this a bug ? also is there any other way to get the wright result us

Front end solution to run SQL query in django

2020-02-08 Thread oliseh obiajuru
I am trying to create a query builder, I have seen SQL explore which is a package but I can't bring it to the front end of my app. I need help please -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: Django Simple Query very slow at thousand data.

2020-02-07 Thread Aldian Fazrihady
Using the way you specify model in your view, the resulting query won't be efficient. On each loop in your template, the foreign keys will be automatically queried, which is the cause of the slowness. You need to override the get_queryset method of your view and generate the ORM query

Re: Django Simple Query very slow at thousand data.

2020-02-07 Thread Motaz Hejaze
, 6:57 pm Eric Kiser, wrote: > Okay so I've used django on two of my projects with the following criteria: > > Hosted @: PythonAnywhere > Database: MySQL and SQLite > > PROBLEM: At first with a few hundred data the query is okay, but when I am > querying 2,000 of data it ta

Re: Django query with few data(1,000-3,000) takes too long(1min) to load

2020-02-07 Thread Stephen J. Butler
You've got a lot of foreign key fields where the fetch is being deferred until template render time, and it being done individually for each row instead of in bulk. I think if you added this attribute to your ListView subclass you'd see better performance: queryset =

Django Simple Query very slow at thousand data.

2020-02-07 Thread Eric Kiser
Okay so I've used django on two of my projects with the following criteria: Hosted @: PythonAnywhere Database: MySQL and SQLite PROBLEM: At first with a few hundred data the query is okay, but when I am querying 2,000 of data it takes 3 minutes to load it on a simple table. This is not normal

Django query with few data(1,000-3,000) takes too long(1min) to load

2020-02-07 Thread Eric Kiser
I created an app with the following details: Hosting: PythonAnywhere Database: SQLite and MySQL Problem: When I load the data in a table it takes minutes to load it. My data hasn't even reached a million its just a few thousands. How I did it: models.py class Outgoing(models.Model):

How to do an override of fields based on it's value in an aggregation query (join on multiple columns)

2020-02-03 Thread Vladimir K.
Hi My case is fully depicted here: https://stackoverflow.com/questions/59991771/django-how-to-do-an-override-of-fields-based-on-its-value-in-an-aggregation-qu Any ideas? The next step would be to do a RawSQL but I think that it should be possible with the ORM. Best regards and thanks in

Re: URL pattern for URL with query string

2020-01-13 Thread S D
Thanks Jason. Kind regards, - SD On Mon, Jan 13, 2020, 16:28 Jason wrote: > The url resolver does not include GET query params in a URL, you need to > add them manually after the string. > > for example > > url = > f"{reverse('weather')}/?current_loca

Re: URL pattern for URL with query string

2020-01-13 Thread Jason
The url resolver does not include GET query params in a URL, you need to add them manually after the string. for example url = f"{reverse('weather')}/?current_location={some_value}_location={another_value}" -- You received this message because you are subscribed to the Goo

URL pattern for URL with query string

2020-01-13 Thread S D
Hey guys. SOS please. How do I write a URL pattern for a URL like this? weather/?current_location=-33.927407,18.415747_location=-32.927407,19.415747 When I do reverse(‘weather’, kwargs={‘current_location’: some_value, 'booking_ location’: another_value}) I am getting a NoReverseMatch exception.

Re: specefic field(s) for each query.

2020-01-12 Thread ACG
El sábado, 11 de enero de 2020, 18:38:44 (UTC+1), Mohsen Pahlevanzadeh escribió: > > Hello everybody, > > I can write django code for "select * from mytables;", but I can't > specefic fields such as "select field(s) from my table;" > > Please help me.. > Hi, first you may connect, is

specefic field(s) for each query.

2020-01-11 Thread Santhosh sridhar
You can query like this in Django, say A is the table name and B is the columns. A.objects.all().values('B') or A.objects.all().values_list('B',flat=True) Regards, San -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: specefic field(s) for each query.

2020-01-11 Thread 山村維宏
use values(). example: Foo.objects.filter(name='foo').values('bar', 'baz') 2020年1月12日(日) 2:38 Mohsen Pahlevanzadeh : > Hello everybody, > > I can write django code for "select * from mytables;", but I can't > specefic fields such as "select field(s) from my table;" > > Please help me.. > >

specefic field(s) for each query.

2020-01-11 Thread Santhosh sridhar
You can query like this in Django, say the table name is A and column name is name. A.objects.all() will give all the objects and A.objects.filter(name='Django') will give all the objects whose name is Django. -- You received this message because you are subscribed to the Google Groups

specefic field(s) for each query.

2020-01-11 Thread Mohsen Pahlevanzadeh
Hello everybody, I can write django code for "select * from mytables;", but I can't specefic fields such as "select field(s) from my table;" Please help me.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: Make a Django query filter at runtime

2020-01-11 Thread Derek
ocha wrote: > > Hi Alex > > I could do almost all query but not the "not equals" could you give me > some tip to add this operator to my object? > > I am doing the following way: > > if (operador == 'equals'): > d[realname] = value > elif (

Re: Make a Django query filter at runtime

2020-01-10 Thread Ezequias Rocha
Hi Alex I could do almost all query but not the "not equals" could you give me some tip to add this operator to my object? I am doing the following way: if (operador == 'equals'): d[realname] = value elif (operador == greather than'): d[realname + '__gt

Re: Make a Django query filter at runtime

2020-01-09 Thread Ezequias Rocha
It worked well. Many thanks. On Wednesday, January 8, 2020 at 10:08:18 PM UTC-3, Alex Conselvan de Oliveira wrote: > > Hi Ezequias, > > You could use a dict: > > data = { > 'name': 'John', > 'age': 42, > } > > model.filter(**data) > > Best Regards! > > Em qua., 8 de jan. de 2020 às 18:09,

Re: Make a Django query filter at runtime

2020-01-09 Thread Ezequias Rocha
Thank you very much Alex and Shaheed, but if I want to use the *>, >= <, <=* how do do that? On Wednesday, January 8, 2020 at 10:08:18 PM UTC-3, Alex Conselvan de Oliveira wrote: > > Hi Ezequias, > > You could use a dict: > > data = { > 'name': 'John', > 'age': 42, > } > >

Re: Make a Django query filter at runtime

2020-01-08 Thread Alex Conselvan de Oliveira
Hi Ezequias, You could use a dict: data = { 'name': 'John', 'age': 42, } model.filter(**data) Best Regards! Em qua., 8 de jan. de 2020 às 18:09, Ezequias Rocha < ezequias.ro...@gmail.com> escreveu: > Hi everyone > > I am in a doubt about creating django filters dynamically. > > All you

Re: Make a Django query filter at runtime

2020-01-08 Thread Shaheed Haque
s and values at design time but at runtime > how to do that? > Populate a dictionary with what you need and pass that in: query = {'name': 'John', 'age': 42} model.filter(**query) > > Best regards > Ezequias > > -- > You received this message because you are sub

Make a Django query filter at runtime

2020-01-08 Thread Ezequias Rocha
Hi everyone I am in a doubt about creating django filters dynamically. All you know a filter is made by using the parameters like: model.filter(name='John', age=42) But if I can't type all fields and values at design time but at runtime how to do that? Best regards Ezequias -- You received

Re: How to filter a Window query?

2020-01-01 Thread Jason
I would use raw sql for this, since there's no direct support in the ORM for this. -- 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

How to filter a Window query?

2020-01-01 Thread Tom J. Wassing
I am search for a solution to filter the results of a query which uses a window function. I would like to reduce the results set to only include the entries where the row number is smaller than 10. It is not supported by the ORM to filter directly on this query set (https://code.djangoproject.com

Re: Duplication of Query - reg

2019-12-27 Thread Raja Sekar Sambath
elated" and ".prefetch_related" in view. > > Saygılarımla, > Sencer HAMARAT > > > > On Fri, Dec 27, 2019 at 4:59 AM Raja Sekar Sambath > wrote: > >> Hi, >> >> I have a table of data with self relation , I am Querying all records and >>

Re: Duplication of Query - reg

2019-12-26 Thread Sencer Hamarat
; > I have a table of data with self relation , I am Querying all records and > displaying them in tabular format in a template > > I find a strange behaviour that the query has been executed recursively > for each records of table, any better / suggestion solution for this issue. &

Duplication of Query - reg

2019-12-26 Thread Raja Sekar Sambath
Hi, I have a table of data with self relation , I am Querying all records and displaying them in tabular format in a template I find a strange behaviour that the query has been executed recursively for each records of table, any better / suggestion solution for this issue. [image: image.png

Re: Django Admin Custom View Query Generation

2019-12-14 Thread Derek
The first post I came across that helped me before was: https://hakibenita.com/how-to-turn-django-admin-into-a-lightweight-dashboard (tip: he has many useful admin-related posts and is worth following) This seems like a more recent version of the same:

Re: Django Admin Custom View Query Generation

2019-12-13 Thread Balaji Shetty
Thank you very much Derek. You always provide nice help. Can we generate graphs for reports in Django Admi n. On Saturday, December 14, 2019, Derek wrote: > You can use built-in Django ORM methods to perform calculated operations > on existing models (you don't need a new model). See:

Re: Django Admin Custom View Query Generation

2019-12-13 Thread Derek
You can use built-in Django ORM methods to perform calculated operations on existing models (you don't need a new model). See: https://docs.djangoproject.com/en/3.0/topics/db/aggregation/ For more complex operations, you can write "raw" SQL -see

Django Admin Custom View Query Generation

2019-12-12 Thread Balaji Shetty
Hi Can anyone please tell me how can we generate Custome Model view for different report where we use avg, min , max, sum, count , group by clause. We have to generate this report in Django Admin Panel only. Can we generate respective Graphs also. Is there any library available. -- Mr

Re: Need to Query complex django model

2019-12-11 Thread Kasper Laudrup
Hi Nitin, On 11/12/2019 08.04, Nitin Kalmaste wrote: Hello community, I need to make django views for the models described below. How do i create query to write in view https://stackoverflow.com/questions/59280345/how-to-query-django-models-for-complex-models-like-this You are approaching

Need to Query complex django model

2019-12-10 Thread Nitin Kalmaste
Hello community, I need to make django views for the models described below. How do i create query to write in view https://stackoverflow.com/questions/59280345/how-to-query-django-models-for-complex-models-like-this Please Need Help seriously -- You received this message because you

Re: [Django] How to traverse through query set in java script using django templates?

2019-12-09 Thread Andréas Kühne
This is a strange way to do things - but all you need to do is to add a template for loop in the javascript part of your template. For example: {% for gsp in apply_gsp_model %} var value1 = {% gsp.id %}; {% endfor %} What will happen then is that the iteration will create that line

Query for Data Tables Report Generation and Graph

2019-12-07 Thread Balaji Shetty
Hi I have used django_data_table2 django-tables2 - An app for creating HTML tables My Query is can I generate Graph as well as export data in pdf format. On Thursday, December 5, 2019, Matheus Almeida < matheus.alme...@spotsales.com.br> wrote: > > > Em quinta-feira, 20 de abri

[Django] How to traverse through query set in java script using django templates?

2019-12-06 Thread Dilipkumar Noone
Hi, I have a model named ApplyGSP in models.py. *In my views.py:* apply_gsp_model = ApplyGSP.objects.all() context = {'form': form,'apply_gsp_model':apply_gsp_model, 'Message': message, 'action': action} if action == 'edit': print("action is edit") return render(request,

Saving data from query to another table

2019-12-02 Thread Irfan Khan
Hi all, Requirement : I have two tables. In first table I have some data which is already stored. And now I have created one form for search data from that existing data table, when result found I wanted to store that data to another table, can any one pls guide my easy way to overcome. Thank

Re: Retrying query when connection error

2019-12-02 Thread Mateusz MTB90
Some suggestion? W dniu czwartek, 28 listopada 2019 12:09:46 UTC+1 użytkownik Mateusz MTB90 napisał: > > Hi It is possible to catch connection error in Django and retry query? > How this can be done? > > Scenario: > query -> connection error occurs -> catch connec

Django retry query when error.

2019-11-28 Thread Mateusz MTB90
Hi it is possible to catch e.g connection error and retry query in Django 2.2? -- 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-user

Retrying query when connection error

2019-11-28 Thread Mateusz MTB90
Hi It is possible to catch connection error in Django and retry query? How this can be done? Scenario: query -> connection error occurs -> catch connection error -> create new connection -> retry query -- You received this message because you are subscribed to the Google Gro

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

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

2019-11-27 Thread Patrick Carra
I don't have a circuitinfotable_form.html. I never specified circuitinfotable_form in any of my code. What should that form contain? My /viewLit/editCircuit.html form contains the following: {% block content %} {% csrf_token %} {{form.as_p}} {% endblock %} Shouldn't that suffice

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

2019-11-27 Thread franz ulenaers
put your template |'circuitinfotable_form.html' |on one of your folders :| /home/db_user/ciopsdb/base/templates/viewLit/circuitinfotable_form.html /home/db_user/ciopsdb/templates/viewLit/circuitinfotable_form.html /home/db_user/ciopsdb/editLit/templates/viewLit/circuitinfotable_form.html

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

2019-11-27 Thread Patrick Carra
I didn't have one. I thought UpdateView would create the form for me. But I was working the problem and made one: from django.forms import ModelForm from . models import Circuitinfotable class CircuitinfotableForm(ModelForm): class Meta: model = Circuitinfotable fields =

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

2019-11-27 Thread Raja Sekar Sambath
Hey Patrick, Can you post forms.py here? On Wed, 27 Nov 2019 at 21:23, Patrick Carra wrote: > Raja that was a great suggestion thank you! Once a started playing around > with the urls in the project level I found that it was still being routed > to viewLit despite the edit/ in the url I was

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

2019-11-27 Thread Patrick Carra
Raja that was a great suggestion thank you! Once a started playing around with the urls in the project level I found that it was still being routed to viewLit despite the edit/ in the url I was passing. I decided to put all these classes into the same app viewLit/views.py and now my parameter

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

2019-11-26 Thread Raja Sekar Sambath
Hi, * path('viewLit/edit/', include('editLit.urls')),* path('viewLit/', include('viewLit.urls')), * path('edit/', include('editLit.urls'))*, look at above in project level urls.py, give a try by commenting any one On Wed, 27 Nov 2019 at 03:30, Patrick Carra wrote: > It's actually

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

2019-11-26 Thread Patrick Carra
It's actually this I copy and pasted the wrong thing: Edit Circuit Info My project level urls.py is: from django.contrib import admin from django.urls import path, include from django.conf.urls import url import debug_toolbar urlpatterns = [ path('admin/', admin.site.urls), path('',

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

2019-11-26 Thread Gil Obradors
This is the link ? Edit Jira Info My project level urls.py is: from django.contrib import admin from django.urls import path, include from django.conf.urls import url import debug_toolbar urlpatterns = [ path('admin/', admin.site.urls), path('', include('homepage.urls')),

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

2019-11-26 Thread Patrick Carra
Ha that was my mistake my brain has turned to mush anyhow the change was made and it still is broken :( On Tuesday, November 26, 2019 at 3:34:45 PM UTC-6, Patrick Carra wrote: > > Correct me if i'm wrong but I think you meant: > > urlpatterns= [ > path('circuit/', >

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

2019-11-26 Thread Patrick Carra
Correct me if i'm wrong but I think you meant: urlpatterns= [ path('circuit/', views.editLit.as_view(),name='editLit'), ] I did make that change but the results were the same. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

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

2019-11-26 Thread Gil Obradors
Easy, urlpatterns from editLit.urls must be: urlpatterns= [ path('jira/', views.editLit.as_view(),name='editLit'), ] Missatge de Patrick Carra del dia dt., 26 de nov. 2019 a les 22:09: > Yea! This toolbar is an awesome tool thanks for the tip. So now I guess > I'm not understanding how

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

2019-11-26 Thread Patrick Carra
Yea! This toolbar is an awesome tool thanks for the tip. So now I guess I'm not understanding how to route url's really. The a href is: Edit Jira Info My project level urls.py is: from django.contrib import admin from django.urls import path, include from django.conf.urls import url import

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

2019-11-26 Thread Gil Obradors
Yeah! Can you see the error? *WHERE* "circuitinfotable"."circuitid" = 'edit/circuit/STTK-100G-18040-01-WRBB' would be : *WHERE* "circuitinfotable"."circuitid" = 'STTK-100G-18040-01-WRBB' Link incorrect, or uls pattern incorrect Edit Circuit Info Missatge de Patrick Carra del dia dt., 26 de

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

2019-11-26 Thread Patrick Carra
I figured out the weirdness with the django-debug-toolbar I wasn't serving my static files from the apache/mod_wsgi configuration. After I figured that out this is what I have now: QueryTimelineTime (ms)Action +

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

2019-11-26 Thread Gil Obradors
After the page is loaded, click to SQL queries and paste or make a screenshot of the content. In this tab you will see all transactions to DB Missatge de Patrick Carra del dia dt., 26 de nov. 2019 a les 19:57: > Okay I have worked on it I do have the toolbar on there but it's not > display

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

2019-11-26 Thread Patrick Carra
Okay I have worked on it I do have the toolbar on there but it's not display correctly it shows up at the bottom of each page and looks like this: - Hide » - Versions Django 2.2.4 - Time CPU: 51.78ms (56.68ms)

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

2019-11-26 Thread Gil Obradors
and Configuring Internal IPs The Debug Toolbar is shown only if your IP address is listed in the INTERNAL_IPS setting. This means that for local development, you *must* add '127.0.0.1' to INTERNAL_IPS

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

2019-11-26 Thread Patrick Carra
I installed the django-debug-toolbar but its not doing anything. I imported it added it to settings.py installed apps and middleware, added the if statement to the project level urls.py and Debug is set to True. -- You received this message because you are subscribed to the Google Groups

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

2019-11-26 Thread Gil Obradors
Can you try to add to the view class this argument? https://docs.djangoproject.com/en/2.2/ref/class-based-views/mixins-single-object/#django.views.generic.detail.SingleObjectMixin.pk_url_kwarg pk_url_kwarg = 'circuitid' And check what query is doing with django-debug-toolbar Missatge de Gil

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

2019-11-26 Thread Gil Obradors
May be, Or you aren t querying for circuitid ( by view class code) , normally the urls are with the int pk parameter... For this, django-debug-toolbar can help to see what are you quering to db, i recommend to install and play with this great tool I will read about, i want to know whats

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

2019-11-26 Thread Patrick Carra
Could it possibly be that it is trying to match this entire value? /viewLit/edit/circuit/STTK-100G-18040-01-WRBB/ and if so what am I doing wrong in my urls and views that I am not dropping /viewLit/edit/circuit/? -- You received this message because you are subscribed to the Google Groups

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

2019-11-26 Thread Patrick Carra
Thanks for the reply Gil i did this and was able to find this object. Python 3.6.8 (default, Aug 7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from editLit.models import

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

2019-11-25 Thread Gil Obradors
Hi! Matching query doesn't exists says that this entry with this id not exists in db Are you sure that this object exists? STTK-100G-18040-01-WRBB Can you open a shell and: from xxx.models import Circuitinfotable obj = Circuitinfotable.objects.all() print(len(obj)) obj = Obj.get(circuitid

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

2019-11-25 Thread Patrick Carra
Sorry I forgot one! My models.py for this class is below: class Circuitinfotable(models.Model): id1 = models.IntegerField(blank=True, null=True) pid = models.CharField(max_length=255, blank=True, null=True) circuitid = models.CharField(primary_key=True, max_length=255, blank= False,

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

2019-11-25 Thread Patrick Carra
return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/db_user/ciopsdb/venv/lib64/python3.6/site-packages/django/db/models/query.py" in get 408. self.model._meta.object_name Exception Type: DoesNotExist at /viewLit/edit/circuit/STTK-100G-18040-01

Re: Django GIS query on annotated spatial field

2019-11-18 Thread Simon Charette
recent release but this one might not have been caught yet. >>>> >>>> Cheers, >>>> Simon >>>> >>>> Le jeudi 14 novembre 2019 09:43:46 UTC-5, Bill Bouzas a écrit : >>>>> >>>>> >>>>> >>

Re: Django GIS query on annotated spatial field

2019-11-18 Thread Bill Bouzas
elease but this one might not have been caught yet. >>> >>> Cheers, >>> Simon >>> >>> Le jeudi 14 novembre 2019 09:43:46 UTC-5, Bill Bouzas a écrit : >>>> >>>> >>>> >>>> I am currently building a web app based on GeoDjango

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-15 Thread DANIEL URBANO DE LA RUA
replacing with a single / and then wrote some rules around that and > replaced the single / with the // before passing it to my query. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-15 Thread Patrick Carra
In case anyone is interested I fixed this with some simple regex in my view. I identified the patterns for which apache was removing the // and replacing with a single / and then wrote some rules around that and replaced the single / with the // before passing it to my query. -- You received

Re: Django GIS query on annotated spatial field

2019-11-15 Thread Simon Charette
web app based on GeoDjango and I want to check >>> if >>> a number of points lie within a multipolygon. To form the multipolygon, >>> I >>> check which areas are selected and then aggregate them into one >>> multipolygon with the following query: &

Re: Django GIS query on annotated spatial field

2019-11-15 Thread Bill Bouzas
gt;> I am currently building a web app based on GeoDjango and I want to check >> if >> a number of points lie within a multipolygon. To form the multipolygon, I >> check which areas are selected and then aggregate them into one >> multipolygon with the following quer

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
nk what I may have to do is write some regex in the template to >> catch anytime there is a // and convert it to something that won't >> interfere with the apache/mod_wsgi due to the url and then when I pass it >> back into my view convert it back to the original in order to perform

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
/mod_wsgi due to the url and then when I pass it > back into my view convert it back to the original in order to perform the > query and get the correct response. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. >

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread Patrick Carra
Yea I think what I may have to do is write some regex in the template to catch anytime there is a // and convert it to something that won't interfere with the apache/mod_wsgi due to the url and then when I pass it back into my view convert it back to the original in order to perform the query

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
>>> r.encoding 'utf-8' >>> r.encoding = 'ISO-8859-1' r is your request use different encoding El jue., 14 nov. 2019 a las 21:29, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: > https://www.webforefront.com/django/regexpdjangourls.html? > is maybe something related to your url

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
https://www.webforefront.com/django/regexpdjangourls.html? is maybe something related to your url pattern i don't know but something is wrong because is not working or did you found a solutions? El jue., 14 nov. 2019 a las 21:21, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: >

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/2.2/_modules/django/utils/html/ here you have some tricks to do on your view maybe El jue., 14 nov. 2019 a las 21:18, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: > the main problem is tha you have especial character in a url and the >

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
the main problem is tha you have especial character in a url and the codification on an url does this to transport the data and your have to fix it in the request then at least tray using urllib.parse from python check some where an example El jue., 14 nov. 2019 a las 21:15, Patrick Carra ()

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread Patrick Carra
I think my assumption was wrong stackoverflow is down right now so I can't go to the link but it seems like somebody is suggesting this is an apache/mod_wsgi error https://code.djangoproject.com/ticket/14346 -- You received this message because you are subscribed to the Google Groups "Django

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread Patrick Carra
No change Daniel I looked that up and I think that is used for something else. The name makes since but its purpose is for something else. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
or try to send another unique value it will be easy El jue., 14 nov. 2019 a las 20:56, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: > or |escape is the same > > > El jue., 14 nov. 2019 a las 20:55, DANIEL URBANO DE LA RUA (< > dannybombas...@gmail.com>) escribió: > >> {%

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
or |escape is the same El jue., 14 nov. 2019 a las 20:55, DANIEL URBANO DE LA RUA (< dannybombas...@gmail.com>) escribió: > {% autoescape on %} > {{ post.content }} > {% endautoescape %} > > > > try this > > El jue., 14 nov. 2019 a las 20:53, Patrick Carra () > escribió: > >> There was no

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
{% autoescape on %} {{ post.content }} {% endautoescape %} try this El jue., 14 nov. 2019 a las 20:53, Patrick Carra () escribió: > There was no change after adding |safe after the value within {{}} > example: class="view-item" title="View">View > > -- > You received this message because

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread Patrick Carra
There was no change after adding |safe after the value within {{}} example: View -- 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

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
then use |safe template tag from django El jue., 14 nov. 2019 a las 20:44, Patrick Carra () escribió: > and the actual value is OQYX/173774//ZYO but Django is interpreting it as > OQYX/173774/ZYO/ > > On Thursday, November 14, 2019 at 1:41:35 PM UTC-6, Patrick Carra wrote: >> >> That is a value

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread Patrick Carra
That is a value from the table in models called Circuitinfotable and the field it is pulled from is called circuitid. -- 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

Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread DANIEL URBANO DE LA RUA
) escribió: > then use |safe template tag from django > > El jue., 14 nov. 2019 a las 20:44, Patrick Carra () > escribió: > >> and the actual value is OQYX/173774//ZYO but Django is interpreting it >> as OQYX/173774/ZYO/ >> >> On Thursday, November 14, 2019 at 1:41:35 PM UTC-6, Patrick Carra

<    1   2   3   4   5   6   7   8   9   10   >