Re: Hashing user emails

2022-09-15 Thread Ryan Nowakowski
I'm not sure a hash will meet your needs. What kinds of things are you trying to secure against? Examples: 1. I want to make sure that if the data in my database is stolen that the email addresses won't be able to be read. 2. I want to obscure the sender and receiver email addresses so that

Re: Migrate to mongodb is failing

2022-09-12 Thread Ryan Nowakowski
On September 12, 2022 7:38:21 AM EST, "Fábio Barboza de Freitas" wrote: >I'm trying to migrate the django tables to mongo, but it is the error I get: > >Applying contenttypes.0002_remove_content_type_name...This version of >djongo does not support "DROP CASCADE" fully. Visit

Re: Negative Stock Prevention

2022-09-01 Thread Ryan Nowakowski
nstraint failed: quantity > > > >On Thu, Sep 1, 2022 at 3:45 AM Ryan Nowakowski wrote: > >> I don't see any error. Did you forget to post it? >> >> On August 31, 2022 5:57:32 AM CDT, tech george >> wrote: >>> >>> Hello, >>> >>>

Re: Performance regression when moving from 3.1 to 3.2 (same with 4)

2022-09-01 Thread Ryan Nowakowski
Can you dump the generated sql from both Django versions? https://docs.djangoproject.com/en/4.1/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running On September 1, 2022 8:58:08 AM CDT, Marc Parizeau wrote: >Hi, > >I am seing a sharp increase in execution time for some of my queries

Re: Negative Stock Prevention

2022-08-31 Thread Ryan Nowakowski
gt;> Try changing `if quantity > 0` to `if instance.quantity >= qu` >> >> >> On Tuesday, August 30, 2022 at 3:44:51 PM UTC+1 Ryan Nowakowski wrote: >> >>> On Mon, Aug 29, 2022 at 05:18:39PM +0300, tech george wrote: >>> > Please help crack the below

Re: Negative Stock Prevention

2022-08-30 Thread Ryan Nowakowski
On Mon, Aug 29, 2022 at 05:18:39PM +0300, tech george wrote: > Please help crack the below code, I want to prevent negative stock, and if > the stock is == 0, deduct it from reorder_level instead. > Currently, the stock goes negative. > > models.py > > class Stock(models.Model): > quantity =

Re: What Programming Language should i learn

2022-08-30 Thread Ryan Nowakowski
On Tue, Aug 30, 2022 at 03:35:26PM +0100, fawemimo olawale wrote: > Which of these programming language should i learn > > Please I need counselling on this two language though i have prior > knowledge on Python Web Framework (Django) as a beginner's but i want > Backend Language > > JAVA or

Re: How to use same Models for all apps?

2022-08-27 Thread Ryan Nowakowski
You can use a model from one app in other apps. Simply import it in the apps where you need it. On August 27, 2022 5:43:40 PM CDT, "Javier L. Camacaro" wrote: >Do i need to repeat the models for each app?, Can I use same model for all >the apps in my project? > > >I'm a new a DJango

Re: Chat app using django

2022-08-25 Thread Ryan Nowakowski
On Wed, Jul 20, 2022 at 06:11:08AM +0530, Lakshyaraj Dash wrote: > I'm having a discussion website in django with some sort of user > authentication and I want to inject chat app with rooms made by the users > themselves. I don't want any js framework in the frontend. Just tell me how > to make

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-08-25 Thread Ryan Nowakowski
On Sun, Jul 31, 2022 at 12:55:46AM -0700, Joseph Bashorun wrote: > I am stuck in a loop of confusion. I am trying to build an ecommerce > website and make it production ready. Do i need to build an API for it? No https://twitter.com/htmx_org/status/1561808410856898561 -- You received this

Re: How to Manage User & Create a Model

2022-08-25 Thread Ryan Nowakowski
On Wed, Aug 24, 2022 at 12:48:26AM -0700, Aakash Bhaikatti wrote: > As a User > >- I can signup either as LIBRARIAN and MEMBER using username and password >- I can login using username/password and get JWT access token > > As a Librarian > >- I can add, update, and remove Books from

Re: I want to fetch the value of radio field for updation but it only doesn't fetch even i use condition and value does comes but doesn't checked

2022-08-23 Thread Ryan Nowakowski
On Mon, Aug 22, 2022 at 12:26:40PM +0530, Abhinandan K wrote: > checked{% endif %} >Male > checked{% endif %}>Female > Do you need quotes around Male/Female like this? {% if val_gen == 'Male' %} -- You received this message because you are subscribed to the Google Groups "Django users"

