We Are Looking For Python Developers !

2020-10-29 Thread 'Lydia Belinda' via Django users


WE ARE HIRING

JOIN OUR TEAM!

Python Developer Position


We are looking for a highly skilled computer programmer who is comfortable 
with both front and back end programming. Full Stack Developers are 
responsible for developing and designing front end web architecture, 
ensuring the responsiveness of applications and working alongside graphic 
designers for web design features, among other duties.

Full Stack Developers will be required to see out a project from conception 
to final product, requiring good organizational skills and attention to 
detail.

*Qualifications*

   - 
   
   Bachelor's degree in *IT, Engineering, Computer Science, Business*
   - 
   
   *5+ years* of experience in Web Developing and Python Language
   - 
   
   *Fluent* in English
   - 
   
   Must have extensive Python development experience
   - 
   
   Experience in web server technologies in Django/Python is necessary
   - 
   
   Experience with social media APIs is also recommended
   - 
   
   Experience and/or interest in data science, including but not limited to 
   AI, machine learning, sentiment analysis, topic modeling, and NLP, is 
   recommended
   - 
   
   Experience with textual analysis is also recommended
   - 
   
   Strong communication skills, both verbal and written, and the ability to 
   listen effectively
   


*Apply now at*

*https://careers.bopbo.com/apply/remotely*



-- 
--
This message (including attachments) is confidential and may be 
privileged, subject to copyright, trade secret, or other legal rules and 
may not be forwarded without the author's permission. If you are not the 
intended recipient, or received it in error you must not read, copy, store 
or disseminate this message, and please delete the message from all storage 
devices and notify the sender immediately.


-- 
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/32ed8b54-d34f-4a85-82e3-e3fe38674aa8n%40googlegroups.com.


Can anyone help me fix this issue

2020-10-29 Thread Allen Yesudasan
Environment: Request Method: POST Request URL: 
https://youtubedownloader244.herokuapp.com/lint Django Version: 3.1.1 Python 
Version: 3.6.12 Installed Applications: ['tube', 'django.contrib.admin', 
'django.contrib.auth', 
'django.contrib.contenttypes', 'django.contrib.sessions', 
'django.contrib.messages', 
'django.contrib.staticfiles'] Installed Middleware: 
['whitenoise.middleware.WhiteNoiseMiddleware', 
'django.middleware.security.SecurityMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.middleware.clickjacking.XFrameOptionsMiddleware'] Traceback (most 
recent call last): File 
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py",
 
line 47, in inner response = get_response(request) File 
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", 
line 179, in _get_response response = wrapped_callback(request, 
*callback_args, **callback_kwargs) File "/app/maker/views.py", line 20, in 
lint yt = YouTube(video_url) File 
"/app/.heroku/python/lib/python3.6/site-packages/pytube/__main__.py", line 
91, in __init__ self.prefetch() File 
"/app/.heroku/python/lib/python3.6/site-packages/pytube/__main__.py", line 
183, in prefetch self.js_url = extract.js_url(self.watch_html) File 
"/app/.heroku/python/lib/python3.6/site-packages/pytube/extract.py", line 
143, in js_url base_js = get_ytplayer_config(html)["assets"]["js"] Exception 
Type: KeyError at /lint Exception Value: 'assets' 

-- 
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/6b4ec456-8122-4f00-9159-ac98b3f47cebn%40googlegroups.com.


Re: Fetching data from database

2020-10-29 Thread kern zhou
How to queries in DB: 
https://docs.djangoproject.com/en/3.1/topics/db/queries/#retrieving-all-objects
For the primary 
key:  https://docs.djangoproject.com/en/3.1/ref/models/fields/#primary-key
For the foreign key :  
 
https://docs.djangoproject.com/en/3.1/ref/models/fields/#django.db.models.ForeignKey

You can get these informations from the official Django doc.

在2020年10月29日星期四 UTC+8 上午2:43:02 写道:

> Hi everyone,
>
> Iam stuck at a point ...I want to fetch a data from a database , where 
> data should be insert manually , plz help me how to do that how to fire a 
> queries in DB and how to use primary key and foreign key over here. 
> Please help me ,Iam new to Django . 
>
> 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/04921889-ff29-44be-9863-4b1d64718413n%40googlegroups.com.


Re: Fetching data from database

2020-10-29 Thread Derek
Have a look at:

https://www.guru99.com/python-mysql-example.html

and then:
https://www.mysqltutorial.org/python-mysql-insert/
https://www.mysqltutorial.org/python-mysql-update/

Not too hard for a beginner.

On Wednesday, 28 October 2020 at 20:43:02 UTC+2 kiran...@gmail.com wrote:

> Hi everyone,
>
> Iam stuck at a point ...I want to fetch a data from a database , where 
> data should be insert manually , plz help me how to do that how to fire a 
> queries in DB and how to use primary key and foreign key over here. 
> Please help me ,Iam new to Django . 
>
> 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/8838b1be-66dc-41e5-82c4-f2566591813cn%40googlegroups.com.


How to create a approval login using django

