Django formtools gets caught in a loop - django

I'm working on a multistep form using django-formtools lib, and I'm facing a flow problem. In a specific step (fotoFormulaMedica) I have two buttons where basically the user choose his pathway. Either "take photo" or "choose a file".
If he choose to take photo, it'll take him to the step called foto and then, once he clicks in continue, it'll continue the rest of the steps. So the next step will be avisoDireccion.
If he choose to "choose an image", it'll take stay in the current step, he'll select an image from his pc and then, once he clicks in continue will continue the rest of the steps. So the next step will be avisoDireccion.
It works great!, however, when all the steps are filled, instead of take to the done.html, he goes back to fotoFormulaMedica and the user gets caught in a loop.
This is the repo https://github.com/Alfareiza/logifarma-radicar-domicilio/tree/1.configurando-cargar-y-tomar-foto
Also you can check here my :
views.py
https://github.com/Alfareiza/logifarma-radicar-domicilio/blob/1.configurando-cargar-y-tomar-foto/core/apps/base/views.py
forms.py
https://github.com/Alfareiza/logifarma-radicar-domicilio/blob/1.configurando-cargar-y-tomar-foto/core/apps/base/forms.py
I'll appreciate your help.
I've tried to make the flow not including one of the pathways. I mean, if I exclude the take photo feature or select file feature. The flow works as I expected.

Related

Document has been modified or corrupted since signed! (data)

I'm working in HCL Notes application. I have developed a summary view to show calculated figures to the user. Then the user clicks one of the action buttons and I open a detailed view, but for that view I setup Selection Formula on the fly so that it shows the records filtered specific to that button conditions. It was working almost fine for a few days, but now most of the time it shows some previously shown (filtered) data no matter what button the user has clicked. Means it doesn't set the Selection Formula of the view and shows the view with the old formula and it won't get back to normal condition even if they restart Notes application.
When the user is stuck in this particular condition, and they peep through the status bar it shows this message:
Document has been modified or corrupted since signed! (data).
The necessary code-snippet is as below:
*Set dtlView = db.GetView("Report_Dtl")
dtlView.SelectionFormula =formula
Call dtlView.Refresh()*
where formula is the dynamically built formula. Looks like the line
dtlView.SelectionFormula =formula
is unable to update the selection formula and then the line below generates the above error message:
Call uidb.OpenView(dtlView.Name,,False, False)
Please help!
Thanks
For "on the fly" modification of the view selection formula your user need "Designer"- access to the database, and that is never a good idea. The help document to the function you are using is explicitly stating that this is not a good idea (emphasise of mine):
This is not a good way to display a selected set of documents for a specific user. When you use this property to change the view selection, it applies to all users of the view.
There are problems with using this method to make a view display a new selection of documents for an end user:
Do not give end-users Designer access to an application.
If it is a shared view, users will interfere with each other's searches.
The NotesĀ® client caches design information, and there's no way to tell it to update its cache (except for outlines). Exiting and re-entering the application usually works, but it's hard to programmatically ensure the user exited the application entirely.
In addition the modification of the view selection formula can break the signature of the design element and then other errors occur.
Better use another approach:
Use a Folder for every user and put the selected documents in there (after doing a NotesDatabase.Search with the formula
Use a separate view for every user and let a server agent manipulate its selection formula with a user that has access.
For having a separate view / folder for every user you could use "Shared, Private on first use"- views (they are not easy to maintain), or any process that generates them and is able to assign every view to the users they belong to... in both cases this needs some effort, but at least it will work.

How can I view all the content of redmine, such as projects and tickets, easily on the screen?

I'm using REDMINE.
I have a list of projects on the screen.
Is it possible to add details of the ticket content to this screen?
I'd like to look over the screen at once instead of clicking with the mouse, how do I do that?
Also, if you have any plugins or useful tips and so on, please let me know.
Tamazawa, I believe you might be referring to "My Page" of Redmine where you could use widgets to decide what you see on that dashboard - keep in mind that such dashboard s project independent, so it can display issues from many projects that you are a member of on 1 screen.
For instance from My Page, you should be able to select an "Issues" widget to Add and set it up to pull a list of items to display using a saved custom query.
That should give you a snapshot of tasks at hand, without the need to click around the screen too much.
You may need to set up your saved query such that:
Description and / or
Last notes
are checked (if you want to see issues at a glance, without the need to open each one separately).
Alternatively, you can skip that "My Page" idea altogether, if you're ok with just opening a saved query with Description and / or Last notes selected.

How can the C++ program user be allowed to request to go back to one previous step of the program?

I have just started doing a C++ project in which I try to create a very simple bank account system.
The question I have is how can I implement an option which would be displayed the whole time in order for the user to go back to some previous step (not only to the last one) for them to make any changes? I am not talking about input validation but rather about something the user can request if needs be.
Therefore, I would like to be able to allow the user to go back at any time to the first menu displayed in the program.

No result with SendKeys to IE8 using Selenium on BrowserStack

I'm using Selenium to perform testing on BrowserStack, and have hit a problem while testing IE8.
I've found that when I target elements and then call Click, the full effect of the action is not being undertaken*.
Through trial-and-error I found that if I call Click twice then the expected action is undertaken.
However, one of the testing steps involves writing a number to a text field, and for this I have the following:
driver.FindElement(By.CssSelector("...")).Click();
driver.FindElement(By.CssSelector("...")).Clear();
driver.FindElement(By.CssSelector("...")).SendKeys(Keys.NumberPad1);
driver.FindElement(By.CssSelector("...")).Click();
But "1" never appears in the field. I can tell it never appears because I'm capturing screenshots after each step; I can see that the field gets highlighted (as the active element) and I can see the cursor inside the field, but no result from the method call.
Furthermore, I've even tried giving the field an ID and addressing it with
driver.FindElement(By.Id("txtCountManual")).SendKeys(Keys.NumberPad1);
But with the same (lack of) results.
Does anyone have any suggestions as to how I may send a textual value to a field in IE8 using Selenium and BrowserStack?
* The "expected action" involves using Knockout.js to display a selected value in another element. So for example, I found that if I programmatically click a radio button and then take a screenshot, I can see that the radio button has been clicked but the action performed by Knockout.js has not taken place; if I click the element a second time then the Knockout.js action is performed. This double-clicking is not required when I manually test using IE8 via BrowserStack.

I would like to wait for input on a browser and click in a box when receiving a specified request

I am a complete beginner in programming, and need to know where to start. I would like to be able to automate form filling on websites, like waiting for input in one part of the screen and then filling in my own data in another, or clicking yes in a specified box.
I have seen the program imacros, but cannot see how to get started
First, Check out the iMacros wiki. This will be your main source of information, and can answer most of your questions moving forward.
http://wiki.imacros.net/Main_Page
The form filling sample code will be helpful as well for this specific task.
http://wiki.imacros.net/Demo-FillForm
If you download iMacros for Firefox, simply use the record function in the plugin and record yourself filling out the form, then modify with pieces from the form filling demo shown above.