Posts by Gustavo Cruz • 17 points
9 posts
-
0
votes1
answer40
viewsQ: Insert using time table only at values that do not exist in the main table
I am trying to make an Insert in a table using another temporary table, but the Insert can only occur if the item does not exist in the original table. create temp table tmp_x as select * from…
postgresqlasked Gustavo Cruz 17 -
0
votes1
answer413
viewsQ: Automatic update of the related model through FK - Django
I am trying to use Signal to do a subtraction update on a table based on the value the user selects. an example situation: On the table Materiais I have the pen material with the fields:…
-
1
votes1
answer355
viewsQ: generate a pdf only with arguments passed by a Django form
Hello, I’m having a problem generating a pdf, I need to create filters for a more detailed report, my code consists of a simple view of Template where I set up the form with the "GET" method, and a…
-
0
votes2
answers102
viewsA: create random number in python starting with the year
based on his reply Fernando I overwrote the model save method to catch the YEAR plus two house 00 plus the ID def save(self, *args, **kwargs): super (Solicitacao, self).save(*args, **kwargs)…
python-3.xanswered Gustavo Cruz 17 -
0
votes2
answers102
viewsQ: create random number in python starting with the year
hello I am trying to create a variable to return me a protocol number catching the current year after 4 front houses starting from the smallest to the largest, example. 20180001, 20180002 etc. to…
python-3.xasked Gustavo Cruz 17 -
0
votes0
answers175
viewsQ: help with listview Django
I need help picking up the values of an object in a list view class Compraslist(LoginRequiredMixin, ListView): model = Solicitacao template_name = 'compraslist.html' def get_context_data(self,…
-
0
votes1
answer457
viewsA: take the logged-in user and save the id using inline formset
solution is to pass the object self.object = form.save(commit=False) self.object.usuarios = self.request.user self.object.save()
djangoanswered Gustavo Cruz 17 -
0
votes1
answer457
viewsQ: take the logged-in user and save the id using inline formset
Hello I’m having a problem to get the logged in user id simplifying, I have a form where the user will enter the information and when he gives the Ubmit the user will also be saved together, because…
djangoasked Gustavo Cruz 17 -
0
votes0
answers54
viewsQ: Make an inputQuery replace a variable in the word if the condition is true
I am working with Delhi and I need a method that does the following in the open word document look for a@Name variable if it finds the@Name variable open an inputQuery for the user to enter the new…
delphiasked Gustavo Cruz 17