Posts by Antonio Braz Finizola • 391 points
26 posts
-
1
votes1
answer27
viewsQ: How to update "deleting" objects from a nested object?
I have these two models to follow: class Questionario(models.Model): numero = models.IntegerField() nome = models.CharField(max_length=300) class Meta: db_table = 'questionario' verbose_name =…
-
2
votes2
answers1003
viewsQ: How to do a regex to capture a sequence in numbers with dots and strings
Examples are: 1.1. FLESH 1.1.2. BRAIN I want to make sure I get sequences number.number. ... space and a high-box string (can’t be low box). I tried this: reg = r'[1-9][.]+\s\b[A-Z]*' However, the…
-
1
votes2
answers73
viewsQ: How do I get Django to see the folders on my computer?
I need to make my system see folders that are outside your folder, to render the . pdfs that are inside those folders. I’m using a function in javascript (Vue.js) very simple, similar to this one:…
-
5
votes4
answers317
viewsQ: Regex to identify all occurrences of years
I made this Regex to capture the occurrences of years in a sequence of numbers (between 2010-2029). text = '0412020982012' rg = r'20[1-2][0-9]' years = re.compile("(%s)" % (rg)).findall(text) Works…
-
1
votes0
answers124
viewsQ: How do I access a POST endpoint from a Django view?
I need to provide a service that requests a Django view method using lib requests. The method is as follows:: def classify(request): print(request) if request.method == "POST": form =…
-
1
votes2
answers978
viewsQ: How to return a json to the same Django template?
I am trying to return a json to the same template without rendering it again (as in the case of render(request, 'dir/base.html, Response))) using Jsonresponse, but it is giving this error: Object of…
-
1
votes1
answer297
viewsQ: Save a file using a view function on Django
I have this following HTML, which is a form with an input for a file and Submit button: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document…
-
1
votes0
answers80
viewsQ: Add an action button to the Django admin change_list
I’m new to Django, I’d like to know how to add a button next to the files that have been added and take me to another page, such as deleting from the combobox Action. How can I do it? If you can,…
-
2
votes2
answers197
viewsQ: Regex able to ignore the prefixes of a word
I’ve got those regex next: regex_list = [ '(?:arquiv|auto)(\w+) (?:auto|arquiv) (?:definitiv)', '(?:arquiv|auto)(\w+) (?:auto|arquiv)', '(?:arquiv)(\w+) (?:definitiv)' ] My goal is to capture…
-
-1
votes2
answers534
viewsQ: Check if a sequence of numbers is present in another
I have two numerical sequences that have some similar digit sequences. a = 0000000724050613 b = 07240001980055060113 Example: the sequences 724 and 506, for example, they are contained in a and b I…
pythonasked Antonio Braz Finizola 391 -
1
votes1
answer285
viewsQ: How to create a regex in Python to get a specific text?
For example, I want to take the string below: TEXT ABOVE MR. DR. DR. JUDGE OF LAW SPECIAL COURT CIVIL DISTRICT OF THE CAPITAL TEXT BELOW The word DEAR. may be replaced by EXCELLENCY and the word…
-
-1
votes1
answer177
viewsQ: Toggle part of a text to bold under one condition
I need help changing the color of a specific part of a text. The thing is, I have a string that I broke into several separate sentences to get the relevant phrases. The phrases are tuple-shaped…
-
0
votes0
answers36
viewsQ: Adjust graphics at header ends
I need help adjusting two pie Chart charts at the left and right ends of a header. Every time I zoom in (Ctrl and +) they mismatch. I set the css to look adjusted, but as soon as I zoom in,…
-
2
votes2
answers122
viewsQ: Determine the amount of autocomplete items a textfield can allow
I want to, for example, inform 3 of the autocomplete values in a textfield, textarea, etc. The textfield should then only keep this 3 values informed and will not allow typing any more. How can I do…
-
1
votes1
answer150
viewsQ: Leave the textarea autocomplete when it increases in size
I need to make the autocomplete track the textarea when it is augmented. <form class="form-control form-inline"> <label for="tags" class="control-label" id="upBody">Component:…
-
0
votes1
answer35
viewsQ: Create and maintain a loadbar while a function is called
I need to create a loadbar and leaves it active until the function is finished. I can do this at the angle? $scope.getPosts = function () { $http({ method: 'POST', url: '/getPosts',…
-
1
votes1
answer1949
viewsQ: Program a Python function to always run on the last Friday of the month
The code below demonstrates an example of how to program, but is somewhat limited to minutes, hours and days. I need one that also includes the month and the specific day, which in my case is…
-
1
votes1
answer72
viewsQ: Prevent jquery-ui autocomplete from accepting words that are not in the list
I want to make sure that my input autocomplete does not accept any word that is not on a list. I’m using the code below, taken from jQuery-ui’s own website 1.12.1. <!doctype html> <html…
jquery-uiasked Antonio Braz Finizola 391 -
0
votes1
answer101
viewsQ: How to maintain a "checked" checkbox after filtering
<div ng-repeat="post in posts | filter:{components:component} | filter:{classification:class}:true"> <ul> <div class="selected-{{'{{charter.selected}}'}}"…
-
1
votes1
answer470
viewsQ: How to pass the data from a checked checkbox to a modal?
I would like to know how to, when selecting a checkbox, take this data and launch it in a modal. In the code below, I want to take only the selected charters of a post and make appear only those…
-
0
votes1
answer99
viewsQ: Filter list from similar strings
My question is how do I, using the Angularjs filter, filter items from a list from string attributes. These attributes are similar, 'Relevant' and 'non-relevant'. <select class="select input"…
-
1
votes1
answer153
viewsQ: How to make a pie chart clickable
My question is how do I leave a pie chart (pie Chart) clickable. Type, invoke a function to filter a list from the click on one part of the chart. I am currently using the Angular-nvd3, but could…
angularjsasked Antonio Braz Finizola 391 -
1
votes1
answer1072
viewsQ: Create a pie chart with html and Angularjs
I would like to know how to create a chart (ex: pizza) from the data of an array with html and Angularjs. An example would help a lot. Thank you very much.
-
0
votes0
answers21
viewsQ: Dump html from a private Google Plus community
I’m trying to make a request http from a Google Plus page, from a private domain. I am currently using the lib requests python. import requests content =…
-
0
votes0
answers279
viewsQ: Delete data from one html table from another
In my program, I add a name of a phone, mark the checkbox, click on "Search" and it returns me tuples of data in a table, as shown in image 1. However, in image 2, when I click on "Delete", it…
angularjsasked Antonio Braz Finizola 391 -
0
votes1
answer235
viewsQ: How to pass data from one table to another with checkbox?
Hello, guys. I’m new to Web programming and I’m currently studying some Angular concepts. My problem is this: pass the selected items from one table, by checkbox, to another table. Could anyone help…
angularjsasked Antonio Braz Finizola 391