contribution on open source

2023-03-24 Thread Priyank Panchal
Hey django users i just started open source contribution  and i want to 
contribute on the django project can anyoone tell that how to understand 
code and contribute and also which types of tools are needed for better 
understanding.
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 email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/00ca27c2-85ad-4f54-94e8-7ff3e43cedd2n%40googlegroups.com.


Failed to send Email by Django

2023-03-24 Thread bing
I am using the email module in Django to inform of users with their 
registration. Sometimes it can send email successfully, but more often, it 
fails. I searched for many solutions, but did not change this situation.

The following is what I have configured:
settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.139.com'
EMAIL_PORT = 25
EMAIL_HOST_USER = 'EmailAddress' 
EMAIL_HOST_PASSWORD = ''
EMAIL_FROM = 'xx'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_USE_TLS = False  


views.py:
import smtplib
def sendEmail(subject, message, from_email, to_email):
try:
send_mail(subject, message, from_email, [to_email], fail_silently=
False)
return True
except smtplib.SMTPException as e:
print(e)
return False

Although I used the 'try', 'except' to catch the error, I still find no 
results in the output. Is there anything wrong? I would be very grateful if 
someone can give me some advice. Thanks in advance.

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d869f7c6-8e32-428e-a1dc-6c769de3b6afn%40googlegroups.com.


Re: Help in django. I want to upload files

2023-03-24 Thread Jd Mehra
yeah, Ryan's comment definitely makes sense

On Thursday, 23 March 2023 at 20:22:17 UTC+5:30 Ryan Nowakowski wrote:

> Your field is called e_resource with an underscore but you're trying to 
> reference it using a dash.
>
>
> On March 22, 2023 11:40:00 PM CDT, Shubhi Pandey  
> wrote:
>>
>> the error is:
>> django.core.exceptions.FieldError: Unknown field(s) (e-resource) 
>> specified for Post
>>
>> models.py
>> class Post(models.Model):
>> e_resource = models.FileField(null=True, 
>>blank=True, 
>>validators=[FileExtensionValidator( ['pdf'] ) 
>> ],upload_to='')
>>
>> views.py
>> def uploadResource_details(request,shop):
>> 
>>  shop = workshop_details.objects.get(w_id=shop)
>>  if request.method == 'POST':
>> form = PostForm(request.POST, request.FILES)
>> if form.is_valid():
>> cdform = form.cleaned_data
>> cdform.save()
>> return HttpResponse("File Uploaded successfully")
>>  else:
>> form = PostForm()
>>  return render(request, 'uploadAttendance.html', {'form': form,'shop' 
>> : shop})
>>
>> forms.py
>> class PostForm(forms.ModelForm):
>> class Meta:
>> model = Post
>> fields = ['e-resource']
>>
>>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4d3c352d-cb02-467f-b8df-82ba098ebde6n%40googlegroups.com.


Re: Help on Django + Plotly integration

2023-03-24 Thread Jd Mehra

Create a view that will generate the Plotly chart. In the view, you can use 
the Plotly library to create a chart object and return it as an HTML div 
string. Here is an example view:

from django.shortcuts import render
import plotly.graph_objs as go
import plotly.offline as opy
from django.http import HttpResponse

def my_chart(request):
trace1 = go.Bar(x=[1, 2, 3], y=[4, 5, 6])
data = [trace1]
layout = go.Layout(title='My Chart')
fig = go.Figure(data=data, layout=layout)
div = opy.plot(fig, auto_open=False, output_type='div')
return HttpResponse(div)



On Thursday, 23 March 2023 at 20:20:57 UTC+5:30 Ryan Nowakowski wrote:

> Hey Kumar,
>
> "Not getting the end result" is pretty generic. Where are you stuck 
> specifically? Are there any error messages you're seeing? Have you tried 
> the browser's devtools to see if there are any errors there?
>
> - Ryan
>
>
> On March 23, 2023 6:47:19 AM CDT, Praveen Kumar  
> wrote:
>>
>> Hello Kasper,
>>
>> I have followed following link to get portly chart:
>>
>>
>> https://hackmamba.io/blog/2022/03/quickly-create-interactive-charts-in-django/
>>
>> But I'm not getting end result. Please find below the structure that I 
>> have made. Please let me know if I'm missing anything.
>>
>> [image: Screenshot 2023-03-23 154859.png]
>>
>> Kindly suggest.
>>
>> Thanks & Regards,
>> Praveen
>> On Wednesday, 22 March 2023 at 20:38:55 UTC+5:30 Kasper Laudrup wrote:
>>
>>> On 22/03/2023 15.29, Praveen Kumar wrote: 
>>> > Hi Team, 
>>> > 
>>> > I need help in implementing Plotly with Django for interactive 
>>> dashboards. 
>>> > 
>>> > Please suggest. 
>>> > 
>>>
>>> Try following this: 
>>>
>>> https://googlethatforyou.com?q=plotly%20django 
>>>
>>> Kind regards, 
>>>
>>> Kasper Laudrup 
>>>
>>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21e8e33f-6105-4d0e-8e1d-3f13a0794294n%40googlegroups.com.


Re: Django Admin

2023-03-24 Thread Jd Mehra

- 

Clear the browser cache and cookies and then try to log in again. Sometimes 
an old CSRF token can be stored in the browser cache and can cause issues.
- 




On Friday, 24 March 2023 at 07:50:37 UTC+5:30 Ikrombek wrote:

>
> Hello,
> How can I use dental teeth section. For example, do I need to include 32 
> fields from the model to specify 32 teeth, or is there a way to do it in 
> one?
> On Tuesday, March 14, 2023 at 5:39:27 AM UTC+5 Muhammad Juwaini Abdul 
> Rahman wrote:
>
>> In my previous case, I only use this:
>>
>> CSRF_TRUSTED_ORIGINS = ['https://your site url',]
>>
>> On Tue, 14 Mar 2023 at 04:33, Prosper Lekia  wrote:
>>
>>> This is how I deal with all csrf related issues.
>>>
>>> Make sure csrf MiddleWare is in your MiddleWare list 
>>>
>>> 'django.middleware.csrf.CsrfViewMiddleware'
>>>
>>> Add the settings below in your settings.py to prevent all csrf related 
>>> issues
>>>
>>> CSRF_TRUSTED_ORIGINS = ['https://your site url',]
>>> SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'http')
>>> CSRF_USE_SESSIONS = False
>>> CSRF_COOKIE_SECURE = True
>>> SECURE_BROWSER_XSS_FILTER = True
>>>
>>> CORS_ALLOW_CREDENTIALS = True
>>> CORS_ORIGIN_ALLOW_ALL = True
>>>
>>>
>>> SECURE_CONTENT_TYPE_NOSNIFF = True
>>> SECURE_FRAME_DENY = True
>>> SECURE_HSTS_SECONDS = 2592000
>>> SECURE_HSTS_INCLUDE_SUBDOMAINS = True
>>> SECURE_HSTS_PRELOAD = True
>>> X_FRAME_OPTIONS = 'SAMEORIGIN'
>>> SECURE_REFERRER_POLICY = 'same-origin
>>>
>>> On Saturday, March 11, 2023 at 7:04:40 PM UTC+1 James Hunt wrote:
>>>
 Hi there. I am fairly new to Django but have had previous success with 
 creating an app and being able to access the Admin page.
 Recently, if I attempt to access the admin page of a new Django app it 
 throws the CSRF error upon trying to log in!!!

 I have attempted several ways to bypass this error including adding 
 allowed hosts but I cant seem to get past this issue.

 Can someone please provide me with the definitive way of stopping CSRF 
 error when simply trying to access the admin part of Django? I mean there 
 are no post functions that really apply to this feature so I cant 
 understand the CSRF token.

 I cant get past this issue which means I can never access the admin 
 page!!

 Please help.

 Regards

 James

>>> -- 
>>>
>> 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...@googlegroups.com.
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/3f7e8ff3-3619-4ddf-8517-0ee3a613ed20n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/491c2ea0-c962-4392-9777-f95d1e873a62n%40googlegroups.com.


How to link different apps into one main app

