Re: User registration with security features

2020-08-17 Thread Andréas Kühne
Hi,

No, that is not available in django per default. Django doesn't know
anything about "devices". You will need to write that code by yourself - or
search for a plugin that handles devices.

Regards,

Andréas


Den sön 16 aug. 2020 kl 23:59 skrev Ram :

> Hi,
>
> Does DJango have built in functions for user registration with following
> security features?
>
> 1. Initial registration should be successful as it is new user registration
> 1.1.  Upon successful registration and login, device will be registered in
> account history
>
> 2. When login is attempted from the same device, no need to record history
> of the device in account history
>
> 3. If login is attempted with valid credentials from new device, user will
> be prompted with new text fields for accepting valid password and valid
> security code, which will be sent to previously registered email address
>
> 3.1. User enters security code and existing valid password. Then login
> will be successful and this new device will be recorded in account history.
>
> 3.2. If login is attempted with invalid credentials from new device, we
> will fail the login with an appropriate message but still record the device
> in account history and alert the user about this login attempt in an email
> message so that user will take actions like deleting the device and reset
> the password.
>
> 4. If login is attempted multiple times (may be 3 times max.) with invalid
> credentails from a registered device, we will stop the user at 4th attempt
> and do the similar process mentioned in 3 & 3.1.
>
> I'm wondering if all of tha above possible with built in fucntions
> available by default or do we have to write everything from scratch?
>
> Best Regards,
> ~Ram
>
>
>
>
>
>
> --
> 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%2BOi5F0C_ppc2EMDORAwBTXBnUxXKzsaEWGj6sPLOe4smD%3D8kw%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/CAK4qSCch_Jyr5AjosDhRLnaO7qCgoXAmbgcwObdqarN0ifZRcw%40mail.gmail.com.


Re: Django Group Project

2020-08-17 Thread Josh Raj
Yes I am interested

On Sun, Aug 16, 2020, 20:45 Lokesh Kumar  wrote:

> Excited to work with you people...!
>
> On Sun, Aug 16, 2020 at 9:11 PM Mbah Victor 
> wrote:
>
>> hi guy's am victor by name am from african and am new to Django hope i
>> can use it for my backend i mean the programming language
>>
>> On Monday, August 10, 2020 at 12:21:13 PM UTC+1 anu19...@gmail.com wrote:
>>
>>> Hello Everyone !
>>>
>>> I am new to Django & looking forward to working in group with
>>> like-minded people.
>>> So, if there is anyone willing to work together on Django projects, may
>>> contact me through mail. Also, if there is anyone who mentors newbies, then
>>> would really appreciate the help.
>>>
>>> Thanks -
>>> Anu Pande
>>>
>> --
>> 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/d415591b-d001-48e8-a7a9-565edb19230cn%40googlegroups.com
>> 
>> .
>>
>
>
> --
>
> 
> Lokesh Kumar
> about.me/LokeshK431
> 
>
> --
> 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/CADiRPBrVptwvD2TNqMtr1HRrWdneDv45T-2dUVzAh58wRDHttw%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%2B3XbN7%3DxAU9yrTBY0HKqF9kNvn-kG2qYTePLDse6AnDgc1%2BQQ%40mail.gmail.com.


extjs-with-django-csrf

2020-08-17 Thread Koby Peleg Hen
Hello guy's
I have some issue with Django CSRF with ajax POST request being sent from 
Extjs.
I post a detailed post in the following link that I like you to see , maybe 
I did some mistake ...
https://stackoverflow.com/questions/63438547/extjs-with-django-csrf

Than all for any replay.
Koby Peleg Hen

-- 
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/610fc7a3-e578-446f-98f0-b68a635f2272o%40googlegroups.com.


Re:

2020-08-17 Thread coolguy
Send us the project folder screen shot where we can see the app folder and 
its sub folders. Also send us the screen shot of your view.py and urls.py

On Friday, August 14, 2020 at 10:02:39 AM UTC-4, Suraj Kumar wrote:
>
> Hi guys,
>
> I am to new django.
>
> I am making blog website project. During the making blog website I am 
> stuck one point for last 5 hrs, I don't know how to resolve this. I also 
> searched in google, stackoverflow but I am not satisfied with their answer. 
> So, anyone can help me to resolve this issue.
>
> Please find attached screenshot which given below
>
>

-- 
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/c4c6cef9-5506-4649-9950-9576cd73eb15o%40googlegroups.com.


Re: Sometimes get "incorrect padding error"- new bug in django 3.1?

2020-08-17 Thread Matthew Hegarty
Hey Diptesh - did you get anywhere with understanding this?  Did y ou get 
any response from the Django devs?
Just happened to me on my Staging site.  Recently upgraded from 3.0 to 3.1

I can login with Firefox, but Chrome crashes with the following error:

