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 =

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
I have a built a database application that users can search and view records from. I am trying to incorporate an update feature to allow users to edit information the app is called editLit. When I try to pass a parameter into the editLit app via urls into views.py I get the following error: