Re: Need your help!!

2020-06-15 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.0/topics/security/ On Mon, Jun 15, 2020, 10:59 PM Vishesh Mangla wrote: > What kind of security? > > > > Sent from Mail for > Windows 10 > > > > *From: *meera gangani > *Sent: *15 June 2020 22:28 > *To: *django

Re: Form theory - locking a field

2020-06-24 Thread Chetan Ganji
Try this one https://docs.djangoproject.com/en/3.0/ref/forms/fields/#disabled On Wed, Jun 24, 2020, 8:06 PM Clive Bruton wrote: > I have a form in which, after filing, I would like one field to be > locked for editing, the forms.py looks like this: > > ** > > class ProfileForm(forms.

Re: Question about django.utils.autoreload

2020-07-20 Thread Chetan Ganji
RE: os.path.join(BASE_DIR, 'reactapp', 'src') It seems that the source code of react app is inside the django folder, so if src code of django is changed, react app would be rebuild! Try keeping the src code of django and react app if different folders, that might solve i

Re: creating a website with django

2020-08-28 Thread Chetan Ganji
https://www.youtube.com/watch?v=KsLHt3D_jsE&list=PLEsfXFp6DpzRcd-q4vR5qAgOZUuz8041S On Fri, Aug 28, 2020, 9:04 PM sakshi jain wrote: > plz help me also > > On Fri, Aug 28, 2020, 19:23 Kamini Shukla > wrote: > >> i want to create a website with the help of django. pls some one help of >> that. >

Re: multiple database

2020-10-09 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.1/topics/db/multi-db/ Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Oct 9, 2020 at 6:41 PM Khaleel Ahmed H. M. Shariff < khaleelahme...@gmail.com> wrote: > Hi Suhaib, > May Peace, Blessings & Mercy

Re: API to stop/resume/terminate a long running task

2020-10-13 Thread Chetan Ganji
take? What is the stack? frontend and backend What is the workflow of uploading the files? Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, Oct 12, 2020 at 9:01 PM Arpana Mehta wrote: > Hello everybody, > I am here looking for a solution t

Re: Trying to trigger a bulkcreation of records using a reverse relationship

2020-11-13 Thread Chetan Ganji
reate attendance object. 2. bulk create AttendanceRecord objects https://docs.djangoproject.com/en/3.1/ref/models/querysets/#bulk-create P.S. both of this operations should happen inside a transaction. https://docs.djangoproject.com/en/3.1/topics/db/transactions/ Regards, Chetan Ganji +91-900-483-4

Re: Trying to trigger a bulkcreation of records using a reverse relationship

2020-11-13 Thread Chetan Ganji
Welcome :) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Nov 13, 2020 at 9:22 PM Dumba Classics wrote: > thank you @Chetan the solution does work and I am very grateful!! > > On Fri, Nov 13, 2020 at 5:35 PM Chetan Ganji > wrote: >

Re: deployment error : django + pgsql

2020-12-29 Thread Chetan Ganji
Give the details of not able to migrate and someone might be able to help you Meanwhile refer to below doc and try again. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04 Regards, Chetan Ganji +91-900-483-4183 ganji.che

Re: How to get username in django_requestlogging

2021-01-03 Thread Chetan Ganji
Hey, On that link it is mentioned as below. If any of this information cannot be extracted from the current request (or there is no current request), a hyphen '-' is substituted as a placeholder. Maybe you are trying with anonymous user? πŸ˜… On Sat, Jan 2, 2021, 8:42 PM Shailesh Yadav wrote:

Re: How to get username in django_requestlogging

2021-01-03 Thread Chetan Ganji
However, use sentry for logging on prod servers, it will make your life easier. Its free to get started πŸ˜‰ On Sun, Jan 3, 2021, 11:08 PM Chetan Ganji wrote: > Hey, > > On that link it is mentioned as below. > > If any of this information cannot be extracted from the curren

Angular Material Help Required

2021-01-22 Thread Chetan Ganji
5/src/material/form-field/form-field.html#L74 ... Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re:

2021-01-26 Thread Chetan Ganji
Hi Salima, Couple of things you can change in the code to make it run faster! Do these changes and performance will definitely improve. 1.Queryset Problem: classifieds = vk_classifieds.objects.filter(class_status='1').order_by('-added_date') This will fetch all the entries in the table; if there

