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: Case-insensitive non-deterministic collation

2023-08-06 Thread Chetan Ganji
= models.CharField(max_length=50, db_collation='case_insensitive') class Meta: ordering = ['name'] def __str__(self): return self.name Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Sun, Aug 6, 2023 at 12:32 PM Mike Dewhirst wrote: > On 5/08/2

Re: Need to trigger action on 4th Saturday of the month

2023-07-25 Thread Chetan Ganji
Hi Mr Cain, This would make more sense to me! https://django-celery-beat.readthedocs.io/en/latest/ You could create background tasks to create background tasks that run at any specific time ;-) AFAIK, this solution is as good as it can get! Thanks! Regards, Chetan Ganji +91-900-483-4183

Re: Own documentation in django

2023-07-14 Thread Chetan Ganji
context to diff templates that are extending from the same base template; (e.g. template1.html and template2.html are using table.html) you can reuse html templates with different content. https://docs.djangoproject.com/en/4.2/ref/templates/language/#template-inheritance Regards, Chetan Ganji +91-900

Re: Problem with my website

2023-07-12 Thread Chetan Ganji
Have you set the default url for the website? Sharing your urls.py file will help someone guide you better. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Jul 12, 2023 at 11:47 PM Ben Sidney Matiko wrote: > Is the website in development stage? >

Re: I want help from senior python/django developer to create one django assignment project.

2023-06-05 Thread Chetan Ganji
It looks like a test for getting hired in a company. You should try to solve this yourself before asking for help. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, Jun 6, 2023 at 1:40 AM André Hangalo wrote: > Convert this doc in pdf > > On

Re: Unable to view my categories under category view

2023-05-26 Thread Chetan Ganji
Variable name in the context of CategoryListView is cat_menu_list. I did not see that variable name in the template. In the template you are iterating over a variable that doesnt exist in the context. Iterate over cat_menu_list in the template and it should work fine! Regards, Chetan Ganji +91

FYI: Django Supports Sessions By Default

2023-05-18 Thread Chetan Ganji
http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/ 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 grou

Re: Migration don't work

2023-05-17 Thread Chetan Ganji
it seems to be that you have an app in the project named order and it should have a migration file named 0008_auto_20190301_1035. 0008_auto_20190301_1035 seems to be absent for some reasons. You should check and confirm that. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http

Re: Beginner: How to find fields that can be over-ridden in a Generic Class Based Views

2023-04-11 Thread Chetan Ganji
. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, Apr 11, 2023 at 6:14 PM PULKIT AGRAWAL wrote: > Hello Everyone, > > I am very new to Django and am still learning the ropes. If anyone can > point me in the right direction, I will be thankful to

Re: Web portal by Django

2023-04-11 Thread Chetan Ganji
Hi Ananya, Your question is very open ended. You will need to give specific requirements to get any help. e.g. Whose license? How many licenses per user? Can multiple user have the same license key? What is the format of the license key? I hope it helps! Regards, Chetan Ganji +91-900-483-4183

Re: Debug error when c

2023-03-30 Thread Chetan Ganji
in the right hand side of the display. Try this out https://www.youtube.com/watch?v=qWLk9S6mvAY I hope it helps you! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Mar 30, 2023 at 11:18 PM Ricky Abura wrote: > Hi, > I am learning django,

Re: Deleted django_content_type table

2023-03-21 Thread Chetan Ganji
try one thing create new db n migrate again with all the models. it will create the contentype table again. then just restore this table to the old db. i hope it solves your problem. On Fri, Mar 17, 2023, 02:09 shailesh sachan wrote: > Now i am not able to do anything and i cannot lose the data

Re: Stuck with Django Tutorial Part 4

2023-03-15 Thread Chetan Ganji
It seems to me like you are not entering the url name In place of 'polls:vote' try to enter the name of the url given to that url For Your Reference https://docs.djangoproject.com/en/4.1/ref/templates/builtins/#url I hope it helps you! Regards, Chetan Ganji +91-900-483-4183 ganji.che...

Re: TabularInlineAdmin queries waaaaaayyyyyy too much.

2023-02-13 Thread Chetan Ganji
Try them and see if it helps! https://betterprogramming.pub/django-select-related-and-prefetch-related-f23043fd635d Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Feb 2, 2023 at 8:53 PM Mark Jones wrote: > I have an admin with 1 row in the tabu

Re: Application for Part Time Python/Django Developer

2022-08-05 Thread Chetan Ganji
Hi herve, Thanks! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Aug 5, 2022 at 5:04 PM herve bineli wrote: > Hello Mr. Chetan, > > As I can see, you have a huge experience in web development with a Python > speciality. > I suggest y

Application for Part Time Python/Django Developer

