I have a question regarding editing/saving data in database using Django.
I have template that show data from database. And after each record i have link that link you to edit page.
But now is the question how to edit data in db without using admin panel?
I run thought tutorial in djangobook but i didn't see how to achieve this without using the shell
Thanks in advice!
Have a look at the "Working with forms" section in the Django documentation.
You can use Django authenticaion system to create users and giving them permissions to modify the data.
Related
I set up a Wizard and I wanna add tables in every step, finally I will have a lot of dynamic tables. The goal is to facilitate the tasks and accelerate the development.
Does django have a module that allows:
Dynamically add tables
user can edit the tables and modifying the database automatically.
Thanks for your help :)
You can use some javascript plugins for do that.
I prefer handsontable - you can use community edition for light function.
You can save database using ajax.
See here for more detail.
I need to integrate Django-CMS 3.x into an existing project (mypjc hereafter). I already checked this question (and other similar) but they point to a tutorial page that is no longer available.
I'm a bit confused by the tons of infos you can find online and I have not really understood if Django-CMS can be integrated as an app into an existing and independently running Django project.
mypjc (using Django 1.8) would benefit from a user friendly CMS. Basically I'd the user to be able to write texts and to load in their posts images stored in the (common) database, images that are created by the user in mypjc.
Is it possible? if yes, could anyone help me defying the steps needed to make the integration clean and successful?
Thank you in advance for any help you could provide.
With Django CMS, it is indeed possible to integrate it into an existing project.
If you already have an existing project with URL/menu management, then you can simply integrate just the per-page CMS, which can be added as additional field to your model:
from django.db import models
from cms.models.fields import PlaceholderField
class MyModel(models.Model):
# your fields
my_placeholder = PlaceholderField('placeholder_name')
# your methods
You can find more information here.
For any existing projects, you are likely to need to use the manual installation process outlined here.
I want to develop a python django project for online Examination.
I want to know how to save the responses coming from a webpages.
what are the best ways for saving the responses in python django framework.
Thanks in Advance.
The best way to save the response would be by using Django's built-in models. Generally, each model maps to a single table in a database. So you'd be storing the data in a database, using Django's models.
Check out the documentation on models here:
https://docs.djangoproject.com/en/1.7/topics/db/models/
Also, I'd suggest following Django's excellent tutorial. Most of these questions will be answered once you get a basic understanding of how the Django framework works, for which the tutorial is an excellent start. You can find it here:
https://docs.djangoproject.com/en/1.7/intro/tutorial01/
I have used python so far only for simple applications. I want to create a html file using python code which I can use on web server. How can I create this template using Django?
you'll need an intro, take a look at this post http://elleestcrimi.me/2012/03/15/introduction-django-guestbook-application/
it walks you through creating a simple django app.
if there's something you can't understand there, you can comment on the blog post,
the owner is very helpful
Are there any admin extensions to let bulk editing data in Django Admin? (ie. Changing the picture fields of all product models at once. Note that this is needed for a users POV so scripting doesn't count.) Any thoughts on subject welcome.
With Django 1.1, you can create admin actions which can be applied to multiple entries at once. See the documentation on this subject.
Django "Mass Change" Admin Site Extension.
You have SQL. You can write SQL UPDATE statements.
You have Python for writing batch scripts that interact with the Django ORM. This works really, really well for bulk changes.