I am integrating existing Django project with another application(trello) via client side script.
In the template, I have a button that triggers a javascript that creates a task in trello.
However, I do not want to create this task more than one time so I am thinking what option should I choose to validate it .
1-To trigger update of the field my Django project
2-To try to read the data from the trello application to check if the id already exists.
Both approaches should work but now I am wondering maybe there some standard approach from Django point of view for this problem?
I had slow ignition . The solution is simple. If you do search for the implementation of "like" button in Django it will achieve the same goal exactly and this topic was discussed in other questions .Django Like Button
Related
this is my first post here so apologies in advance if I format anything incorrectly.
I'm working on a project for an internship and after a couple days of researching I can't figure out a solution to the next step in our project automating some reports.
TLDR: Is it possible for a javascript file executed via nodeJS to 1. select an option in a dropdown menu/list in an html page/website, and 2. enter text/data into a form on that html page/website. We want this to be able to run without human interaction, currently the idea is that a batch file scheduled to run at a specific time will open command prompt and run a .js file that will do these tasks
Our company has a web interface linked to a SQL database that so far has been used to manually enter data that is then updated in the database, and is the basis for several reports. We are working on having the process of pulling data from one database to the end of entering data in a separate database be fully automated on varying schedules. For now since data entered in the website will already automatically go into the second database, we are hoping (at least for now) to just have a nodeJS program that will open the web page with proper credentials (already got that working) and then select a specific option from a drop-down menu and then with that selected enter data into the form loaded from that selection.
The contents of the files I'm working with apart from the code I've got for testing are a bit long, so I've put them in a github repository for your reference linked below. The code I've written so far to test things out is found in TestJS2 and TestJSHttp https://github.com/crowbar1212/Internship-project
answered using my non-school email account:
Yes! as #t.niese commented, this is something that can relatively easily be done using puppeteer, check out the github page or https://pptr.dev/ for info on how to use puppeteer.
I have implemented a complex interactive HTML form using React and Redux. I want to show this form to mturk workers and retrieve the results as a json string (basically containing the redux state after completion of the form).
After some googling, I see three options how to do this:
1) Use a ExternalQuestion and host it on my own server. However, I can't find an option how to create an ExternalQuestion using the Mechanical Turk web-interface. I only found tutorials that explain how to create such a question using the mturk API. Is there no other way to do this? I want to avoid writing scripts for publishing, retrieving the results and approving the workers myself.
2) Use a pre-defined question type such as "Survey". In this question type I can embed an iframe pointing to my own server where the react app is hosted. Using additional javascript I could retrieve the results from the iframe, store it in a hidden field in the survey and submit that as my final result.
3) Compile my react app, upload the JS and CSS files to my own server, copy the HTML to mturk and reference the JS/CSS from there.
None of these options feels right to me. How can this be done correctly?
I think an ExternalQuestion would be my best bet, but I want to avoid writing my own API calls as bugs could result in money loss.
Option 3 is the typical pattern for this kind of use case.
You can reference your assets and then in your javascript put your submit value in a hidden input within the .
This blog post shows how to achieve a use case like this using Crowd HTML Elements with Amazon SageMaker Ground Truth. It should be a helpful starting point for how to do this using MTurk directly.
Please feel free to reach out to me at samhenry#amazon.com if you get stuck.
Thank you,
Amazon Mechanical Turk
I want to automate some tasks as below:
For a particular url eg:www.xyz.com, there are list of tickets nos ..so I want to click, perform an action on it which it will result in different page..and in that page.
I need to check some already filled input boxes depending upon that..I need to add content to some other input boxes and perform submit button.
Can this type of automation be performed in js ..if yes please advise of any framework ..and if no why not and suggest any other language.
I researched quite a bit, I think it can be performed in python, but i prefer any js framework or just vanilla.
Surely you can. This can be achieved using Node.js + selenium-webdriver package to automate what you mentioned.
Here is the API document of selenium-webdriver: https://seleniumhq.github.io/selenium/docs/api/javascript/
Here you can find tutorial on how to create web automation scripts with JavaScript:
BDD Web Automation Tutorial
I have been working on a spring roo project and I've hit a wall in terms of being able to customize the web page.
The main thing I want to do is be able to dynamically hide certain fields as the client is filling out the web form. I have a drop down list driven by enumerations that has 4 options and a fifth "other" option. If the user selects "other" I want a text box to appear so the user can fill out their own selection.
I was talking to someone and they said "This really depends on the UI you choose. In case of MVC scaffolding you can use javascript to drive these relationships". I am indeed using MVC scaffolding so I guess I have to use javascript. I don't really know that much javascript but the problem lies in that I don't even know where the javascript code would go in term of my project files. And then the second problem of course is how to use javascript to hide the fields dynamically in Spring.
Thanks
Spring MVC scaffolding uses dojo by default as its javascript framework.
You are able to use standard dojo functions when you attach events to DOM elements. You can simply use the <script/> tag to contain your own custom javascript methods within a generated .jspx page.
Additionally, you can integrate another existing javascript framework such as jQuery. At the moment you can include jQuery manually, but it can possibly be expected in a future Spring Roo version.
You can play safe with dojo for now.
Is there any way to use server controls in ASP.NET MVC?
Specifically I need to use the FarPoint Spread control in my application to display an Excel file that exists on the server with the ability to display updates on the client in real time.
The reason that I want to use MVC instead of webforms is that eventually we're going to scrap the excel files and create the views programmatically but I have to display these files now since we don't have time to create that functionality in this phase.
My suggestion would be to use WebForms for pages that need the custom control and MVC for everything else. In order to mix WebForms in MVC in the same application you'll need an IgnoreRoute call so MVC doesn't try to process .aspx files and you need to make sure everything needed for WebForms gets added to the web.config. Scott Hanselman has a great blog post here with the details.
FarPoint recently released a Spread component which is supported on the MVC platform .You can go through which blog which gives detailed information on using Spread with MVC 3 .I hope this helps.
http://www.gcpowertools.info/2011/12/using-grapecity-spread-for-net-with-mvc.html
I'm not sure how FarPoints control works, but if its anything like the aspose cells component I use, I dont think you'll have any problem.
As far as I'm aware, theres nothing to stop you using normal webforms controls anywhere in your MVC app, it's just that most rely on ViewState and the postback model (which arent present) and hence don't work properly.
There isnt really any UI rendered for the aspose excel control, so you should be able to just create an object, call some methods to set things up and then stream the generated file out to the response just the same way you would in a button click event.
This is all hypothetical, and I apologise in advance if this doesnt work!
Paul.
http://www.tumelty.com/