Re: One model field map to two database columns

2022-08-23 Thread Ryan Nowakowski
On Mon, Aug 22, 2022 at 05:56:00AM -0700, Dann Luciano wrote: > It is possible to map one field in a Model to two or more database columns? > For example: > > class User(models.Model): > encrypted_hash_email = EncryptedHash() > > then in database we have > > encrypted_email and hash_email

Re: converting CURL command

2022-08-21 Thread Ryan Nowakowski
In the past I've used subprocess.run to shell out and run curl. Those were weird circumstances though. Typically I use the requests library instead. On August 21, 2022 2:27:02 PM PDT, "lone...@gmail.com" wrote: >Hello all, > > I am interested in converting the CURL command of: > >curl

Re: DeleteView Class

2022-08-21 Thread Ryan Nowakowski
It looks like you can override the delete method to get rid of the redirect behavior: http://ccbv.co.uk/projects/Django/4.0/django.views.generic.edit/DeleteView/#delete On August 20, 2022 2:39:46 AM CDT, Hussein Ahmad wrote: >hi.. i dont want my delete button to redirect to a success url,how

Re: remove user from a specific group in django

2022-08-17 Thread Ryan Nowakowski
usuario isn't a username, it's a QuerySet so I don't think: User.objects.get(username=usuario) ... will work. Please post the specific error you're getting including any traceback. On August 16, 2022 3:30:46 PM CDT, "José Ángel Encinas" wrote: >hi guys, im trying to remove user from a

Re: data model question

2022-08-17 Thread Ryan Nowakowski
How much data are you expecting from each data source? The volume of data will partially determine your solution. On August 17, 2022 7:13:14 AM CDT, yaron amir wrote: >we are developing a control system that looks at data from multiple sources. >some of the data is extracted from AWS, some from

Re: Generating Calendar files for iPhone and Android with Pthon3/django

2022-08-02 Thread Ryan Nowakowski
The standard is called iCal. There are a few different python libraries to choose from. On August 1, 2022 2:51:34 PM CDT, "lone...@gmail.com" wrote: >Hello all, > > I want to generate calendar files for both Android and iPhone. I do >not want to connect to the Google or Apple APIs to do

Re: ForeignKey Reverse Relation Fail

2022-07-31 Thread Ryan Nowakowski
Since this is a question about your models, please post your models.py. On 7/27/22 5:18 AM, Malik Rumi wrote: I have a model with a recursive foreign key to 'self'. This is intended to model a parent child relation among instances. The forward relation, on a field called 'childof', works as

Re: Google Authentication code

2022-07-25 Thread Ryan Nowakowski
Your question is a little unclear but I'm assuming that you are trying to add Google authentication to your Django project. I've used: https://python-social-auth.readthedocs.io/en/latest/ ...with good results in the past. I've also heard good things about:

Re: Bug Request!

2022-07-25 Thread Ryan Nowakowski
You'll definitely want to include the actual exceptions and warnings that are occurring in your bug report. On July 25, 2022 9:05:53 AM CDT, Ken Booo wrote: >Here, I caught a one bug on Django-->4.0.6 >There is no argumented support and base_dir is having exemptions causing >warnings![image:

Re: Search option in website

2022-07-23 Thread Ryan Nowakowski
You mentioned you're not using models. Where are you storing the data you want to search? On July 23, 2022 8:42:40 PM CDT, Mahendra wrote: >I am not using models using only URLs is any ways to go like using Ajax or >JavaScript language please suggest me? > >On Sat, 23 Jul 2022, 22:11 Lakshyaraj

Re: Help to implement join query in django orm

2022-07-23 Thread Ryan Nowakowski
On Fri, Jul 22, 2022 at 12:16:14PM +0530, Avi shah wrote: > I have two tables > Tbl 1 > & > Tbl 2 > > I need to connect the two tables using a join If these tables were created outside of Django, in other words, not using manage.py migrate, you can use Django's legacy database support to auto

Re: External Authentication with username in header

2022-07-18 Thread Ryan Nowakowski
Middleware is how Django does it. https://docs.djangoproject.com/en/4.0/ref/middleware/#module-django.contrib.auth.middleware On July 15, 2022 4:19:10 PM CDT, Mark Glass wrote: >I would like to change the link that opens a Django app. Currently the app >is launched with GET

Re: Best digital ocean plan for a production server