2023-03-24 Thread Chandresh . T
I'm a new learner of Django, and I want to do a project, In the main app a 
form will be given and if the person tells that he belongs to the frontend 
or backend developing group he will be moved to that room respectively.

So I thought that I can create 2 different apps one frontend and another 
backend then once logged in to the main app the user will be sent to the 
respective apps room.

I searched for how to do this on google, but there was no solution. So if 
you guys have any ideas please help me with this.

Thank you in advance! 

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1a056e9a-82c7-4267-a070-eb1119e3eceen%40googlegroups.com.


Re: Failed to send Email by Django

2023-03-24 Thread 'Kasper Laudrup' via Django users

On 24/03/2023 05.16, bing wrote:
I am using the email module in Django to inform of users with their 
registration. Sometimes it can send email successfully, but more often, 
it fails. I searched for many solutions, but did not change this situation.




That is not really related to Django but more related to your email 
provider (or SMTP server).


It seems like you're using some Chinese email provider (139.com) and I 
have no idea what their reputation is, but it is completely up to the 
receiver of the email (or their email provider) whether they want to 
accept the email or not. If they don't it will most often just fail 
silently as you experience.


Not much to do about that. That's just how SMTP (email) has been 
designed (or not) back in the days.


You could try using another provider or setting up your own SMTP server 
(which is far from trivial to do and maintain).


Kind regards,

Kasper Laudrup

--
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/848e8e93-b12e-4f7b-ae40-fff34f4e9de6%40stacktrace.dk.


Re: How to link different apps into one main app

2023-03-24 Thread Vishesh Mangla
Add your app name in settings.py in INSTALLED_APPS

On Fri, 24 Mar, 2023, 18:58 Chandresh . T,  wrote:

> I'm a new learner of Django, and I want to do a project, In the main app a
> form will be given and if the person tells that he belongs to the frontend
> or backend developing group he will be moved to that room respectively.
>
> So I thought that I can create 2 different apps one frontend and another
> backend then once logged in to the main app the user will be sent to the
> respective apps room.
>
> I searched for how to do this on google, but there was no solution. So if
> you guys have any ideas please help me with this.
>
> Thank you in advance!
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1a056e9a-82c7-4267-a070-eb1119e3eceen%40googlegroups.com
> 
> .
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACaE8x7mEP6Srk3vG61Oa%2BiTqw4knQvfgNCvCS7dy3qpxQbdsw%40mail.gmail.com.


Re: How to link different apps into one main app

2023-03-24 Thread MAINSTREET STUDIO
My thoughts on this will be not to create 2 apps but have many Rooms in
your app and if the user register as a backend dev then in the database
they'll be queried to the specific room and also have a function that do
redirection to a specific room😁

On Fri, Mar 24, 2023, 3:28 PM Chandresh . T 
wrote:

> I'm a new learner of Django, and I want to do a project, In the main app a
> form will be given and if the person tells that he belongs to the frontend
> or backend developing group he will be moved to that room respectively.
>
> So I thought that I can create 2 different apps one frontend and another
> backend then once logged in to the main app the user will be sent to the
> respective apps room.
>
> I searched for how to do this on google, but there was no solution. So if
> you guys have any ideas please help me with this.
>
> Thank you in advance!
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1a056e9a-82c7-4267-a070-eb1119e3eceen%40googlegroups.com
> 
> .
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJyFwGnJCEOu5xXH0n958Yjg%2BgMh05xDBOp5ziVNxeJvdKdjSA%40mail.gmail.com.


Re: How to link different apps into one main app

2023-03-24 Thread DOI TUYEN
can you say more about this ?


Vào Th 6, 24 thg 3, 2023 vào lúc 20:41 Vishesh Mangla <
manglavishes...@gmail.com> đã viết:

