Re: Django Teachers-Subject-Classroom Question

2017-07-10 Thread Mike Morris
This is more a DB Q than a Django Q, but googling ""schema" course teacher student classroom" yields a useful first hit: https://dba.stackexchange.com/questions/22064/database-schema-design-for-school-system On 07/10/2017 06:05 PM, Cristian Torzsa wrote: Hello, I what is the best database

Re: How show id

2017-07-10 Thread Anish Chapagain
Hi, you should be using *list_display*! here's a sample that i have used in one of my project you too can compare *fields *and *list_display* try adding/removing column names from these elements class ChoiceAdmin(admin.ModelAdmin): fields = ['choice_text', 'votes', 'question',]

Django Teachers-Subject-Classroom Question

2017-07-10 Thread Cristian Torzsa
Hello, I what is the best database design for a Teacher-Subject-Classroom case? For example, a teacher could teach multiple sujbects at multiple classes. How can I keep track of every teacher teaching which subjects at which classroom? Because a teacher can teach 2 different subjects at the

Re: The best database for django

2017-07-10 Thread Mike Morris
PostgreSQL or Oracle is the most "robust" of supported DB. (Certainly an opinion, but I doubt its a very controversial one.) If you had Oracle, you'd probably be required to use it so I'm assuming you can choose... which means you want PostgreSQL (free and very, very nearly as good - better

Re: How to create a fixed-length binary field with a unique constraint?

2017-07-10 Thread Mike Morris
From your description (save a SHA-256 checksum), you do not need a binary field. Binaries are always of indeterminant length; they can hold photos, executables, sound files, etc. By definition, a SHA -256 is 256 bytes of ASCII. You probably want a CharField(length=256). On 07/10/2017

Re: How show id

2017-07-10 Thread carlos
yes used this fieldsets, here documentation https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets Cheers On Mon, Jul 10, 2017 at 2:08 PM, Informatico Neurodesarrollo < infneurodcr@infomed.sld.cu> wrote: > Hello, I am a new programmer on Django.

How show id

2017-07-10 Thread Informatico Neurodesarrollo
Hello, I am a new programmer on Django. I want in this class show, in the admin site of Django, the field "id", I don't want create other field, if this could be possible. class Tarjeton(models.Model): farmacia = models.ForeignKey(Farmacia, null=True, on_delete=models.SET_NULL) MOTIVO

database names in queries on multiple databases

2017-07-10 Thread Florian Wegscheider
TLTR: Django does not include database names in SQL queries, can I somehow force it to do this, or is there a workaround? The long version: I have two unmanaged legacy MySQL databases (Note: I have no influence on the DB layout) for which I'm creating a readonly API using DRF on Django 1.11

Re: How can create multiple Model objects at the same time from the same form?

2017-07-10 Thread Bledi
I think you should use formsets. https://docs.djangoproject.com/en/1.11/topics/forms/formsets/ On Monday, July 10, 2017 at 11:20:19 AM UTC-4, Denis Cosmin wrote: > > I have a form Author that contains the field first_name, last_name, and > email. > > I want to be able to create 1-10 of them at

how to display a foreign key image of an object in an object_list view/template?

2017-07-10 Thread Bledi
I am trying to build a website where you can sell stuff. I want the user to be able to upload multiple images per product/post. I think I have figured that part out. But I am struggling to display one image per product. Here are the details: models.py (I have left out some basic methods)

Re: The best database for django

2017-07-10 Thread Jani Tiainen
Hi, Like Rich suggested start with Postgres. It's very powerful and has first class support in Django. 10.7.2017 19.15 "DEIBER ANDRES RINCON ROJAS" kirjoitti: > Hi to everybody, I'm developing an web application using Python and Django > and it requires storage of

Re: The best database for django

2017-07-10 Thread Rich Shepard
On Mon, 10 Jul 2017, DEIBER ANDRES RINCON ROJAS wrote: Hi to everybody, I'm developing an web application using Python and Django and it requires storage of excel data, data volume high and still I don't have a clear idea about what database manager implement, Could anyone help me with some

How to create a fixed-length binary field with a unique constraint?

2017-07-10 Thread Guido Winkelmann - Hornetsecurity
Hi, How can I create a table with a fixed-length binary field with a unique constraint? I need to save a SHA-256 checksum as a part of my objects, and I need to make sure I never have two or more objects with the same checksum in the database. Also, I need to be able to look up objects by that

The best database for django

2017-07-10 Thread DEIBER ANDRES RINCON ROJAS
Hi to everybody, I'm developing an web application using Python and Django and it requires storage of excel data, data volume high and still I don't have a clear idea about what database manager implement, Could anyone help me with some suggestions please?. Thanks for your time -- You

Re: How can create multiple Model objects at the same time from the same form?

2017-07-10 Thread Oladipupo Elegbede
Do you mean creating 1-10 authors at once? If that is the case, so you have the input for the three fields somewhere say an excel file, or a list of lists, etc? If you do, I'd say loop through the document with the input venue and let it fill the parameter spaces dynamically. Call a .save on it

How can create multiple Model objects at the same time from the same form?

2017-07-10 Thread Denis Cosmin
I have a form Author that contains the field first_name, last_name, and email. I want to be able to create 1-10 of them at the same time. How may I do that? I only need help in creating the form and the view. -- Sincerely, Denis Nutiu -- You received this message because you are subscribed

Re: Картинки в Django

2017-07-10 Thread Karol Bujaček
Hello Yurij, You can start reading these articles: https://coderwall.com/p/bz0sng/simple-django-image-upload-to-model-imagefield https://docs.djangoproject.com/en/1.11/topics/http/file-uploads/

Re: Картинки в Django

2017-07-10 Thread Владислав Котвицкий
В папках проекта надо хранить. Без вирусов. www.avast.ru <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> С