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: Django csv file

2019-03-12 Thread Chetan Ganji
some third party MONGO ORMS for django, but I never used them so far, so can't comment on how good they are or are not. Do your R&D and find it out ;-) I hope this helps you. Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Mar 13, 20

Re: Django csv file

2019-03-13 Thread Chetan Ganji
Welcme CIGI Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Mar 13, 2019 at 5:13 PM Cigi Sebastine wrote: > Thank you Chetan. > > > On Wed, Mar 13, 2019 at 3:41 AM Chetan Ganji > wrote: > >> I would suggest you use transact

Re: Django Queryset for Multiple set

2019-03-13 Thread Chetan Ganji
Hi Vaibhav, I think this would do what you want. Make sure too call the objects on the model name ( Modelname ) ;-) systems = ['windows', 'unix'] variable = Modelname.objects.filter(clientname=cname, clienttype__in=systems, errorcode='20') Regards, Chetan Ga

Re: Need to Store All Model data in RAM

2019-03-13 Thread Chetan Ganji
a list in python for item in getdata: # won't hit database again if item in another_list: # do something pass Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Mar 13, 2019 at 7:27 PM Andréas Kühne wrote: > Hi, > > You can't. T

Re: Need to Store All Model data in RAM

2019-03-13 Thread Chetan Ganji
other list made of queryset. e.g. another_list = [1, 2, 3, 4] OR another_list = list(Modelname.objects.all()) I hope this clears your confusion. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Mar 13, 2019 at 9:32 PM Vaibhav Mishra wrote: > Thanks

Re: image didn't upload

2019-03-14 Thread Chetan Ganji
Did you setup MEDIA-ROOT location in your settings.py For reference - https://docs.djangoproject.com/en/2.1/ref/settings/#media-root Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_sour

Re: Very much begineer

2019-03-14 Thread Chetan Ganji
Look no further codingforentrepreneurs Start with trydjango 1.8 project. See his youtube channel. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_

Re: on_delete not getting called when ForeignKey is a property

2019-03-14 Thread Chetan Ganji
Why do you need to do any calculations in the model code? I would do any calculations in the views and store them using models. That will remove the getters and setters from model. Everything should work fine then. Hope it helps. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com

Re: on_delete not getting called when ForeignKey is a property

2019-03-14 Thread Chetan Ganji
gards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=7ce9710f-d0c2-48a2-a0ba-76107578348e> I’m protected online wi

Re: image didn't upload

2019-03-14 Thread Chetan Ganji
os.path.join(BASE_DIR, 'media'), ] STATIC_ROOT = os.path.join(BASE_DIR, 'static-root') MEDIA_ROOT = os.path.join(BASE_DIR, 'media-root') Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=e

Re: on_delete not getting called when ForeignKey is a property

2019-03-14 Thread Chetan Ganji
. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=7ce9710f-d0c2-48a2-a0ba-76107578348e> I’m protec

Re: Generic CBV DeleteView GET csrf_token

2019-03-14 Thread Chetan Ganji
https://www.django-rest-framework.org/topics/ajax-csrf-cors/ https://docs.djangoproject.com/en/2.1/ref/csrf/#ajax Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaig

Re: Generic CBV DeleteView GET csrf_token

2019-03-14 Thread Chetan Ganji
Frameworks dont work as we want them too :P We have to understand how the defaults are implemented then make the changes as necessary ;-) If it can be customized, great! otherwise learn and use a different framework, LOLZ ;-) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http

Re: What I am doing wrong

2019-03-15 Thread Chetan Ganji
In the admin.py file that import statement seems to be wrong. "*from website.module import website*" I cant help you more as I dont know the directory structure. Check for the location of the module named website relative to the admin.py file. Regards, Chetan Ganji +91-900-483-4183

Re: What I am doing wrong

2019-03-15 Thread Chetan Ganji
Sure. please make sure to mention which class or function from which file needs to be imported in which file Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Mar 15, 2019 at 6:14 PM Harish Chaudhary wrote: > Hello Chetan can I send you my project

Re: Is there any inline editing the data and delete data in table in Django?

2019-03-20 Thread Chetan Ganji
to learn to use jquery to do it the way you want it. 2. Use the default UpdateView from django where EDIT/UPDATE view will be shown separately. i.e. let go of inline editing feature. 3. Find someone who will code it for you. 4. Any other that you can think of. Happy Coding :) Regards, Chetan

Re: custom registration form

2019-03-25 Thread Chetan Ganji
d to limit access before the user is authorised by the admin. You will have to create an additional page to accept or discard the registered user. If you dont want to use default admin panel, you will end up writing CRUD for the admin panel. Workflow will still be the same as above. Regards, Chetan

Re: Unit-Testing Django Views

2019-03-28 Thread Chetan Ganji
;register'] self.response = {url:self.client.get(reverse(url)) for url in self .reverseUrls} def test_reverse_urls(self): for url in self.reverseUrls: self.assertEqual(self.response[url].status_code, 200) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On

Re: Unit-Testing Django Views

2019-03-28 Thread Chetan Ganji
There is one more way you could do it class TestIndexPageLoad(TestCase): def setUp(self): self.client = Client() self.response = self.client.get('/') def test_check_response(self): self.assertTemplateUsed(self.response, 'index.html') Regards, Chetan Ganji +91-90

Re: I am on a e-commerce website on a video from youtube and I am having problems with stripe

2019-03-29 Thread Chetan Ganji
helps. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=7ce9710f-d0c2-48a2-a0ba-76107578348e> I’m p

Re: ModelForm for model that includes multiple items of one kind

