I want to make something like google forms which users can make themselfs. I want just simple html string forms which can reveal answer and check is it right instantly. No matter how users will create forms, but only using webpage. Without additional connecton to DB. Using only one field in column in DB.
Maybe forms can be like this using just html (best variation)
Related
I have a Django app that displays tables on the user end of database queries. I would like the admin to be able to edit those models and objects in table form. Ex: click a value and type in the new value instead of having to click the object and hit save. I’m unsure if there is an easy/conventional way to do this. Thanks!
I like use django-crispy-forms. Flexible solution for use django forms. Easy integrate ajax.
I am using django to create an application that read data from sql server and show it on the webpage.
I want the content to change based on selected options from the drop down.
Basically I have written queries ion the model and I want my model to load content dynamically. How can I do that?
I am trying to use ajax.
Django won't care a whole lot about what you want to do there. Essentially, you want to create controller actions in Django that serve e.g. JSON representations of the data you want to display.
Your template then needs to include Javascript which makes the AJAX calls to retrieve data from those actions and display it on the page. You can either do this manually using just Javascript or jQuery or you can use a framework like AngularJS. The latter is heavier weight but will save you some effort if this about more than just a simple page.
There are plenty of tutorials on the web for using Django with jQuery or AngularJS which you should easily find using your favourite search engine.
I work on a simple app with two basic models, Document and Word. The user uploads a document, and each word from the Document is extracted in a Word entry. The user should be able to view, add, edit and remove the documents and the words, so I thought it would be good to use Django admin. But also the user should be able to do something more with the words, usually in a group of two and some additional adjustable parameters (like calculating Dice similarity).
Is there a way I can do all this in a one-level application? Or I have to make every user admin user, and make an app with just the additional functionality?
You can create custom view in the ModelAdmin or even in the admin site so there is no need to create an additional app.
I have an app that allows users (admins actually) to add html to a model. Then I serve that html on some page to other users (nonadmins). I would like to allow the admins to create arbitrary html on these pages, including adding images. I don't want the admins to have to jump through hoops to get their content into this html field. Suppose a user has some images on their local machine that they want to go into this html field they are creating. I want it to be super brain-dead easy for them to get those images in there.
Right now I just have a model with an html field and I provide a WYSIWYG editor . On a page that users can see, I just load that model.html (filter it as safe) and display. But if the admin user wants to add an image, they still have to figure out hosting and linking in their html document.
Is there a way to use Django flatpages + static to achieve this? Or some kind of app that provides a wordpress-like editor inside Django?
Honestly I would recommend just installing Mezzanine. It does exactly what you want and is the most lightweight, simple and Wordpress like of the Django CMSs. It integrates TinyMCE and Django filebrowser like you want and you can throw away the bits you don't want. This is almost definitely the quickest way to do what you want.
For example:
I have a user that wants to create a contact form for their personal website. They want three input type=text and one textarea and they specify a label and an name/id for them on my site. Then they can use this form on their site, but I will handle it on mine?
Is it possible for django to spit out custom forms specified by the user?
Edit: If django is too "locked down" what would you recommend I do? I would like to stay with python.
something like http://code.google.com/p/django-forms-builder or one of the million similar addins?
(made into answer at OP's request)
For this you would have some kind of editor that would create a html string. This string would be stored into your database and then upon request you would display it on the user's site.
The editor should be very strict into what it can add and what the user has control over, there are some javascript editors available that will be able to provide this functionality.
The only issue I can think of is that you may run into django escaping the form when displayed to the page.