Re: Package that helps update only changed fields

2019-06-24 Thread Dan Davis
Thanks, I wrote a mixin class for most of my forms that works a lot like this, although it combines self.changed_fields and self.model._meta.fields to discover which fields to update, rather than the two stages you have above. I discovered when trying to generalize this mixin that some of my

Re: architecture for Blue/Green deployments

2019-06-24 Thread Dan Davis
A related discussion on django-developers has turned up this module, written by one of the participants in the discussion there: https://github.com/aspiredu/django-safemigrate >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django User model

2019-06-24 Thread Andrew C.
Like a profile? Try this: https://simpleisbetterthancomplex.com/tutorial/2016/11/23/how-to-add-user-profile-to-django-admin.html On Mon, Jun 24, 2019 at 9:13 AM AMOUSSOU Kenneth wrote: > Hi everyone, > > Is it possible to create different class that will extend the `User` base > class with

Re: Internal Ranking System Application

2019-06-24 Thread Andrew C.
Np! https://docs.djangoproject.com/en/2.2/ref/models/fields/#floatfield Just refer to the docs. There’s FloatField and DecimalField for models. When you show the numbers in views, just use python to round the numbers. There are plenty of tutorials and SO (stackoverflow) questions that’ll help.

Re: Internal Ranking System Application

2019-06-24 Thread Derek Dong
I just wanted to add a question: I want to store the indices as floats if possible, to at least 3 decimal places, and display them to the nearest integer. Is this possible? On Monday, June 24, 2019 at 8:38:34 PM UTC-4, Derek Dong wrote: > > Thank you so much for the incredibly in-depth

Re: Internal Ranking System Application

2019-06-24 Thread Derek Dong
Thank you so much for the incredibly in-depth response, it's clarified quite a bit of how Django and databases work! I now realize how much I was overcomplicating things. s/a is a formula: the score of an individual divided by the top-15 average. The top-15 average is computed for each contest;

Re: Display ManyToManyField value or a select_related query in an html object list

2019-06-24 Thread Ricardo Daniel Quiroga
Hi, model.many_to_many_atribute.all() model.many_to_many_atribute.find(name="carl") El lun., 24 jun. 2019 a las 19:18, Charlotte Wood (< charlotte.w...@epiccharterschools.org>) escribió: > HELP! > > Do ManyToManyFields just not print? > > I see them in my form selection. > > Everything works

Display ManyToManyField value or a select_related query in an html object list

2019-06-24 Thread Charlotte Wood
HELP! Do ManyToManyFields just not print? I see them in my form selection. Everything works fine, but when I try to put the linked item on a list form, i get: project.model.none for the value. I cannot figure out how to make all the values print. HELP! PLEASE!! -- You received this

Re: Why I cannot save records into database?

2019-06-24 Thread Aldian Fazrihady
How do you render your form? Can I see the content of the template file? Regards, Aldian Fazrihady On Mon, 24 Jun 2019, 20:14 Alexandru Caplat, wrote: > I have a form that in past works good but after I change some data in the > models and add image field it doesn't work. > > From admin I

Re: Creating a log for any changes in any model data i.e creation, updation and deletion??

2019-06-24 Thread Jani Tiainen
Hi. Note that there are still ways to modify data withouth signals getting fired. Nor save or delete is called. ma 24. kesäk. 2019 klo 18.54 Abhishek Tiwari kirjoitti: > That is the approach i have in mind.. Thank you.. > > On Monday, 24 June 2019 20:08:06 UTC+5:30, Brandon Rosenbloom wrote:

Re: Internal Ranking System Application

2019-06-24 Thread Andrew C.
Gotcha. I’ll try my best to explain what you could try. And if this looks sloppy, then I’ll make a public gist. So, firstly, let’s set some things straight. A database is a collection of tables. Models in Django represent one table with multiple columns. Tables do not need to have the same

Re: action in a form

2019-06-24 Thread Kai Kobschätzki
Well, perhaps there is my misunderstanding: I thought if I press "save" it pass through the functions journal_booking_view and then it call the action-argument. Otherwise there is no action-argument it calls the journal_booking_view for saving the view. I'm confused. Greetings bengoshi On

Re: action in a form

2019-06-24 Thread Sebastian Jung
You send your Form to function journal_overview_view. There are nothing with save() Regards Kai Kobschätzki schrieb am Mo., 24. Juni 2019, 21:14: > Hi Sebastian, > > here is the code: > > urls.py: > > from django.contrib import admin > from django.urls import path > from rewe.views import

Re: Internal Ranking System Application