2019-03-30 Thread Chetan Ganji
email Phone phone As one profile can have multiple entries of addresses, email and phone numbers, you could use concept of formset to deal with them. Also, as there are multiple entries, you could store one of them as default or primary. I hope this helps :) Regards, Chetan Ganji

Re:

2019-03-30 Thread Chetan Ganji
Best way to learn coding n framework is to build a project. I have taken courses from various vendors, best ones are the one from Coding For Entrepreneurs. He also has a youtube channel. Start with try django 1.8 On Sun, Mar 31, 2019, 6:20 AM Makori Breens wrote: > http://track.haatm.com/aff_c?o

Re: Static image not getting displayed.

2019-04-02 Thread Chetan Ganji
{% load static %} in the first link of your template. You have below code The line should be Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Apr 3, 2019 at 1:13 AM Ing.Daniel Bojorge wrote: > See the development tools and look what path is

Re: Changing Admin Interface in Django

2019-04-11 Thread Chetan Ganji
files and change them manually. That's a very tedious task. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default

Re: Help, I need to convert my python code into Secure API using Django

2019-04-29 Thread Chetan Ganji
, below is the tutorial. I have used it many times for deployments. 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 Mon, Apr 29, 2019 at 9

Re: Help, I need to convert my python code into Secure API using Django

2019-04-29 Thread Chetan Ganji
r R&D. Follow the steps that they have shown i the video to see if it works. https://www.youtube.com/watch?v=s0RX_YU9eJM https://www.youtube.com/watch?v=VnR5O4IjmOs Hope it helps. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, Apr 30, 2019 at 12:05

Re: More controls on createsuperuser

2019-04-30 Thread Chetan Ganji
and delete that custom command also. I hope this solves your problemo :) Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, Apr 30, 2019 at 6:09 PM Lipika Chandel wrote: > Hey, > I am using Django 2.2 and I am stuck with the image upload func

Re: Website slowed down drasticaly

2019-05-02 Thread Chetan Ganji
y with waitress or others. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, May 2, 2019 at 5:09 PM Saurabh Adhikary wrote: > Hello , > > I'm using Django version 1.8.1 and Python version 2.7.12 . Suddenly since > Feb '19 there ha

Re: help with URLS.PY

2019-05-02 Thread Chetan Ganji
The line path('', HomeView.as_view(), name='home'), Change it to below and try again. path(''", HomeView.as_view(), name='home'), On May 3, 2019 2:52 AM, wrote: new to django. so i have an app that displays an html page. i also have a menu on that page that will load up other html pages. howev

Re: Website slowed down drasticaly

2019-05-03 Thread Chetan Ganji
gunicorn. You could get some boost. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, May 3, 2019 at 11:00 AM Saurabh Adhikary wrote: > Hi Chetan, > > 1) Yes . We are infact trying this. Thank You. > 2) *Taken* > 3) We are on MySql , migration

Re: Website slowed down drasticaly

2019-05-03 Thread Chetan Ganji
One more thing - All the third party resources i.e. js and css files e.g. bootstrap, jquery, etc; don't fetch them from your server. Use CDN for those. This will help the load times a lot. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, May 3, 20

Re: Need Help

2019-05-07 Thread Chetan Ganji
, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Tue, May 7, 2019 at 5:15 PM Manoj Kumar Singh wrote: > Many of the interviewer asked me how many libraries and frameworks are > used in django project. > Please let me know the correct answer. > > -- > &g

Re: form submission

2019-05-09 Thread Chetan Ganji
Hi Ganesh, This guy is total nerd. He teaches in a very easy to understand way ;-) https://www.youtube.com/watch?v=KsLHt3D_jsE&list=PLEsfXFp6DpzRcd-q4vR5qAgOZUuz8041S Start with Try Django 1.8. Cheers! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On

Re: form submission

2019-05-09 Thread Chetan Ganji
ound one project that teaches the basic stuff in simple and effective manner. I have taken courses from many different people. Most of them went out of my head as they never fully explained what the heck was happening. That's not the case with Justin Mitchell ;-) Regards, Chetan Ganji +91-900-483-4

Re: Different database types use in a single Django project

2019-05-10 Thread Chetan Ganji
, django also supports that. Check the official documents for more info. https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fields/ If you find any more solutions, please let me know, as I also want to explore the options of using mongo with django. Thanks in advance. Regards, Chetan Ganji

Re: Help on architecture of User layout configuration system

2019-05-13 Thread Chetan Ganji
customize his view, you would write the if blocks to check if the current user has selected the respective settings or not. Accordingly they would be rendered *DYNAMICALLY*. I hope it helps :) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, May 13, 2019 at

Re: Can't save to Postgres db locally - Fresher

2019-05-15 Thread Chetan Ganji
- * Rename anyone of the above methods. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, May 15, 2019 at 3:50 PM Emmanuel klutse wrote: > Hello Team, > I need help please, I’m try to save to my db from a FORM using the command > below. > I’ve all

Re: Help on architecture of User layout configuration system

2019-05-15 Thread Chetan Ganji
late/reder dynamically from the stored json field and validating them dynamically according to their schema *NEEDS SOME R&D*. Give it a try and share the results with me. I hope it was worth your time :) Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Mon, May

Re: Run django in apache2.4+centos7.5+python2.7

2019-05-15 Thread Chetan Ganji
This might help you. https://bitnami.com/stack/django/installer Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, May 15, 2019 at 9:13 PM Kurosh Sol wrote: > Hi, > I would like to ask a question about django setup > Please if you can help m

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

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

  1   2   >