2022-08-05 Thread Chetan Ganji
Hello Django Users, I am Chetan Ganji, I have been working as a Part Time Consultant for a New York based company since last year. I am looking for another Part Time Remote Python/Django Developer job. I can build softwares in Python 3 and Django and Django REST Framework. I can provide

Re: Django project

2022-05-12 Thread Chetan Ganji
check their website or try searching like sms service providers in nigeria. https://nigerianinfopedia.com.ng/best-bulk-sms-service-providers-in-nigeria/ Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, May 13, 2022 at 1:03 AM Tanni Seriki wrote: > Y

Re: Django project

2022-05-12 Thread Chetan Ganji
Hi Tanni, Simple emails can be sent using django. Not sms! Since sending sms requires users to pay for it. You will have to integrate a third party service for sending sms e.g. Twilio https://www.twilio.com/ I hope this helps! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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-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
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: 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: 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:

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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: Changing name of file in FileField field

2020-06-09 Thread Chetan Ganji
with the same name already exists in the db and media root folder, and make sure that it doesnt. I hope it helps. Cheers Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Jun 10, 2020 at 12:31 AM Matthew Pava wrote: > Good day, > I have been stru

Re: How to get a full path of web page to my views.py?

2020-06-09 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.0/ref/request-response/ On Tue, Jun 9, 2020, 6:41 PM Sergei Sokov wrote: > I would like to use a current url path in my views.py > > по

Re: Issue with serving angular with django

2020-06-01 Thread Chetan Ganji
You should use nginx to serve angular n static files and gunicorn for python Below tuts might help you. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04 Look for a tutorial without docker. https://medium.com/bb-tutorials-and-t

Re: Django Pagination

2020-05-30 Thread Chetan Ganji
Hi akshat, What is the difficulty? Where have you defined the variable is_paginated? Is it present in the context? On Sat, May 30, 2020, 8:53 PM maninder singh Kumar < maninder.s.ku...@gmail.com> wrote: > Views.py looks fine ! > > regards > willy > > > On Sat, May 30, 2020 at 7:22 PM Akshat Zal

Re: Optmized Query

2020-05-27 Thread Chetan Ganji
> > > > > > *class Profile(models.Model):user = models.OneToOneField( > settings.AUTH_USER_MODEL,on_delete = models.CASCADE, > related_name="profile")location = models.ManyToManyField(Location)* > > > Thank you > > Regards, > Soum

Re: Optmized Query

2020-05-27 Thread Chetan Ganji
select_related for fk and prefetch_related for m2m in django, you can chain them together Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, May 27, 2020 at 4:51 PM Soumen Khatua wrote: > Hi Folks, > I have many to many relationships and Foreign

Re: help on jwt

2020-05-21 Thread Chetan Ganji
If you post the error, someone can help you better. Did you look into authentication_classes variable of the endpoint ??? Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, May 21, 2020 at 6:48 PM ola neat wrote: > halo, i'm working on implemen

Re: reg: User model data missing from web page

2020-05-06 Thread Chetan Ganji
Ok. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, May 6, 2020 at 11:42 AM 'Amitesh Sahay' via Django users < django-users@googlegroups.com> wrote: > Hello Chetan, > > I got the issue resolved. Below are the correct views

Re: reg: User model data missing from web page

2020-05-05 Thread Chetan Ganji
, last_name and email, and pop them before saving the form. also save these three fields on the user model. *request.user.first_name = form.cleaned_data.pop('first_name')* request.user.save() form.save() Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucode

Re: Dynamic Radio Form

2020-05-05 Thread Chetan Ganji
. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, May 5, 2020 at 3:54 AM J.T. wrote: > I'm working on an app that will allow the user to select the winner > between two teams (radio buttons) and I need the info saved to the > database. I'm havi

Re: reg: User model data missing from web page

2020-05-05 Thread Chetan Ganji
In the *profile_page *view, you can use reverse relation on the user model. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, May 5, 2020 at 9:02 PM 'Amitesh Sahay' via Django users < django-users@googlegroups.com> wrote: > I have a profile

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

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: 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: 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: 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: linking different wepages

2019-07-09 Thread Chetan Ganji
Because the href is relative to the current page. Use url tag of django templates. That will solve your problemo. On Mon, Jul 8, 2019, 9:20 PM Surya Adhikari wrote: > my nav menu have 2 menus : > Home , Search Names > > ie. from index page when i click student from Sub menu of Search names , >

Re: Django post request faild on user_id

2019-07-09 Thread Chetan Ganji
Please paste the whole view so that someone can help you. On Tue, Jul 9, 2019, 5:34 PM Aayush Bhattarai wrote: > Hello, My Question is here. > It will be better if you give me a full answer. > > https://stackoverflow.com/questions/56919062/insert-or-update-on-table-app-job-violates-foreign-key-c