2022-07-10 Thread Ryan Nowakowski
Ram, It depends. How many http transactions per second are you expecting? What database are you using? Based on your estimated http TPS, how many database queries per second are you expecting? What percentange of those database queries are read vs write? - Ryan N On Sat, Jul 09, 2022 at

Re: How to roll back related objects if any error happened.

2022-07-04 Thread Ryan Nowakowski
You can use transaction.atomic: https://docs.djangoproject.com/en/4.0/topics/db/transactions/#controlling-transactions-explicitly On July 4, 2022 7:16:41 AM EDT, Sencer Hamarat wrote: >Hi, > >Say I have a parent and a child model. > >And also there is a view which is using DRF serializers to

Re: How to ignoring columns on model save

2022-06-28 Thread Ryan Nowakowski
On June 27, 2022 4:36:49 AM CDT, "ro...@tonic-solutions.com" wrote: >I know I could set `something like `instance.save(update_fields=[field for >field in instance._meta.fields if field.name != "_search")` but it would >need to be set on every save for that model throughout the application,

Re: Need some help

2022-06-28 Thread Ryan Nowakowski
Yup On June 26, 2022 8:11:01 PM CDT, Rohit Lohar wrote: >Can I make a form with the help of htmx such that the whole form has a >small container is dynamic and else whole part is static? > >On Mon, Jun 27, 2022, 4:07 AM Ryan Nowakowski wrote: > >> If you want the init

Re: Turn Django Web App to Mobile App

2022-06-28 Thread Ryan Nowakowski
I've used Cordova before https://cordova.apache.org/ On June 28, 2022 3:26:04 PM CDT, Lightning Bit wrote: >Hello all, > >Where should one start to convert a Django Web App into a Mobile App for >the Play Store and Apple Store? Appreciate the help! > >-- >You received this message because

Re: ?? question ,its urgent

2022-06-26 Thread Ryan Nowakowski
An alternative to storing all values in a single model field is to use EAV: https://en.m.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model On June 20, 2022 1:46:42 AM CDT, Abhinandan K wrote: >how to store the data in django databse table if user append fields >according to their

Re: Need some help

2022-06-26 Thread Ryan Nowakowski
If you want the initial input field value to change dynamically when the select field option changes, there's a bunch of different ways to do this. My current favorite is htmx https://htmx.org/ - Ryan On June 26, 2022 5:10:19 AM CDT, Rohit Lohar wrote: >Hi there, >I am currently making a

Re: Django could not parse the remainder

2022-06-23 Thread Ryan Nowakowski
https://stackoverflow.com/questions/8252387/how-do-i-access-dictionary-keys-that-contain-hyphens-from-within-a-django-templa On Mon, Jun 20, 2022 at 07:52:46AM -0700, Koushik Romel wrote: > When trying to get a value from restapi in for loop to display it takes > hyphen(-) as minus(-). And there

Re: I can't use shared server's Ip Address for run Django

2022-06-19 Thread Ryan Nowakowski
Please copy and paste that section of your settings.py and the full error including any traceback. On June 16, 2022 11:54:44 PM CDT, saranphat roungkitrakran wrote: >I have to put my project to share sever for others can use it . I try to >change allow_host become shared server's Ip Address

Re: How to achieve bulk soft delete in django?

2022-06-16 Thread Ryan Nowakowski
Add a soft delete method to a custom QuerySet, then use that as a custom Manager for your model. https://docs.djangoproject.com/en/4.0/topics/db/managers/#creating-a-manager-with-queryset-methods On June 16, 2022 5:13:29 AM CDT, Sencer Hamarat wrote: >Hi, > >The models delete methods

Re: Can't login with Username

2022-06-16 Thread Ryan Nowakowski
You could use manage.py shell to set the email address of your super user. On June 13, 2022 12:22:30 AM CDT, Sudip Khokhar wrote: >Hi All, > >I am practicing Django since 3 months and recently I encountered an issue >with my practice project as I made a super user and didn't added email to

Re: How to hash fields and detect changes in a record

2022-06-15 Thread Ryan Nowakowski
On June 14, 2022 10:29:40 PM CDT, Mike Dewhirst wrote: >On 14/06/2022 11:20 pm, Ryan Nowakowski wrote: >> >> Summing the ordinal of the characters won't catch transposition: >> >> >>> chars = 'ab' >> >>> sum([ord(c) for c in chars])

Re: I can't use accented letters in my model

2022-06-14 Thread Ryan Nowakowski
This is a good primer on bytes vs strings: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ On June 14, 2022 2:43:54 AM CDT, Antonis Christofides wrote: >Exactly. The important

Re: How to hash fields and detect changes in a record

2022-06-14 Thread Ryan Nowakowski
On 6/12/22 11:40 PM, Mike Dewhirst wrote: Original message From: Ryan Nowakowski Date: 13/6/22 07:09 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: How to hash fields and detect changes in a record On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote

Re: Using a lazy value in a queryset filter?

2022-06-12 Thread Ryan Nowakowski
On Sun, Jun 12, 2022 at 11:46:44AM -0700, Sylvain wrote: > Hello, > > I’m trying to use the current language of the user in a queryset, but the > value gets resolved outside of the request-response cycle. I thought this > could work since querysets are lazy, but I guess that doesn’t make the >

Re: How to hash fields and detect changes in a record

2022-06-12 Thread Ryan Nowakowski
On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote: > On 10/06/2022 11:24 pm, Ryan Nowakowski wrote: > > On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote: > > > I think the solution might be to hash note.title and note.note into a new > > > fi

Re: How to hash fields and detect changes in a record

2022-06-10 Thread Ryan Nowakowski
On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote: > The use case is auto-deletion of out-of-date records if they have not > changed. > > That might sound weird but it is the solution I have come to for a > particular problem. My software analyses chemical properties and writes note >

Re: ComboBox

2022-06-04 Thread Ryan Nowakowski
The HTML element you probably want is a datalist[1]. There's no built-in Django support for datalist[2] so you'll probably need to create a custom widget. [1] https://stackoverflow.com/a/14614750 [2] https://code.djangoproject.com/ticket/32125 On May 31, 2022 11:52:31 AM CDT, Phil Parkin

Re: Deploy Tailwind Template with Django

2022-06-01 Thread Ryan Nowakowski
Drop the HTML into your templates directory. Then put all the static assets ( CSS, js ) in your static directory. Change all the references to the static assets in your HTML to the new location and your static directory by using the staticfiles template tag. On May 31, 2022 6:52:12 PM CDT, Ry

Re: Auto Template Update

2022-05-31 Thread Ryan Nowakowski
There's a couple of ways to update the UI without the user doing anything. First, you can poll the server at a regular interval using JavaScript. Second, you can use a websocket to push updates from the server to the client. On May 30, 2022 6:28:40 AM CDT, Dev femibadmus wrote: >fine! we can

Re: Allocating items to users

2022-05-23 Thread Ryan Nowakowski
On Fri, May 13, 2022 at 09:27:48AM -0700, 'dtdave' via Django users wrote: > I have the following code: > from django.conf import settings > from django.db import models > > class AccountManager(models.Model): > account_manager = models.ForeignKey( > settings.AUTH_USER_MODEL,

Re: Django SMS project

2022-05-23 Thread Ryan Nowakowski
On Sun, May 22, 2022 at 09:08:27AM +0100, Tanni Seriki wrote: > Hi guys I have a project of django to send SMS to mobile number, > Please guys I really need your helps I agree with the other replies that your post is a little vague. That being said, in general when I want to send txts from

Re: Class based views with forms

2022-04-28 Thread Ryan Nowakowski
You're right, it's not very clear how to have a single class-based view handle both displaying details and submitting a form.  This is a fantastic site that shows how each class based view is set up inheritance-wise: https://ccbv.co.uk/ Take a look the ancestors for DetailView:

Re: I need a documentation in Thai language

2022-04-18 Thread Ryan Nowakowski
Maybe try Google translate? https://docs-djangoproject-com.translate.goog/en/4.0/?_x_tr_sl=auto&_x_tr_tl=th&_x_tr_hl=en&_x_tr_pto=wapp On April 9, 2022 1:08:34 PM CDT, frame fF wrote: > I'm not good at English in the future. documentation Thai language? > >-- >You received this message

Re: Using Multiple databases

2022-04-15 Thread Ryan Nowakowski
On Wed, Apr 06, 2022 at 08:59:09AM -0700, Vasanth Mohan wrote: > I'm building a PoC for a multi-tenant app where I'm trying to use the same > schema across multiple databases with Django instance. I've got a couple of > questions and I'd be happy to have some input > > 1. Is there a way to

Re: Filtering User Data/Records

2022-04-15 Thread Ryan Nowakowski
On Thu, Apr 07, 2022 at 01:08:19PM +0300, tech george wrote: > I am trying to filter my medicine stock data so that Pharmacist 1 can only > view their records but not Pharmacist 's 2 records. > > So far nothing is filtered and all the pharmacists can see all the > available records, Please

Re: How to create dynamic models in django??

2022-03-09 Thread Ryan Nowakowski
On Sun, Feb 27, 2022 at 09:10:05AM +0530, Prashanth Patelc wrote: > How to create dynamic models in django rest framework? > Is there any chance to create dynamic models with APIs > > Any examples please send me thanks in advance.. > > 1) Requirement is need create table name and fields in

Re: Slow page load performance with a large number of formsets (over 25)

2022-02-25 Thread Ryan Nowakowski
Steven, are you using ModelFormSet? If so, Is it the initial query that's slow? The form rendering? Or is it the POST back to the server that's slow? You can use django-debug-toolbar[1] to profile your page and get these metrics. Once you figure out what part is slowest, then you can

Re: How to validate xl data

2022-02-25 Thread Ryan Nowakowski
On Mon, Feb 14, 2022 at 12:04:13PM +0530, Prashanth Patelc wrote: > i am working on xl sheets , when im uploading the xl sheet it is storing > into the models but i need before storing into the models validate the data > > eg: > username : ,must be str not int > reference id : ,must be int not

Re: Salary Generate

2022-02-25 Thread Ryan Nowakowski
On Tue, Feb 15, 2022 at 06:32:34AM -0800, Feroz Ahmed wrote: > i am stuck at point to generate salaries for upcoming month, > as i already have last month January data as fields(month, name , gross > sal, tax deduction, net sal) > and it has records of 35 (employees) > in form template i have

Re: django-oscar customisation

2021-12-09 Thread Ryan Nowakowski
Try running the sandbox application: https://django-oscar.readthedocs.io/en/stable/internals/sandbox.html Then you can poke around that sandbox code and see how they did things. On November 22, 2021 2:23:28 AM CST, "Hervé Edorh" wrote: >Hi, >I am new to django-oscar and i try to understand

Re: Declarative mechanism for Django model rows

2021-12-09 Thread Ryan Nowakowski
Check out fixtures: https://docs.djangoproject.com/en/3.2/howto/initial-data/ On December 8, 2021 1:25:45 PM CST, Alex Dehnert wrote: >With some frequency, I end up with models who contents are approximately >constant. Are there good ways of handling this? > >For example, I might have a set of

Re: Chained filters on Country and City Fields

2021-10-15 Thread Ryan Nowakowski
I assume you're using Django smart selects since you seem to be using chained foreign key. Here's the documentation on how to get this to work inside your own templates: https://django-smart-selects.readthedocs.io/en/latest/usage.html#usage-in-templates On October 11, 2021 8:36:21 AM CDT,

Re: Python code changes are not reflecting on Django-based web server.

2021-09-30 Thread Ryan Nowakowski
d, i verified by checking the web page. How > can i check pid? > > Regards > Hasan > > > On Aug 19, 2021, at 8:55 AM, Ryan Nowakowski wrote: > > > > I'd verify that the systemctl commands are actually starting and stopping > > httpd. Does the pid change? >

Re: Python code changes are not reflecting on Django-based web server.

2021-08-19 Thread Ryan Nowakowski
I'd verify that the systemctl commands are actually starting and stopping httpd. Does the pid change? On August 18, 2021 11:04:07 AM CDT, Hasan Baig wrote: >Hi, > >I have been hosting a django-based web server (httpd with mod_wsgi package) on >Linux CentOS 7. I used to reflect the changes made

Re: Git Hub Project

2021-08-10 Thread Ryan Nowakowski
You might have mixed tabs and spaces. PEP8 standard is 4 spaces per level of indentation, IIRC. On August 9, 2021 7:24:56 AM CDT, Rana Zain wrote: > >Thank you so much everyone. It's work. > >I have another problem. I am facing this issue in Pycharm . I tried >spaces >& tabs. > >Error is

Re: how to question (web page item placement)

2021-07-12 Thread Ryan Nowakowski
I'm that case you might want to skip responsive design and take a look at relative or absolute positioning with CSS for the margin and indentation. Look at flexbox for the boxes. On July 11, 2021 4:13:58 PM CDT, o1bigtenor wrote: >On Sun, Jul 11, 2021 at 11:05 AM Ryan Nowakowski >

Re: how to question (web page item placement)

2021-07-11 Thread Ryan Nowakowski
Do you want the indentation to be different on different screens sizes(mobile phone, tablet, laptop, desktop)? 3.5 cm might be too much on mobile devices. On July 11, 2021 10:14:23 AM CDT, o1bigtenor wrote: >Greetings > >Am looking to use django for a personal application. > >I am one of those

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread Ryan Nowakowski
On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote: > Hi Django experts. > I am building a Django, DRF based mobile app and I want to have > functionality of up votes and down votes for posts that user will post. > So what I want to say here that, if an user upvotes a post then it

Re: Real-time dashboard method after delivering restapi from outside

2021-06-15 Thread Ryan Nowakowski
On June 14, 2021 1:46:29 AM CDT, "이경현" wrote: >It is currently returning after receiving an api request from another >system. Is this API request to another system initiated from Django on the back end or in JavaScript on the front end? -- You received this message because you are

Re: DEFAULT Django Session is still using File in /tmp (Can't read from directory)

2021-06-13 Thread Ryan Nowakowski
tried to implement the application on multiple nodes. > > On Wednesday, April 28, 2021 at 6:41:24 PM UTC+7 Ryan Nowakowski wrote: > > > What makes you think this has anything to do with Django sessions? > > > > > > On April 27, 2021 11:15:57 PM CDT, Andre Foote

Re: django app with okta authentication --

2021-06-01 Thread Ryan Nowakowski
On Tue, Jun 01, 2021 at 10:18:24PM +0530, SNJY G wrote: > I am running an application on django2.2 which needs to be integrated with > okta for user authentication. > Okta team has provided a Metadata URL which contains Okta URL, Okta Entity > ID and Okta certificate but I am not sure where I need

Re: Creating dynamic chart / graphs with Django

2021-05-16 Thread Ryan Nowakowski
I like to start with one of the free dashboard templates for a project like this. I've used both CoreUI and AdminLTE in the past with good success. These dashboard templates include some sample graphs using one of the standard JavaScript charting libraries. I look at these graph examples for

Re: Attribute error

2021-05-13 Thread Ryan Nowakowski
It's likely that your instance of OrderItem has a product field that's null. On May 12, 2021 3:50:42 AM CDT, Peter Kirieny wrote: >can somebody help with this please, am building an ecommerce web and >when i >want to view my cart i get this error >AttributeError: 'NoneType' object has no

Re: Threading videos one after the other

2021-05-09 Thread Ryan Nowakowski
Note: I googled for "HTML video playlist" On May 9, 2021 10:41:28 AM CDT, Ryan Nowakowski wrote: >https://stackoverflow.com/a/2552131/226697 > >On May 8, 2021 2:12:15 PM CDT, "מוריה יצחקי" >wrote: >>Hi >>Thanks to all the helpers >>I got fr

Re: Threading videos one after the other

2021-05-09 Thread Ryan Nowakowski
https://stackoverflow.com/a/2552131/226697 On May 8, 2021 2:12:15 PM CDT, "מוריה יצחקי" wrote: >Hi >Thanks to all the helpers >I got from the Python file to the HTML file a list of URLs that are >inside >the arraysrc variable >And I want to run all the videos one after the other ends up in the

Re: custom commands for django-admin

2021-05-06 Thread Ryan Nowakowski
On May 6, 2021 5:35:58 PM CDT, Ilia Rk wrote: > >hi how should i write custom commnads for django-admin which work with >all >apps existing in project not just apps with specific defined name When you say "work with all apps" what do you mean? Any custom management command can import

Re: To get object id currently modified in django administration

2021-05-02 Thread Ryan Nowakowski
While in your ModelForm, check out self.instance.id On May 2, 2021 2:42:30 AM CDT, Serge Alard wrote: >Bonjour > >Je suis en train de faire des validations personnalisées sur des objets >de >mon projet dans l'administration de Django. Pour cela j'ai créé un >ModelForm, mais je ne sais pas

Re: Loading csv data in database

2021-04-29 Thread Ryan Nowakowski
Typically you would write a custom management command for this kind of thing: https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/ On April 29, 2021 11:05:29 AM CDT, 'Muhammad Asim Khaskheli' via Django users wrote: > >Hi, > >I wanted to ask how to load CSV data into the

Re: DEFAULT Django Session is still using File in /tmp (Can't read from directory)

2021-04-28 Thread Ryan Nowakowski
ever I'm using the default configuration for sessions that's >supposed to >be database-backed. >On Tuesday, April 27, 2021 at 9:52:03 PM UTC+2 Ryan Nowakowski wrote: > >> >> >> On April 26, 2021 11:31:24 PM CDT, Andre Foote >> wrote: >> >However, the applica

Re: DEFAULT Django Session is still using File in /tmp (Can't read from directory)

2021-04-27 Thread Ryan Nowakowski
On April 26, 2021 11:31:24 PM CDT, Andre Foote wrote: >However, the application crashes with the error stating that it is >unable >to read the session data stored in "/tmp". Please post the full error including any exception messages and the full Python trace back if available. -- You

Re: Assistance with Django Booking app

2021-04-21 Thread Ryan Nowakowski
ymore. Is there a way I can manage to run the booking app without >using >django.utils It looks like you're probably trying to run that Django booking app with a version of Django that it was never designed to run with. It looks like the author of Django booking didn't lock down the django

Re: Django Offline

2021-04-18 Thread Ryan Nowakowski
Typically JavaScript is treated as a static file: https://docs.djangoproject.com/en/3.2/howto/static-files/ On April 18, 2021 11:25:53 AM CDT, Abid Mohamed Nadhir wrote: >Hello, I'm trying to implement a django project with service worker, >i'm >wondering where to put my service worker?

Re: Create email template with the click of a button

2021-04-17 Thread Ryan Nowakowski
Sorry for the weird wording below. Speech to text isn't all is cracked up to be. Just one more point: the JSONField allows your to easily do queries on the individual email addresses if your need to. On April 17, 2021 12:52:15 PM CDT, Ryan Nowakowski wrote: >I've had a similar is

Re: Create email template with the click of a button

2021-04-17 Thread Ryan Nowakowski
I've had a similar issue in the past. With the latest version of Django pretty much each database back in now supports JSONField. So I created a custom field that inherits from JSON field to take a string of comma delimited values, split them by comma, validate each value individually, then

Re: new python dev jobs (was: Try to connect Redis Channel in Django Chat Project)

2021-04-09 Thread Ryan Nowakowski
Hey Hemanth, Welcome to python! Just a note... it's considered bad form to hijack an existing mailing list thread and change the topic[1]. You should instead send a brand new email (don't hit the reply button on an existing thread). Now, regarding junior developer python jobs, are you looking

Re: License management system Refrence

2021-04-08 Thread Ryan Nowakowski
hits the service API at 9:00:00 and device B hits the service at 9:00:01, is that allowed? > On Wed, Apr 7, 2021 at 10:16 AM Ryan Nowakowski wrote: > > > What kind of product are you trying to license? A proprietary computer > > desktop application? A mobile application for iOS

Re: Unique and null

2021-04-08 Thread Ryan Nowakowski
On Thu, Apr 08, 2021 at 11:12:51PM +0100, Roger Gammans wrote: > On Thu, 2021-04-08 at 16:36 -0500, Ryan Nowakowski wrote: > > On Wed, Apr 07, 2021 at 03:25:53PM +0100, Roger Gammans wrote: > > > This is mostly (form the Django perspective) and issue with > > >

Re: Assistance with Django Booking app

2021-04-08 Thread Ryan Nowakowski
On Thu, Apr 08, 2021 at 07:19:53AM -0700, Eric 247ERICPOINTCOM wrote: > I am new to Python and Django, I just discovered that I can use Django to > easily implement a project that am working on. > > I would like to get some assistance with implementing a booking app into my > project. > > I

Re: Extending with plugins remotely -at least from a frontend

2021-04-08 Thread Ryan Nowakowski
On Wed, Apr 07, 2021 at 11:42:30PM +0100, Joel Tanko wrote: > Hi guys I have a question just one, but it houses a myriad of smaller > questions for clarity. > > So I'm building a django app that creates virtual organizations, I'm > planning on hosting with digitalocean for reasons. My app just

Re: Listview Iterate over List

2021-04-08 Thread Ryan Nowakowski
On Wed, Apr 07, 2021 at 11:02:04AM -0700, sebasti...@gmail.com wrote: > i want to create a Listview like this: > > class HistorieListView(ListView): > model = Address > template_name = 'marketing/liststandardtemplate.html' > fieldlist = ('id', 'lastname', 'firstname') > > now i want

Re: Unique and null

2021-04-08 Thread Ryan Nowakowski
On Wed, Apr 07, 2021 at 03:25:53PM +0100, Roger Gammans wrote: > This is mostly (form the Django perspective) and issue with CharFields, > because a CharField can store None or ''. For values of '' > in CharField, IIRC, django will convert them to null, with null=True, > blank=True. But not with

Re: Unique and null

2021-04-07 Thread Ryan Nowakowski
I'm not sure about the case with null. However, I believe that most uses of CharField leave null=False and use the empty string instead to represent "empty" value. On April 7, 2021 1:06:44 AM CDT, Mike Dewhirst wrote: >I have just made a CharField unique and Django detects duplicates >nicely

Re: image reading

2021-04-06 Thread Ryan Nowakowski
I'm going to assume you mean "text" here and not "test". For recognizing text in images I've used the tesseract project with pretty good success. For more information about this you can Google OCR or optical character recognition. For parsing text in PDF, it depends on how the text is encoded

Re: License management system Refrence

2021-04-06 Thread Ryan Nowakowski
What kind of product are you trying to license? A proprietary computer desktop application? A mobile application for iOS or Android? A proprietary self-hosted web app? On April 6, 2021 1:50:51 AM CDT, "bikash...@gmail.com" wrote: >Can any one provide me reference regarding license (Serial

Re: how to publish django-reactnative app on google playstore

2021-04-06 Thread Ryan Nowakowski
Smriti, If you already have your Django backend set up and running somewhere on the interwebs then your question here is really about how to publish an Android app to the Google Play store, right? The fact that your Android app is written using react native is really just a side note. You'll

Re: Beginning project of displaying graphical information from a sql database

2021-04-06 Thread Ryan Nowakowski
If you already have the data you need via the API you may not need models in your case. To start out, call the API from your Django view, add the data from the resulting data frame to the context for the template. Then in the template render it however you like... charts, graphs, tables,

Re: Regarding auto-generating a map with measurements

2021-04-05 Thread Ryan Nowakowski
hat values I need to change in my SVG Django template. On Sun, Apr 04, 2021 at 08:05:27AM +0530, Srijita Mallick wrote: > Actually that's a great idea, thanks :). We can create a large rectangle > and fit in small SVG beds using loop as per measurements. > > Thanks again! > > On

Re: calling self.clean() before super.save()

2021-04-05 Thread Ryan Nowakowski
I believe ModelForm calls your model's self.clean so if you use it, or use the admin which uses it, you'll need to make sure that clean is idempotent since it'll get called at least twice in that case. On April 4, 2021 6:33:54 PM CDT, Mike Dewhirst wrote: >Is it sensible to generally call

Re: ListView , Need Help !

2021-04-03 Thread Ryan Nowakowski
Take a look at CSS to change how your blog posts are laid out. On April 3, 2021 4:19:49 PM CDT, Mustafa Burhani wrote: >When i create blog post they are aligned vertical i want align be >horizontal how i can do ? > > > >For Example : ># Vertical Post ># Vertical Post >

Re: Regarding auto-generating a map with measurements

2021-04-03 Thread Ryan Nowakowski
Perhaps use SVG? On April 3, 2021 12:00:12 AM CDT, Srijita Mallick wrote: >Hello all! >I'm doing a project where provided length and breadth of a land, I have >to >auto-generate a map with no. of flower beds (length of them provided >too) >in it like the image I have attached below. How can I

Re: Django Custom User model and making auth api

2021-04-02 Thread Ryan Nowakowski
I don't have a ton of experience with it but when a question includes the term "create an API", the answer usually includes "just use Django Rest Framework". On April 2, 2021 1:59:10 AM CDT, Saad Mrabet wrote: >Hello every i m currently working on a project where had to overwrite >the

Re: How to avoid select lists on formsets and ManyToMany?

2021-04-01 Thread Ryan Nowakowski
Django admin does something like this with raw_id_fields[1]. I think it works by just swapping out the form widget. But you could take a look at the admin code to see for sure. [1] https://docs.djangoproject.com/en/3.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields On April

Re: Trying to understand duplicate results from related_set

2021-04-01 Thread Ryan Nowakowski
Maybe it has something to do with the fact that once you start iterating through a query set it gets evaluated[1]. If you slice a query set before it gets evaluated that is different than slicing a query set after it gets evaluated. I'm not exactly sure why you're getting different results but

Re: ModuleNotFoundError -- Please help :)

2021-04-01 Thread Ryan Nowakowski
Since your models aren't in the migrations python package, I would use an absolute path in the import statement here rather than the relative path. On March 31, 2021 9:50:30 PM CDT, 'Dante Costabile' via Django users wrote: >Hiya Folks. Relatively new to django and quite enjoying it. However

Re: Deploy Django website internally within company network

2021-04-01 Thread Ryan Nowakowski
I typically develop the website and also handle deployment. I've done this in a couple of ways. I get the IT department to give me a virtual machine or an AWS account so I can spin up my own EC2 instance. Then I get them to assign a DNS name to the server. On March 31, 2021 6:11:11 PM CDT,

  1   2   3   >