2019-06-24 Thread Derek Dong
I'd like to specify my main problem a bit more. The biggest issue is how to implement the ranking system's calculations and input. The way it is currently done is manually on a Spreadsheet, which is functional but cumbersome in the event of a slight human error, as well as fact that the

Re: action in a form

2019-06-24 Thread Kai Kobschätzki
Hi Sebastian, here is the code: urls.py: from django.contrib import admin from django.urls import path from rewe.views import account_overview_view, journal_booking_view, journal_overview_view from crm.views import member_overview_view, member_create_view urlpatterns = [ path('',

Re: Django-MQTT

2019-06-24 Thread Sabuhi Shukurov
Hello Eric! Thanks for your reply, sorry for late response I was busy with another project. I am doing the same job currently, I should transfer datas real-time using websockets (django channels) involves here. Do you have any suggestion for this? subscibed topic should print datas all in real

Re: How to create Different Graphs and PDF Reports

2019-06-24 Thread Joel Mathew
You can use reportlab for pdf generation On Mon, 24 Jun, 2019, 9:18 PM Balaji Shetty, wrote: > HI > can anyone suggest How to create Different Graphs and PDF Reports in > Django Admin Panel itself which work on Models with relation. > It there any library. > > > > -- > > > *Mr. Shetty Balaji

Re: Anyone is able to delete or update other's post through url

2019-06-24 Thread Jarret Minkler
Relying on the front end is not a secure solution. On Mon, Jun 24, 2019 at 10:37 AM Brandon Rosenbloom < brandonrosenbl...@gmail.com> wrote: > I’m kind of new to this as well but figured I would take a stab at this. > It seems to me that if you wanted to prevent users from deleting posts that >

Re: How to create Different Graphs and PDF Reports

2019-06-24 Thread ABHISHEK RAJ
Yes, you can use Fusion Charts library. Here is the link https://www.fusioncharts.com/blog/creating-charts-in-django/ On Mon 24 Jun, 2019, 9:18 PM Balaji Shetty, wrote: > HI > can anyone suggest How to create Different Graphs and PDF Reports in > Django Admin

Re: Anyone is able to delete or update other's post through url

2019-06-24 Thread Kasper Laudrup
On June 24, 2019 4:35:45 PM GMT+02:00, Brandon Rosenbloom wrote: >I would recommend placing logic in the front end that only shows >the delete option to logged in users who are the original authors of >the post. That would be good for usability (don't give the user options that she cannot

Re: Creating a log for any changes in any model data i.e creation, updation and deletion??

2019-06-24 Thread Abhishek Tiwari
That is the approach i have in mind.. Thank you.. On Monday, 24 June 2019 20:08:06 UTC+5:30, Brandon Rosenbloom wrote: > > Try using Django signals > https://docs.djangoproject.com/en/2.2/topics/signals/ -- You received this message because you are subscribed to the Google Groups "Django

How to create Different Graphs and PDF Reports

2019-06-24 Thread Balaji Shetty
HI can anyone suggest How to create Different Graphs and PDF Reports in Django Admin Panel itself which work on Models with relation. It there any library. -- *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,* *SGGS Institute of Engineering & Technology, Vishnupuri,

Re: Anyone is able to delete or update other's post through url

2019-06-24 Thread Gaurav Sahu
Thanks, It works. Also, other people are able to access the draft posts detail view through URL. I thought of a solution that I will provide only the list of drafts and if the user clicks on it will take to the edit page of that post. But I am not able to implement this thing. On Monday, June

Re: Anyone is able to delete or update other's post through url

2019-06-24 Thread Aldian Fazrihady
I would implement get_queryset method that filter blog post by author=self.request.user Regards, Aldian Fazrihady On Sun, 23 Jun 2019, 20:55 Gaurav Sahu, wrote: > Hy, I am developing a Django Blog application. In this application, I > have a PostEdit view to edit the post, Delete post view

Re: Django mysqlclient

2019-06-24 Thread göktürk sığırtmaç
Thank you i solved according to that https://github.com/PyMySQL/mysqlclient-python/issues/169 24 Haziran 2019 Pazartesi 17:14:40 UTC+3 tarihinde N'BE SORO yazdı: > > Hi > install mysql on your computer then reassure you to have access to mysql at > command prompt. > > once it's Ok active mysql

Re: WORKFLOWS

2019-06-24 Thread ramadhan ngallen
Thanks a lot On 24 Jun 2019, 17:37 +0300, Brandon Rosenbloom , wrote: > I know of developers which have used viewflow to accomplish this. Here’s a > link: > https://github.com/viewflow/viewflow > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Creating a log for any changes in any model data i.e creation, updation and deletion??

2019-06-24 Thread Brandon Rosenbloom
I did this using Django signals. Here’s the documentation: https://docs.djangoproject.com/en/2.2/topics/signals/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

WORKFLOWS

2019-06-24 Thread Brandon Rosenbloom
I know of developers which have used viewflow to accomplish this. Here’s a link: https://github.com/viewflow/viewflow -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Anyone is able to delete or update other's post through url

2019-06-24 Thread Brandon Rosenbloom
I’m kind of new to this as well but figured I would take a stab at this. It seems to me that if you wanted to prevent users from deleting posts that weren’t theirs, the appropriate course of action would be to simply remove their ability to access the delete method in the first place. I would

Creating a log for any changes in any model data i.e creation, updation and deletion??

2019-06-24 Thread Brandon Rosenbloom
Try using Django signals https://docs.djangoproject.com/en/2.2/topics/signals/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

invalid literal for int() with base 10: 'admin'

2019-06-24 Thread Harshit Agarwal
Hi guys, I am currently working on a working on a project. Everything is working fine but i am not able to access my admin. How can i solve this? Here is my Stack Trace Traceback: File "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\exception.py" in inner 34.

Django User model

2019-06-24 Thread AMOUSSOU Kenneth
Hi everyone, Is it possible to create different class that will extend the `User` base class with different attributes? And use those class for authentication Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: How to I create download link of some file using django

2019-06-24 Thread Nishant Boro
You can use this simple module: https://github.com/nishant-boro/django-rest-framework-download-expert This module provides a simple way to serve files for download in django rest framework using Apache module Xsendfile. It also has an additional feature of serving downloads only to users

Re: [novice question] Render a list of objects

2019-06-24 Thread Sudeep Gopal
Update This worked for me..Thanks a lot for your help:- FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 FIELD7 FIELD8 * {% for r in ret_list %} * {{r.field1}} {{r.field2}} {{r.field3}} {{r.field4}} {{r.field5}} {{r.field6}} {{r.field7}} {{r.field8 }} * {% endfor %} *

Re: [Model, ORM] Disabling a field before actually removing it

2019-06-24 Thread Matthieu Rudelle
>From the tests we conducted, even fields that are nullable and that are not used in the code require the underlying column to be present on DB. So as soon as the new release migrates the DB and gets rid of the column. The previous release (that is still running on this DB) complains that the

Re: libssl.so.1.1 / OPENSSL_1_1_1 not found after upgrade (ubuntu server 18.04 / apache / mod_wsgi)

2019-06-24 Thread Volker Kraut
Luke! That did the trick! Many thanks. Am Mo., 24. Juni 2019 um 01:19 Uhr schrieb Luke : > Hah! Found it! > > The psycopg2-binary module needed to be reinstalled (now version 2.8.3) > > I believe the old one must have been compiled against libssl1.1.0, which > was replaced by 1.1.1 in the

Re: [Model, ORM] Disabling a field before actually removing it

2019-06-24 Thread Vinicius Assef
I would, before everything, deploy code to stop using the field. After that, I would make it nullable and, then, remove it from the table. On Mon, 24 Jun 2019 at 05:32, Matthieu Rudelle wrote: > Yep, that's what we're planning on doing. > > It's kind of hacky though, it requires to warn all

Re: [Model, ORM] Disabling a field before actually removing it

2019-06-24 Thread Matthieu Rudelle
Yep, that's what we're planning on doing. It's kind of hacky though, it requires to warn all contributors to not makemigrations or to manually remove the field removal from the generated migration until the new release (and to ignore the screams of CI/CD tools ^^). Thanks for your response,

Re: action in a form

2019-06-24 Thread Sebastian Jung
Hello, Please Post us your url.py template and the related function from view.py Regards bengoshi schrieb am So., 23. Juni 2019, 22:36: > Thanks for your responses. I didn't describe it well.. if I write > > > it calls the url journal and this is the my requested result. All fine. > Without

Re: action in a form

2019-06-24 Thread Kai Kobschätzki
Hi Sipum, yes, you are right! Best Greetings bengoshi Am Mo., 24. Juni 2019 um 08:45 Uhr schrieb Sipum Mishra : > Hi bengoshi, > > If i m not wrong, your concern is when you add action ='journal' then data > are not saved. > Right? > > Thanks. > > > On Mon, 24 Jun, 2019, 2:07 AM bengoshi, >

Re: action in a form

2019-06-24 Thread Sipum Mishra
Hi bengoshi, If i m not wrong, your concern is when you add action ='journal' then data are not saved. Right? Thanks. On Mon, 24 Jun, 2019, 2:07 AM bengoshi, wrote: > Thanks for your responses. I didn't describe it well.. if I write > > > it calls the url journal and this is the my