Re: django sessions

2019-07-07 Thread Chetan Ganji
Hii, below answer might ring some bells. https://stackoverflow.com/questions/2551933/django-accessing-session-variables-from-within-a-template Cheers! On Sat, Jul 6, 2019, 5:24 PM Luka Lelashvili wrote: > Hello, how can I access session in my base.html? {% request.session.name > %} doesn't wo

Re: Can we create a Rest Api in Django which can able to communicate with multiple databases(Relational, Non relational) dynamically. If yes please recommend me a way to do that

2019-06-21 Thread Chetan Ganji
(request.user.database).all() OR Author.objects.using('mysql').all() Author.objects.using('postgresql').all() You might have to use the database routers also. It depends on your detailed requirements. Official docs - https://docs.djangoproject.com/en/2.2/topics/db/multi-db/ Cheers! R

Re: django.contrib.gis for Windows 10

2019-06-13 Thread Chetan Ganji
Hey, I had a similar issue with one of the projects I was working on. GDAL was not working properly in windows 10, it was not getting detected for some reason. I never figured out why and how to fix that. I ended up using Ubuntu to fix the issue. It worked like a charm! Regards, Chetan Ganji

Re: Testing - get_object_or_404 returns 200 status code

2019-06-10 Thread Chetan Ganji
Whats your question? I failed to understand that 😅 On Tue, Jun 11, 2019, 1:45 AM Cristhiam Gabriel Fernández < cristhiang...@gmail.com> wrote: > Hi Django super heroes > > I'm making of test cases for my simple Django application. When I test a > view with get_object_or_404 shortcut it returns 20

Re: Deployments

2019-06-07 Thread Chetan Ganji
. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Jun 7, 2019 at 9:51 AM Soumen Khatua wrote: > In this tutorial I think they are covering about a how we can create new > project in digital ocean but I have already one project in my local > machine.

Re: Multitentant login

2019-06-06 Thread Chetan Ganji
Oh yes, this one is possible. Do you want to know if this is possible or how to actually implement it?? I have implemented a solution to solve exactly the same problem. Let me know if you want to know the one that I implemented. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com

Re: Deployments

2019-06-06 Thread Chetan Ganji
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Jun 6, 2019 at 10:33 PM Soumen Khatua wrote: > Hi Folks, > > I develope on

Re: user Form error

2019-06-06 Thread Chetan Ganji
Hi Anchal PFA https://stackoverflow.com/questions/9061846/attributeerror-at-registration-userform-object-has-no-attribute-save .save() method is available on forms.ModelForm; not on forms.Form Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Jun 7

Re: Annotations as models fields

2019-06-06 Thread Chetan Ganji
e record, I found this, which works for simple > cases. https://github.com/schinckel/django-computed-field > > On Thu, 6 Jun 2019 at 14:57, Chetan Ganji wrote: > >> I think this would solve your problem. Whatever calculations needs to be >> done, you can do it manually before

Re: Annotations as models fields

2019-06-06 Thread Chetan Ganji
): buying_price = models.FloatField() selling_price = models.FloatField() profit = models.models.FloatField() Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Jun 6, 2019 at 4:50 PM Olivier Dalang wrote: > Thanks for the answer. As said,

Re: Orm Query for this type of situation

2019-06-06 Thread Chetan Ganji
Right now its an open ended question. If you post code for your models here, someone can help you. On Thu, Jun 6, 2019, 4:38 PM Devender Kumar wrote: > Hi, > I am working on CRM project and stuck with REPORTING part. > > I have Accounts , Lead , contact, Calls ,Concern modules > account/Lead ca

Re: Annotations as models fields

2019-06-06 Thread Chetan Ganji
/ Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Jun 6, 2019 at 3:36 PM Olivier Dalang wrote: > Dear list, > > I was wondering whether there's a package or pattern to define annotations > as model fields, so that they could really be used

Re: Handling two forms at different pages.

2019-06-06 Thread Chetan Ganji
. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Jun 6, 2019 at 2:42 AM Ashutosh Kumar wrote: > Hi, > > Actually I have two forms at two different pages and the second page is > the extension of first form. > > Basically the first page h

Re: What's the best way to inherit boolean values from a model?

2019-06-05 Thread Chetan Ganji
employees permissions pass Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Jun 5, 2019 at 8:52 PM Tal wrote: > Awesome! Simple and DRY. Thanks! > > On Wednesday, June 5, 2019 at 5:07:17 AM UTC-6, RyuCoder wrote: >> >>

Re: Django user profile shared among different apps