Re: Django Rest Framework APIView request

2021-02-01 Thread Chetan Ganji
If it needs to be done on specific endpoints, write a custom decorator method for that endpoint. If it needs to be done on every request, write custom middleware. On Mon, Feb 1, 2021, 1:51 PM Ammar Mohammed wrote: > > Hi everyone i have an API View inherited from another class > i want to creat

Re: How to set daily update limit for django model(db)?

2021-02-13 Thread Chetan Ganji
timezone current_date = timezone.now().date() edited_count = Model.objects.filter(updated_at__date=current_date).count() Reference : https://docs.djangoproject.com/en/3.1/ref/models/querysets/#date I hope it helps you. Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com

Re: Immediately Need Help

2021-02-19 Thread Chetan Ganji
Hi Kritika Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? πŸ˜‚ Teko field pe unique constraint lagana padenga Teko no wapas 1 se start karneke liye query maarana padenga last_no = Model.objects.filter(categorycode="blah", citycode="blah-blah").count() unique_code ="LM" + categ

Re: Immediately Need Help

2021-02-19 Thread Chetan Ganji
vashisht wrote: > Chetan > If any row is deleted from the table, then your logic will fail to return > the unique code > > On Fri, 19 Feb 2021, 15:52 Chetan Ganji, wrote: > >> Hi Kritika >> >> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? πŸ˜‚ &

Re: Immediately Need Help

2021-02-19 Thread Chetan Ganji
; > Space code to be generated such that Numbers should increase Space > Category Wise > > > On Fri, 19 Feb 2021 at 16:07, Chetan Ganji wrote: > >> Yes kritika show all the models. >> >> How shubham? >> If an entry is deleted, unique code will also be delet

Re: Immediately Need Help

2021-02-20 Thread Chetan Ganji
else: current_index = str(int(last_code[-Z_FILL_INDEX:]) + 1) unique_code ="LM" + categorycode + citycode + current_index Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Feb 19, 2021 at 6:16 PM shubham vashisht wrote: > If there are 4 ro

Re: Why does my django form with recaptcha send data even empty the recaptcha?

2021-03-12 Thread Chetan Ganji
Remove below line and try again self.fields['captcha'].widget.attrs['required'] = 'True' If the problem persists, try some js or jquery validation in frontend On Thu, Mar 11, 2021, 9:19 PM Gabriel Araya Garcia < gabrielaraya2...@gmail.com> wrote: > Camarada Sokov: > Your code is very diffi

Re: I cant figure out this error

2021-03-13 Thread Chetan Ganji
Good Read! Thanks Kasper 😊 On Sat, Mar 13, 2021, 5:58 AM Kasper Laudrup wrote: > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from th

Re: deployment UI

2021-03-15 Thread Chetan Ganji
Checkout PythonAnywhere if it helps you or not On Mon, Mar 15, 2021, 8:15 PM waverider wrote: > Hi, > > Is there some web interface (SaaS or on premises) for initial server setup > and Django apps deployment? > > Are you happily using it? > > There are a few SaaS tools for PHP apps, but I haven'

Re: Admin layout getting too bulky - what to do?

2021-05-03 Thread Chetan Ganji
I am not sure how useful this will be. You can check it out. https://django-mptt.readthedocs.io/en/latest/index.html Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, May 3, 2021 at 8:13 PM Mike Dewhirst wrote: > Derek > > My phone d

Re: Custom User

2021-05-06 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.2/topics/auth/passwords/#django.contrib.auth.hashers.make_password On Thu, May 6, 2021, 6:46 PM Owen Murithi wrote: > How do I make password for AbstractUser Hashed? > > -- > You received this message because you are subscribed to the Google Groups > "Django u

Re: Newbee help on deploying Django App to Apache2

2021-05-30 Thread Chetan Ganji
, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Sun, May 30, 2021 at 4:46 PM Moose Smith <47kanga...@gmail.com> wrote: > App written in ubuntu virtual environment python 3.8.5. Works well on > Visual Studio Code development server. Am trying to make it ru

Re: Customizable model field (such as SRID for geometries) and migrations

2021-06-05 Thread Chetan Ganji
inates are in longitude, latitude pairs in units of degrees. To use a different coordinate system, set the SRID of the geometry field with the srid argument. Use an integer representing the coordinate system’s EPSG code. I hope this helps you !!! Regards, Chetan Ganji +91-900-483-4183 gan

