Re: Django ORM Model meta internal API to current API update

2020-09-08 Thread Shaheed Haque
On Tue, 8 Sep 2020 at 03:54, Asif Saif Uddin wrote: > any help? I can share the full function > I've poked around some of these dark corners, but only since the late 2.x series. After a bit of searching this find-the-field-that-connects-a-model-to-a-through-model

I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
my structure is like this: my_project blog sitemaps.py my_project urls.py Inside sitemaps.py : from django.contrib.sitemaps import Sitemap from .models import * class BlogPostsS

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
Sorry, point no 1 needs to be revised.. 1. In urls.py, I want to import BlogPostsSitemap -- 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 email to django-users+unsubscr...

[no subject]

2020-09-08 Thread hans alexander
I got errors when installing Django Channels. I'm using Python 3.8.5, Django 3.1 Installing using : pip install channels I got error like this: Installing collected packages: twisted, daphne, channels Running setup.py install for twisted ... error ERROR: Command errored out with exit sta

Re:

2020-09-08 Thread RANGA BHARATH JINKA
Hi, See this link. https://stackoverflow.com/questions/57000214/how-do-i-pip-install-twisted-without-getting-an-error All the best On Tue, Sep 8, 2020 at 4:14 PM hans alexander wrote: > I got errors when installing Django Channels. > I'm using Python 3.8.5, Django 3.1 > > Installing using

Re:

2020-09-08 Thread hans alexander
I have seen that link, still got errors after trying to install twisted. Guess the problem is that I'm using python 3.8.5. Guess it's not supported for Django Channels. Is there any safe way to downgrade python version ? Or how to separate Global Python Version and Virtual Environment Python Versio

Re:

2020-09-08 Thread RANGA BHARATH JINKA
Delete the Virtual Environment venv (or) env folder and create a new Virtual Environment using python3.7 -m venv venv Install all modules again. Since it doesn't support python3.8. All the best On Tue, Sep 8, 2020 at 4:55 PM hans alexander wrote: > I have seen that link, still got errors a

Re: deploying a django project

2020-09-08 Thread joe lin
https://tutorial-extensions.djangogirls.org/en/heroku/ Liu Zheng 於 2020年9月8日 週二 下午1:49寫道: > @Omkar Parab: Lol. Exactly. When I saw the question, this video was the > first in my mind. I clicked in to share the link, but you have shared it. > > Cheers! > > On Tue, Sep 8, 2020 at 5:14 AM Omkar Par

Help me with the view please

2020-09-08 Thread Dexterr Jay
My Models class Student(models.Model): name = models.CharField(max_length=200, null=True, blank=True) classroom = models.ForeignKey(‘Classroom’, on_delete=models.DO_NOTHING,blank=True, null=True) class Classroom(models.Model): name = models.CharField(max_length=40,blank=True, null=True) class Fe

Do you ever come across comments expressing anger or happiness when developing open-source software?

2020-09-08 Thread Nathan Cassee
To Whom it may concern, We are an international team of researchers, from the University of Bari, Italy, and Eindhoven University of Technology, the Netherlands. The goal of our research is to help improve the health and long term stability of open-source communities. We would like to lea

Re: Help me with the view please

2020-09-08 Thread coolguy
In your return line of code, you are referring to context variable but I don't see you assigned any value to this context variable in your code. Or if you want to send three variables i.e. "fees", "total_fees" and "fee_remaining"... you need to send them separately like return render(request, 'w

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread coolguy
Not sure why you are importing this into your main project urls.py but its very straight forward from blog.sitemaps import BlogPostsSitemap question... are you trying to map the application url here? then you should use path('/' , Include("blog.urls")) On Tuesday, September 8, 2020 at 4

RE: Help me with the view please

2020-09-08 Thread fadhil alex
Thank you for your help @coolguy..but my real problem lies in writing the code for “fee_remaining”, can you help me with that also..thanks Sent from Mail for Windows 10 From: coolguySent: Tuesday, September 8, 2020 7:45 PMTo: Django usersSubject: Re: Help me with the view please In your return line

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
I followed a tutorial for creating django sitemap, but still got problems along the way. I've seen some videos, but didn't work. Do you have any references for easy way creating django sitemap for blog posts? Sure it would help. Thanks On Wed, Sep 9, 2020 at 12:02 AM coolguy wrote: > Not sure

Re: Help me with the view please

2020-09-08 Thread coolguy
I see now what you are asking... I never do such calculations in views rather I create methods in models.py to do so and call them in the template... Like what you could do is... class Student(models.Model): name = models.CharField(max_length=200, null=True, blank=True) classroom = mode

Re: Help me with the view please

2020-09-08 Thread coolguy
I see now what you are asking... I never do such calculations in views rather I create methods in models.py to do so and call them in the template... Like what you could do is... class Student(models.Model): name = models.CharField(max_length=200, null=True, blank=True) classroom = mode

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread coolguy
I did this long time ago and here is what i did... in settings.py SITE_ID = 1 # Application definition INSTALLED_APPS = [ # ... 'django.contrib.sites', 'django.contrib.sitemaps', ] run migration i.e. >>> py manage.py migrateOR python manage.py migrate aft

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
Thanks guys.. Already solved it. I guess the main reason of the problem is that I'm using Pycharm Community Edition. So the alert error not accurate. Anyway I tried to py manage.py with some alerts, and worked. for example: [image: image.png] I left it like that. And sitemap still works. But now

Rocket chat with python: imp

2020-09-08 Thread Chander shekhar
Can anyone help me in integrating rocket chat with python any link ,videos,or any personal suggestion. I have to make a chat with it,really imp -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

Re: Rocket chat with python: imp

2020-09-08 Thread RANGA BHARATH JINKA
Hi, Try this. https://pypi.org/project/rocket-python/ All the best On Wed, Sep 9, 2020 at 11:00 AM Chander shekhar wrote: > Can anyone help me in integrating rocket chat with python any link > ,videos,or any personal suggestion. > I have to make a chat with it,really imp > > -- > You

Image Uploaded by Ckeditor using Django to AWS S3 gone after certain amount of time

2020-09-08 Thread hans alexander
I don't know what happened. Need solution for this. [image: image.png] [image: image.png] Any solutions would be appreciated. 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

Re: Image Uploaded by Ckeditor using Django to AWS S3 gone after certain amount of time

2020-09-08 Thread hans alexander
I checked the file on my bucket, it's there. But somehow the link is not working. On Wed, Sep 9, 2020 at 1:13 PM hans alexander wrote: > I don't know what happened. > Need solution for this. > > [image: image.png] > [image: image.png] > > Any solutions would be appreciated. Thanks > -- You rec

Re: Image Uploaded by Ckeditor using Django to AWS S3 gone after certain amount of time

2020-09-08 Thread Anil pawar
That means whatever link is generated is not functioning. Try to check the image file permission on the server OR open that link in a new browser tab and check what response you are getting from the server. and make sure the image URL is correct. On Wed, Sep 9, 2020 at 10:15 AM hans alexander wro

Error after updated django

2020-09-08 Thread kushal....@gmail.com
Hello everyone, i updated Django and facing this problem recently. How to solve this issue? Thank you. File "C:\Users\Kushal Neupane\AppData\Roaming\Python\Python36\site-packages\rest_framework\authtoken\models.py", line 6, in from django.utils.encoding import python_2_unicode_compatibl