2019-06-05 Thread Chetan Ganji
just create another model in the accounts app and put a one to one key to the User Model of django. Import it from settings instead of harcoding it. Give it a relevant related_name. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Jun 5, 2019 at 6:23 PM

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-06-05 Thread Chetan Ganji
igrations() delete_sqlite3() print("All operations performed successfully.") except Exception as e: print("There was some error") if __name__ == "__main__": main() Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Jun 5, 2019 at 6:29 P

Re: What's the best way to inherit boolean values from a model?

2019-06-05 Thread Chetan Ganji
class Company(BasePermissions): name = models.CharField(max_length=255) class CustomUser(BasePermissions, AbstractUser): company = models.ForeignKey(Company, on_delete=models.CASCADE, related_name= "customuser") Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmai

Re: using single view function or class for multiple types of users

2019-06-04 Thread Chetan Ganji
RE: "slight change in output" First of all define what it really means. What needs to be changed and how. RE " is it a good idea to use same URL for both and serve by checking user type" Yes and No. It depends on your mentality. I personally prefer to have separate endpoints for different type

Re: Collectstable displays 0 static file copied issue

2019-06-01 Thread Chetan Ganji
tic/' MEDIA_URL = '/media/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), ] STATIC_ROOT = os.path.join(BASE_DIR, "static/") MEDIA_ROOT = os.path.join(BASE_DIR, "media/") Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On

Re: Single place for validation

2019-05-27 Thread Chetan Ganji
If you have customized the forms for the user facing website, you have to specify the same forms in the class extended by admin.ModelAdmin. Below answer is what you are looking for. https://stackoverflow.com/questions/6321916/different-fields-for-add-and-change-pages-in-admin Regards, Chetan

Re: Hosting - Does pythonanywhere supports all features as AWS.

2019-05-27 Thread Chetan Ganji
on microservices architecture. You can also create monolithic architecture webapps. Its like a giant Elephant. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, May 27, 2019 at 12:19 AM Balaji Shetty wrote: > Does pythonanywhere supports all features

Re: set python 3.6.8 default in my ubuntu

2019-05-22 Thread Chetan Ganji
alias migrate='python manage.py migrate' # *** RyuCoder Settings End **** Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, May 22, 2019 at 6:57 PM Aldian Fazrihady wrote: > Omar, if you u

Re: Need help for Cascading Drop Down for Continent, Country in Admin GUI - Not Getting correct Answer from Many Days

2019-05-21 Thread Chetan Ganji
template. Then show the select dropdown based on these values. This one can be cumbersome to understand as well as implement. I am not sure if it will work or not :P Go for the first solution :) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, May 22, 2019

Re: django migrations no migrations to apply

2019-05-20 Thread Chetan Ganji
to delete the entry for the migration in question. Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, May 20, 2019 at 5:42 PM Harish U Warrier wrote: > > > In django models i added a new field > > in my system its working fine. &

Re: Django background scheduled app

2019-05-20 Thread Chetan Ganji
celery is what you need for this. It is very simple. Just stick to it, find some examples on youtube for celery, and you should get it. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, May 20, 2019 at 5:42 PM Oguz kagan Olmez wrote: > i just star

Re: Implementing multiple session support in a chatbot

2019-05-19 Thread Chetan Ganji
to all the remaining sessions, except the current one # as the current session would get this reply in the response of this view settings.nikola.send_session_replies(sessions) return JsonResponse(data=response) I hope its clear now :) Regards, Chetan Ganji +91-900-483-4183 ganji.che

Re: Porting Django app

2019-05-19 Thread Chetan Ganji
scenario. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Sat, May 18, 2019 at 9:42 AM Ganesh Babu wrote: > i understand what you are saying.. To collect private IP address or > create as Virtual host in LINUX server, its should available. > > On Thu,

Re: Implementing multiple session support in a chatbot

2019-05-18 Thread Chetan Ganji
ined above. As you are using django channels for websockets, you will have to combine that code with this pattern. I don't have any experience with websockets, you will have to figure it out :P I hope it helps :) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryuc

Re: Porting Django app

2019-05-17 Thread Chetan Ganji
7. You get to pay me $1000 for consulting, LOLZ. Just kidding :) I hope it helps :) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, May 16, 2019 at 3:29 PM RLM wrote: > Hello all. > I eventually will need to put my dedicated Django app on another system

Re: Training

2019-05-17 Thread Chetan Ganji
You need this one. https://www.youtube.com/watch?v=KsLHt3D_jsE&list=PLEsfXFp6DpzRcd-q4vR5qAgOZUuz8041S Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, May 16, 2019 at 10:02 PM Scyil sharma wrote: > Can anyone suggest the best Django summer t

  1   2   >