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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
): 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: Annotations as models fields

2019-06-06 Thread Chetan Ganji
-columns-values If it works, as it would be on database level, you have to document it in the readme file of your project. Otherwise, next developer on the project might not know about the trigger and bang his head on the floor like I did earlier, lolz :P I hope it helps this time :P Regards, Chetan

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

no such table: main.auth_user__old

2019-11-30 Thread Chetan Rokade
Hi Friends Getting below error while adding new user from admin page. I am using python 3.8 with django 2.1 version Exception Value: no such table: main.auth_user__old -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

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

django.urls.exceptions.NoReverseMatch

2019-12-18 Thread Chetan Rokade
Hi Friends, getting below error : "django.urls.exceptions.NoReverseMatch: Reverse for 'EditChange' not found. 'EditChange' is not a valid view function or pattern name." I have removed EditChange tag/string from all files in my project. 1) app level urls.py , 2) views.py 3) base.html 4) app

'str' object has no attribute 'objects'

2019-12-28 Thread Chetan Rokade
Hi Friends, Getting below error while doing search operation : 'str' object has no attribute 'objects' Code: 1) html having search button : {% csrf_token %} Search -- You recei

Re: 'str' object has no attribute 'objects'

2019-12-28 Thread Chetan Rokade
return render(request, 'changes/changes.html') On Saturday, December 28, 2019 at 4:30:53 PM UTC+5:30, Chetan Rokade wrote: > > Hi Friends, > Getting below error while doing search operation : > 'str' object has no attribute 'objects' > > Code: > 1) htm

Re: 'str' object has no attribute 'objects'

2019-12-28 Thread Chetan Rokade
This is resolved now. I had used variable name same as class name. Regards, Chetan On Saturday, December 28, 2019 at 4:30:53 PM UTC+5:30, Chetan Rokade wrote: > > Hi Friends, > Getting below error while doing search operation : > 'str' object has no attribute 'o

Re: 'str' object has no attribute 'objects'

2019-12-28 Thread Chetan Rokade
Thanks Suraj Thapa.  Sent from Yahoo Mail for iPhone On Saturday, December 28, 2019, 5:03 PM, Chetan Rokade wrote: This is resolved now. I had used variable name same as class name.  Regards,Chetan On Saturday, December 28, 2019 at 4:30:53 PM UTC+5:30, Chetan Rokade wrote: Hi Friends

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

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

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

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

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

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

<    1   2