2020-10-29 Thread mahanth kumar valluri
Hi everyone,
I have created a website with models as alumini,college . In that website I 
have made sure that each alumini is associated to a college.Now what i want 
to create is whenever a new alumini fills the information in registration 
page and click register under a particular college ,then that college 
should approve that alumini in order to register till then the alumini 
should see a waiting page but shouldn’t be logged into the website .
so how to create such a approval .
Is there any tutorials regarding this ,if so please share it here or else I 
can share the code of my website about the models so that you can guide me 
to achieve the result  

-- 
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/42262f44-2744-4f65-a382-da5043823132n%40googlegroups.com.


Django Sending Mail

2020-10-29 Thread Samiddha সমিদ্ধ
I want to include an email service in my project. But for that I need to 
provide my email password to django setings.py in  EMAIL_HOST_PASSWORD 
.
 
I want to know that secure to provide email password. When I deploy the 
project with a host, then is there are any risk of theft my password; how 
do I encrypt my password in django setings.py?

-- 
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/bb4dc1d9-53ad-48b6-829d-474d9b4fb098n%40googlegroups.com.


Re: Django Sending Mail

2020-10-29 Thread Kasper Laudrup

Hi Samiddha,

On 29/10/2020 17.08, Samiddha সমিদ্ধ wrote:
I want to include an email service in my project. But for that I need to 
provide my email password to django setings.py in EMAIL_HOST_PASSWORD 
. 
I want to know that secure to provide email password. When I deploy the 
project with a host, then is there are any risk of theft my password; 
how do I encrypt my password in django setings.py?




You can't really avoid making some secrets available on your production 
system. I personally use django-configurations:


https://django-configurations.readthedocs.io/en/stable/

and set my secrets as environment variables in my systemd service file 
for gunicorn. That is mostly for convenience. You definitely shouldn't 
store your secrets in the settings.py file you keep in revision control, 
but using environment variables doesn't make them any less accessible to 
your hosting provider.


I don't think there's any way to avoid having to trust your hosting 
provider, but you can try to ensure the secrets are only known to you 
and your hosting provider.


If you don't want to use django-configurations, a more "traditional" 
approach is described here:


https://djangostars.com/blog/configuring-django-settings-best-practices/

It doesn't make much sense to encrypt your password, since you still 
need to provide the secret to decrypt it when it needs to be used and 
then you're back to square one. You might be able to store a private key 
in some secure storage from your hosting provider that ensures the 
private key can never be retrieved and only used for decrypting your 
password, but I don't really think it's worth the effort, especially 
considering you still have to trust your hosting provider.


Hope that makes some sense.

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/2765334e-5f4c-72e4-f40c-ad3b8eda4062%40stacktrace.dk.


Re: Can anyone help me fix this issue

2020-10-29 Thread Andréas Kühne
You are looking for a key in the response from youtube that doesn't exist -
therefore you get this error. You will need to go to the youtube api and
see what the response should be.

Regards,

Andréas


Den tors 29 okt. 2020 kl 14:03 skrev Allen Yesudasan :

> Environment: Request Method: POST Request URL:
> https://youtubedownloader244.herokuapp.com/lint Django Version: 3.1.1 Python
> Version: 3.6.12 Installed Applications: ['tube', 'django.contrib.admin', 
> 'django.contrib.auth',
> 'django.contrib.contenttypes', 'django.contrib.sessions', 
> 'django.contrib.messages',
> 'django.contrib.staticfiles'] Installed Middleware: 
> ['whitenoise.middleware.WhiteNoiseMiddleware',
> 'django.middleware.security.SecurityMiddleware', 
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware', 
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware', 
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware'] Traceback (most
> recent call last): File
> "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py",
> line 47, in inner response = get_response(request) File
> "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py",
> line 179, in _get_response response = wrapped_callback(request,
> *callback_args, **callback_kwargs) File "/app/maker/views.py", line 20,
> in lint yt = YouTube(video_url) File
> "/app/.heroku/python/lib/python3.6/site-packages/pytube/__main__.py", line
> 91, in __init__ self.prefetch() File
> "/app/.heroku/python/lib/python3.6/site-packages/pytube/__main__.py", line
> 183, in prefetch self.js_url = extract.js_url(self.watch_html) File
> "/app/.heroku/python/lib/python3.6/site-packages/pytube/extract.py", line
> 143, in js_url base_js = get_ytplayer_config(html)["assets"]["js"] Exception
> Type: KeyError at /lint Exception Value: 'assets'
>
> --
> 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/6b4ec456-8122-4f00-9159-ac98b3f47cebn%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/CAK4qSCeh%2Bfn%3DiiMnnEw9D4wLuRYFXwspS%3DQUz%3DTP20ANQFTJfQ%40mail.gmail.com.


Re: Filter a field in a form CreatView

2020-10-29 Thread Walter Randazzo
Hi David,

Thanks so much for your reply. Im checking the  videos at the google search.

So hopefully I'l develop a combobox with that.

Thanks so much sir!


El jue., 29 oct. 2020 a las 1:24, David Nugent ()
escribió:

> This is known as a "combo box", somewhat different to a select.
>
> Check this google search: html5 combo box django
> 
>
> Some useful video tutorials + some explanations on how it all works.
>
> A simpler approach - override the widget class similar to how you have
> done, but there is no need to override them all and I would avoid doing so.
> If you just need to add some attributes, you can add to the attrs dict of
> the existing widget instead of replacing it entirely. Plenty of examples
> exist for that, including the (excellent) django documentation. For your
> combo box selector you would need to override the widget in order to render
> the html so you use something different to Select.
>
> Something like (except from a recent project of mine) the following in the
> form:
>
> class SomeForm(forms.Form)
> ...
> HEAR_ABOUT_US = (
> 'Celebrant',
> 'brochure about us',
> 'funeral director',
> 'facebook page or post',
> 'medical or social worker',
> 'priest, pastor or minister',
> 'friend or family member',
> 'other...',
> )
>  ...
> hear_about = forms.CharField(label='Where did you hear about us?',
> max_length=64, required=False,
> widget=ListTextWidget(name='hear_about',
> data_list=HEAR_ABOUT_US),
> help_text='Please let us know how you heard about
> us (press down or click arrow for options)')
> ...
>
>
> And the widget, which could probably do with some improvement:
>
> class ListTextWidget(forms.TextInput):
>
> def __init__(self, name, data_list, *args, **kwargs):
> super().__init__(*args, **kwargs)
> self._name = name
> self._list = data_list
> self.attrs.update(list=f'list__{self._name}')
>
> def render(self, name, value, attrs=None, renderer=None):
> text_html = super(ListTextWidget, self).render(name, value,
> attrs=attrs)
> data_list = f''
> for item in self._list:
> data_list += f''
> data_list += ''
> return (text_html + data_list)
>
>
> HTH, David
>
> On 29 Oct 2020, at 00:23, Walter Randazzo  wrote:
>
> Hi guys, How r u doing?
>
> I have a field called articulos that is foreign key,  in a form is defined
> as follow:
>
> *forms.py*
> from django import forms
> #from django.contrib.auth.models import User
> from .models import Stockmov
>
> class StockmovForm(forms.ModelForm):
> class Meta:
> model = Stockmov
> #fields ="__all__"
> fields =  ['articulo', 'motivo', 'Cantidad' ]
> widgets = {
>
> 'articulo': forms.Select(attrs={'class':'form-control', 
> 'placeholder':'Articulo'}),
>
> 'motivo': forms.TextInput(attrs={'class':'form-control', 
> 'placeholder':'Motivo'}),
>
> 'Cantidad': forms.NumberInput(attrs={'class':'form-control', 
> 'placeholder':'Cantidad'}),
> }
> labels = {
> 'articulo':'', 'motivo':'', 'Cantidad':'',
> }
>
> I want to allow the user to search an instance in the same  combobox
> articulo in the createview. Check the pic.
>
> Whats is the best native way to do that?Other alternatives?
>
> 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/692f2017-ab9e-40b7-8a7c-5c22bffaf368n%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/CAL7Dry60-w%2BQXZeQEPwjN6HKpk_Kw%2Bdv-yqCYfnCGrL4fshNTg%40mail.gmail.com.


How to recover from Django Channels connection limit?

2020-10-29 Thread hype...@gmail.com
 

I'm running a server on heroku where I have intermittent channel layer 
communications between instances of asyncConsumers. Running heroku locally, 
I have no problem with redis channel connection since I can have as many of 
them as I want, but once I upload my server to heroku, it gives me a 20 
redis connection limit. If I use more than that my server errors out, so I 
try to lower the expiry time so inactive redis connections would close. 
BUT, if a redis connection expires and I try to use the channel name with 
self.channel_layer.send(), I'll get the error below, how do I recover from 
this error without having to have external calls to create another 
asyncConsumer instance?


ERROR Exception inside application: Reader at end of file File 
"/app/.heroku/python/lib/python3.6/site-packages/channels/consumer.py", 
line 59, in __call__ [receive, self.channel_receive], self.dispatch File 
"/app/.heroku/python/lib/python3.6/site-packages/channels/utils.py", line 51, 
in await_many_dispatch await dispatch(result) File 
"/app/.heroku/python/lib/python3.6/site-packages/channels/consumer.py", 
line 73, in dispatch await handler(message) File "./myapp/webhook.py", line 
133, in http_request await 
self.channel_layer.send(userDB.backEndChannelName,{"type": "device.query"}) 
File 
"/app/.heroku/python/lib/python3.6/site-packages/channels_redis/core.py", 
line 296, in send if await connection.llen(channel_key) >= 
self.get_capacity(channel): File 
"/app/.heroku/python/lib/python3.6/site-packages/aioredis/commands/list.py", 
line 70, in llen return self.execute(b'LLEN', key) File 
"/app/.heroku/python/lib/python3.6/site-packages/aioredis/commands/__init__.py",
 
line 51, in execute return self._pool_or_conn.execute(command, *args, 
**kwargs) File 
"/app/.heroku/python/lib/python3.6/site-packages/aioredis/connection.py", 
line 322, in execute raise ConnectionClosedError(msg) Reader at end of file 

-- 
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/8b63c910-b230-42da-b230-b7babe3caacfn%40googlegroups.com.