```python
Internal Server Error: /home/
Traceback (most recent call last):
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py",
 
line 215, in _get_session
return self._session_cache
AttributeError: 'SessionStore' object has no attribute '_session_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py",
 
line 118, in decode
return signing.loads(session_data, salt=self.key_salt, 
serializer=self.serializer)
File "/usr/local/lib/python3.8/site-packages/django/core/signing.py", line 
135, in loads
base64d = TimestampSigner(key, salt=salt).unsign(s, 
max_age=max_age).encode()
File "/usr/local/lib/python3.8/site-packages/django/core/signing.py", line 
201, in unsign
result = super().unsign(value)
File "/usr/local/lib/python3.8/site-packages/django/core/signing.py", line 
184, in unsign
raise BadSignature('Signature "%s" does not match' % sig)
django.core.signing.BadSignature: Signature 
"xxx" does not match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File 
"/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", 
line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", 
line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", 
line 73, in view
return self.dispatch(request, *args, **kwargs)
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/auth/mixins.py", 
line 50, in dispatch
if not request.user.is_authenticated:
File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", 
line 240, in inner
self._setup()
File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", 
line 376, in _setup
self._wrapped = self._setupfunc()
File "/usr/local/lib/python3.8/site-packages/django_otp/middleware.py", 
line 38, in _verify_user
user.otp_device = None
File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", 
line 270, in __setattr__
self._setup()
File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", 
line 376, in _setup
self._wrapped = self._setupfunc()
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/auth/middleware.py", 
line 23, in 
request.user = SimpleLazyObject(lambda: get_user(request))
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/auth/middleware.py", 
line 11, in get_user
request._cached_user = auth.get_user(request)
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", 
line 174, in get_user
user_id = _get_user_session_key(request)
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", 
line 58, in _get_user_session_key
return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py",
 
line 65, in __getitem__
return self._session[key]
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py",
 
line 220, in _get_session
self._session_cache = self.load()
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/db.py",
 
line 44, in load
return self.decode(s.session_data) if s else {}
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py",
 
line 122, in decode
return self._legacy_decode(session_data)
File 
"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py",
 
line 126, in _legacy_decode
encoded_data = base64.b64decode(session_data.encode('ascii'))
File "/usr/local/lib/python3.8/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
```
On Monday, 10 August 2020 at 12:21:34 UTC+1 Diptesh Choudhuri wrote:

>
>
> Environment:
>
>
>
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/admin/
>
>
> Django Version: 3.1
> Python Version: 3.8.3
> Installed Applications:
> ['django.contrib.admin',
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'rest_framework',
>  'rest_framework.authtoken',
>  'accounts.apps.AccountsConfig',
>  'posts.apps.PostsConfig']
> Installed Middleware:
> ['django.middleware.security.SecurityMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.common.CommonMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware'

Stream Webcam and with Button Capture Image

2020-08-17 Thread samar...@gmail.com
Hello, I already achieved opening the webcam in browser, I would like to 
add a button in a template and every time it is clicked, it saves the frame 
in a folder ('media')
I am new and Django and I don't understand much on how to use views and 
templates work together.

Can someone help me? I uploaded the folder

-- 
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/12f53f21-f406-4ea8-840e-42f01cdac863n%40googlegroups.com.
<>


Re: Stream Webcam and with Button Capture Image

2020-08-17 Thread Ketul Suthar
I will let you know. I am also working on same concept.

On Mon., Aug. 17, 2020, 5:19 p.m. samar...@gmail.com, 
wrote:

> Hello, I already achieved opening the webcam in browser, I would like to
> add a button in a template and every time it is clicked, it saves the frame
> in a folder ('media')
> I am new and Django and I don't understand much on how to use views and
> templates work together.
>
> Can someone help me? I uploaded the folder
>
> --
> 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/12f53f21-f406-4ea8-840e-42f01cdac863n%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/CANuqdaW_ofjaBrnY4Hii6BLE99xKuvYv_cXTB6CDYO7KJuWbbQ%40mail.gmail.com.


Re: Stream Webcam and with Button Capture Image

2020-08-17 Thread Samara Muñoz
Hi, thank you!!

El El lun, 17 de agosto de 2020 a la(s) 16:32, Ketul Suthar <
k2lsut...@gmail.com> escribió:

> I will let you know. I am also working on same concept.
>
> On Mon., Aug. 17, 2020, 5:19 p.m. samar...@gmail.com, <
> samaram...@gmail.com> wrote:
>
>> Hello, I already achieved opening the webcam in browser, I would like to
>> add a button in a template and every time it is clicked, it saves the frame
>> in a folder ('media')
>> I am new and Django and I don't understand much on how to use views and
>> templates work together.
>>
>> Can someone help me? I uploaded the folder
>>
>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>> 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/12f53f21-f406-4ea8-840e-42f01cdac863n%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/CANuqdaW_ofjaBrnY4Hii6BLE99xKuvYv_cXTB6CDYO7KJuWbbQ%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/CAA%2Btjr4XOuvapDvixiZC-XxJX1Oe4VrQynhUxELhT0mCCJxGUg%40mail.gmail.com.


Re: Django key/value JSON widget

2020-08-17 Thread Federico Capoano

Since I wasn't able to find a package which had this kind of widget, I 
scratched my own itch and published django-flat-json-widget 

.
I hope it will be useful to others as well, I included a gif that shows the 
widget in action.

Best regards
Federico Capoano
On Wednesday, July 22, 2020 at 1:34:01 PM UTC-5 Federico Capoano wrote:

> Hey everyone,
>
> I'm looking for a key/value widget to edit a JSON flat object, like this 
> widget here: 
> https://django-hstore.readthedocs.io/en/latest/#django-admin-widget (I 
> made this one a while ago, but I'm not maintaining that project anymore).
>
> But I'm having no luck in finding it, there must already be some, right?
>
> Thanks in advance
> Federico
>

-- 
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/27e1347b-6a17-4892-8ca8-736bcc6c6c27n%40googlegroups.com.


Re: syntax error while trying to run '$ django-admin startproject mysite' command on command terminal

2020-08-17 Thread coolguy
Hi Mike, since you didn't mention the exact error... just make sure you 
activated virtual environment and installed django in the directory you are 
in...

On Sunday, August 16, 2020 at 4:17:56 PM UTC-4, Michael O wrote:
>
> hello, i cd into the directory by cd\ to start a project and was welcomed 
> by the blinking '...'. i then typed $  $ django-admin startproject mysite 
> and I go syntax Error: invalid syntax. please help by pointing me in the 
> right direction so that I could continue to learn. Thank you.

-- 
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/9939f7c7-b789-4784-aef9-10ab9589b377o%40googlegroups.com.