> Add your app name in settings.py in INSTALLED_APPS
>
> On Fri, 24 Mar, 2023, 18:58 Chandresh . T, 
> wrote:
>
>> I'm a new learner of Django, and I want to do a project, In the main app
>> a form will be given and if the person tells that he belongs to the
>> frontend or backend developing group he will be moved to that room
>> respectively.
>>
>> So I thought that I can create 2 different apps one frontend and another
>> backend then once logged in to the main app the user will be sent to the
>> respective apps room.
>>
>> I searched for how to do this on google, but there was no solution. So if
>> you guys have any ideas please help me with this.
>>
>> Thank you in advance!
>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/1a056e9a-82c7-4267-a070-eb1119e3eceen%40googlegroups.com
>> 
>> .
>>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACaE8x7mEP6Srk3vG61Oa%2BiTqw4knQvfgNCvCS7dy3qpxQbdsw%40mail.gmail.com
> 
> .
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAKQkyS5WMxqJnZAX8Q6cc3FKmPMf4OHQ5N1JNMwMierYcK0Ag%40mail.gmail.com.


Join and ask any python, Django, DevOps related questions

2023-03-24 Thread Joseph Bashorun
Here's my group. Get premium help here free with your codes

https://chat.whatsapp.com/LdyIDGJKFPGIaHDdJidV2X

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMQSgOT4qy3ohYzL78xDsN-tsJOax%3DDpHfCxVm95MXb2y-kUEQ%40mail.gmail.com.


"Fat" vs "Lean" or better "Fit" Use of Electrical Information Devices

2023-03-24 Thread Michael Starr
What are the properties of "fat" computer usage?
What are the properties of "fit" computer usage?

I find I fall into the former category.

:(

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f3f8381b-5fde-415a-85ef-b8e2c3cfa013n%40googlegroups.com.


Re: "Fat" vs "Lean" or better "Fit" Use of Electrical Information Devices

2023-03-24 Thread Michael Starr
I'll start:

Fat: Storing files you don't actually need because you "might need them 
*someday*"
Fit: Deleting or better yet, archiving those files

Mike

On Friday, March 24, 2023 at 3:58:47 PM UTC-7 Michael Starr wrote:

> What are the properties of "fat" computer usage?
> What are the properties of "fit" computer usage?
>
> I find I fall into the former category.
>
> :(
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/71d73a38-6183-43a3-a2b9-d0ef0e6188b5n%40googlegroups.com.


Re: "Fat" vs "Lean" or better "Fit" Use of Electrical Information Devices

2023-03-24 Thread Michael Starr
One more:
Fat: Sending yourself emails as a means of storing information
Fit: Writing it down somewhere instead

Mike

On Friday, March 24, 2023 at 3:58:47 PM UTC-7 Michael Starr wrote:

> What are the properties of "fat" computer usage?
> What are the properties of "fit" computer usage?
>
> I find I fall into the former category.
>
> :(
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/05a1d4ac-69a5-4ed2-8960-d086607db70cn%40googlegroups.com.


Re: How to link different apps into one main app

2023-03-24 Thread Chandresh . T
Thank you MAINSTREET STUDIO!

On Fri, 24 Mar 2023 at 22:16, MAINSTREET STUDIO 
wrote:

> My thoughts on this will be not to create 2 apps but have many Rooms in
> your app and if the user register as a backend dev then in the database
> they'll be queried to the specific room and also have a function that do
> redirection to a specific room😁
>
> On Fri, Mar 24, 2023, 3:28 PM Chandresh . T 
> wrote:
>
>> I'm a new learner of Django, and I want to do a project, In the main app
>> a form will be given and if the person tells that he belongs to the
>> frontend or backend developing group he will be moved to that room
>> respectively.
>>
>> So I thought that I can create 2 different apps one frontend and another
>> backend then once logged in to the main app the user will be sent to the
>> respective apps room.
>>
>> I searched for how to do this on google, but there was no solution. So if
>> you guys have any ideas please help me with this.
>>
>> Thank you in advance!
>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/1a056e9a-82c7-4267-a070-eb1119e3eceen%40googlegroups.com
>> 
>> .
>>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJyFwGnJCEOu5xXH0n958Yjg%2BgMh05xDBOp5ziVNxeJvdKdjSA%40mail.gmail.com
> 
> .
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BPOfqOYs43E%2BGbuJjxBnxTnrZGOrt%3DNWHZ7pR-gm8SRoczubg%40mail.gmail.com.