Re: Absurdly long queries with Postgres 11 during unit tests

2021-06-09 Thread Chetan Ganji
This might help shed more light on the problem. 1. https://pypi.org/project/pytest-django-queries/ 2. Try cProfile https://www.geeksforgeeks.org/profiling-in-python/ Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, Jun 8, 2021 at 1:33 AM Rich

Re: django cron Job Functionality

2021-06-11 Thread Chetan Ganji
This will help you https://pypi.org/project/django-celery-beat/ On Fri, Jun 11, 2021, 5:34 PM Eugene TUYIZERE wrote: > Dear Team, > > In my application, I want a user to set for example a leave plan in the > system and the system notify the user by email for example one day before > the start

Re: Best way to optimize API requests calls from over 10,000 users simultaneously

2021-06-21 Thread Chetan Ganji
What is the problem you are trying to solve? What do you want to optimize exactly? πŸ€” I hope this helps you - https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, Jun 21, 2021

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread Chetan Ganji
down votes at the same time? Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Jun 25, 2021 at 12:39 PM DJANGO DEVELOPER wrote: > Oba Thank you so much. and let me try it. > and one more thing that I want to ask that how can I calculate the up &

Re: How can i start to learn django?

2021-06-26 Thread Chetan Ganji
https://youtube.com/c/CodingEntrepreneurs On Wed, Jun 16, 2021, 2:23 AM Sebastian Jung wrote: > At beginnig Django Girls Tutorial ist a good start in my opinon > https://tutorial.djangogirls.org/en/ > > anil9...@gmail.com schrieb am Di., 15. Juni 2021, > 14:27: > >> You can try freecodecamp.or

Re: Best way to optimize API requests calls from over 10,000 users simultaneously

2021-06-26 Thread Chetan Ganji
This will help you brother. It is FREE πŸ˜‰ https://www.scaler.com/event/learn-how-youtube-serves-billions-of-users-in-a-free-masterclass On Mon, Jun 21, 2021, 8:49 PM Alejandro Garrido Gongora < nolodelato...@gmail.com> wrote: > For big problems the answer is in 99% of cases split the problem, ma

Free Webinar

2021-06-26 Thread Chetan Ganji
Dear members, FYI https://www.scaler.com/event/learn-how-youtube-serves-billions-of-users-in-a-free-masterclass Thanks! -- 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

Re: How to fix deadlocks with tests?

2023-10-27 Thread Chetan Ganji
find out the sql queries that were running around that timestamp. You might be able to find out the root cause of the problem and fix it. I am not 100% sure if it will help. But it is worth a try. I hope it helps you. Thanks! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http

Re: Syntax Error django, python issue

2019-07-28 Thread Chetan Ganji
AUTHENTICATION_BACKENDS <https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-AUTHENTICATION_BACKENDS> = ['django.contrib.auth.backends.ModelBackend', # your backends goes here, ] Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On S

Re: BigAutoField not working

2019-07-29 Thread Chetan Ganji
If you cant see it in your table in dbms, you probably have not run makemigrations and migrate commands. If you have done that, you should grab the migration file when that field was first created and paste that code here. Also paste your old n new code from the models.py file. So that someone can

Re: Python problem

2019-12-15 Thread Chetan Ganji
ut_string[item].isalpha(): order[index] = characters[counter] counter += 1 for index in range(0, len(input_string)): output_string += order[index] print() print(input_string) print(output_string) print() Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryuco

Re: bugs for beginners

2020-01-12 Thread Chetan Ganji
https://www.freecodecamp.org/news/the-10-most-popular-coding-challenge-websites-of-2016-fb8a5672d22f/ On Sun, Jan 12, 2020, 9:33 PM aakansha jain wrote: > Can someone suggest me the bugs that can be worked upon by beginners? > > -- > You received this message because you are subscribed to the Go

Re: Django tutor/coach wanted

2020-02-14 Thread Chetan Ganji
Not sure about one on one. Will certainly help. https://www.youtube.com/user/CodingEntrepreneurs Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Sat, Feb 15, 2020 at 12:32 AM davidrpando2 wrote: > Hello, > > My name is David Pando. I am new to Djan

<    1   2