Re: Patreon and Django-AllAuth Integration

2020-10-30 Thread Andrew Stringfield
You guys are awesome!  I will try these solutions later this evening.

On Wednesday, October 28, 2020 at 11:30:56 PM UTC-4 oladipo...@gmail.com 
wrote:

> Hello Sir,
> You need to set the LOGIN_REDIRECT_URL in your settings.py file.
>
> On Mon, Oct 26, 2020, 8:47 PM Andrew Stringfield  
> wrote:
>
>> Hello all,
>>
>> I am trying to use Patreon's API Version 2 with Django 3.1.  I read: 
>> https://docs.patreon.com/#third-party-libraries and found that Patreon 
>> supported the django-allauth library.  I installed the library by following 
>> the instructions of: 
>> https://django-allauth.readthedocs.io/en/latest/installation.html.  I 
>> start up the default dev server and I go to 
>> http://127.0.0.1:8000/accounts/signup/ and fill out the form and hit 
>> submit.  I get the response of:
>> -
>> Page not found (404)Request Method:
>> GETRequest URL:
>> http://127.0.0.1:8000/accounts/profile/
>>
>> Using the URLconf defined in mysite.urls, Django tried these URL 
>> patterns, in this order:
>>
>>1. admin/
>>2. accounts/ signup/ [name='account_signup']
>>3. accounts/ login/ [name='account_login']
>>4. accounts/ logout/ [name='account_logout']
>>5. accounts/ password/change/ [name='account_change_password']
>>6. accounts/ password/set/ [name='account_set_password']
>>7. accounts/ inactive/ [name='account_inactive']
>>8. accounts/ email/ [name='account_email']
>>9. accounts/ confirm-email/ [name='account_email_verification_sent']
>>10. accounts/ ^confirm-email/(?P[-:\w]+)/$ 
>>[name='account_confirm_email']
>>11. accounts/ password/reset/ [name='account_reset_password']
>>12. accounts/ password/reset/done/ 
>>[name='account_reset_password_done']
>>13. accounts/ 
>>^password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$ 
>>[name='account_reset_password_from_key']
>>14. accounts/ password/reset/key/done/ 
>>[name='account_reset_password_from_key_done']
>>15. accounts/ social/
>>16. accounts/ patreon/
>>
>> The current path, accounts/profile/, didn't match any of these.
>>
>> You're seeing this error because you have DEBUG = True in your Django 
>> settings file. Change that to False, and Django will display a standard 404 
>> page.
>>
>> -
>>
>> I want to get data from Patreon, but it looks like I am just creating 
>> local user accounts in the database.  What am I doing wrong?
>>
>> -- 
>>
> 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/090d5b8f-d8cf-4ba7-86b1-35017dec2397n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/090d5b8f-d8cf-4ba7-86b1-35017dec2397n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/d2db7ef8-36a7-4f98-9c53-cdc7f2a0f4e7n%40googlegroups.com.


Re: Patreon and Django-AllAuth Integration

2020-10-28 Thread Andrew Stringfield
I would not be shocked.

On Wednesday, October 28, 2020 at 9:55:15 AM UTC-4 Ryan Nowakowski wrote:

> The patreon error you're seeing might be a different redirect URL than the 
> login redirect URL. i.e. these may be two different problems.
>
>
>
>
> On October 28, 2020 6:55:48 AM CDT, Andrew Stringfield <
> thefund...@gmail.com> wrote:
>>
>> I almost forgot.  I have checked my settings in Django and Patreon and 
>> the URL redirect matches for all that I can see.  I have an idea to try and 
>> use the testing framework to see what values I am passing to Patreon.
>>
>> On Wednesday, October 28, 2020 at 7:53:42 AM UTC-4 Andrew Stringfield 
>> wrote:
>>
>>> Sorry for the late reply.  I found a youtube video of: 
>>> https://www.youtube.com/watch?v=-TUEM2NCuVE and I followed the 
>>> instructions as best as I could.  I created a button for a Patreon login 
>>> and I get the below results:
>>>
>>> In my URL bar I get: 
>>> https://www.patreon.com/oauth2/errors?error=invalid_request_description=Mismatching+redirect+URI.=z5ycBAl8AI5V
>>> and in my HTML Body I get: 
>>> {"error":"invalid_request","error_description":"Mismatching redirect 
>>> URI.","state":"z5ycBAl8AI5V"}
>>>
>>>
>>> On Tuesday, October 27, 2020 at 9:28:38 AM UTC-4 Ryan Nowakowski wrote:
>>>
>>>> On Mon, Oct 26, 2020 at 12:16:03PM -0700, Andrew Stringfield wrote: 
>>>> > Hello all, 
>>>> > 
>>>> > I am trying to use Patreon's API Version 2 with Django 3.1. I 
>>>> > read: https://docs.patreon.com/#third-party-libraries and found that 
>>>> > Patreon supported the django-allauth library. I installed the library 
>>>> by 
>>>> > following the instructions 
>>>> > of: https://django-allauth.readthedocs.io/en/latest/installation.html. 
>>>> I 
>>>> > start up the default dev server and I go 
>>>> > to http://127.0.0.1:8000/accounts/signup/ and fill out the form and 
>>>> hit 
>>>> > submit. I get the response of: 
>>>> > - 
>>>> > Page not found (404)Request Method: 
>>>> > GETRequest URL: 
>>>> > http://127.0.0.1:8000/accounts/profile/ 
>>>> > 
>>>> > Using the URLconf defined in mysite.urls, Django tried these URL 
>>>> patterns, 
>>>> > in this order: 
>>>> > 
>>>> > 1. admin/ 
>>>> > 2. accounts/ signup/ [name='account_signup'] 
>>>> > 3. accounts/ login/ [name='account_login'] 
>>>> > 4. accounts/ logout/ [name='account_logout'] 
>>>> > 5. accounts/ password/change/ [name='account_change_password'] 
>>>> > 6. accounts/ password/set/ [name='account_set_password'] 
>>>> > 7. accounts/ inactive/ [name='account_inactive'] 
>>>> > 8. accounts/ email/ [name='account_email'] 
>>>> > 9. accounts/ confirm-email/ [name='account_email_verification_sent'] 
>>>> > 10. accounts/ ^confirm-email/(?P[-:\w]+)/$ 
>>>> > [name='account_confirm_email'] 
>>>> > 11. accounts/ password/reset/ [name='account_reset_password'] 
>>>> > 12. accounts/ password/reset/done/ 
>>>> [name='account_reset_password_done'] 
>>>> > 13. accounts/ 
>>>> ^password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$ 
>>>> > [name='account_reset_password_from_key'] 
>>>> > 14. accounts/ password/reset/key/done/ 
>>>> > [name='account_reset_password_from_key_done'] 
>>>> > 15. accounts/ social/ 
>>>> > 16. accounts/ patreon/ 
>>>> > 
>>>> > The current path, accounts/profile/, didn't match any of these. 
>>>>
>>>> That's the default LOGIN_REDIRECT_URL[1]. Explicitly set that in your 
>>>> settings.py to wherever you want the user to land after login succeeds. 
>>>>
>>>> [1] 
>>>> https://docs.djangoproject.com/en/3.1/ref/settings/#login-redirect-url 
>>>>
>>>

-- 
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/914b5ef0-c1f0-408b-b1c3-0b1977ddd43an%40googlegroups.com.


Re: Patreon and Django-AllAuth Integration

2020-10-28 Thread Andrew Stringfield
I almost forgot.  I have checked my settings in Django and Patreon and the 
URL redirect matches for all that I can see.  I have an idea to try and use 
the testing framework to see what values I am passing to Patreon.

On Wednesday, October 28, 2020 at 7:53:42 AM UTC-4 Andrew Stringfield wrote:

> Sorry for the late reply.  I found a youtube video of: 
> https://www.youtube.com/watch?v=-TUEM2NCuVE and I followed the 
> instructions as best as I could.  I created a button for a Patreon login 
> and I get the below results:
>
> In my URL bar I get: 
> https://www.patreon.com/oauth2/errors?error=invalid_request_description=Mismatching+redirect+URI.=z5ycBAl8AI5V
> and in my HTML Body I get: 
> {"error":"invalid_request","error_description":"Mismatching redirect 
> URI.","state":"z5ycBAl8AI5V"}
>
>
> On Tuesday, October 27, 2020 at 9:28:38 AM UTC-4 Ryan Nowakowski wrote:
>
>> On Mon, Oct 26, 2020 at 12:16:03PM -0700, Andrew Stringfield wrote:
>> > Hello all,
>> > 
>> > I am trying to use Patreon's API Version 2 with Django 3.1. I 
>> > read: https://docs.patreon.com/#third-party-libraries and found that 
>> > Patreon supported the django-allauth library. I installed the library 
>> by 
>> > following the instructions 
>> > of: https://django-allauth.readthedocs.io/en/latest/installation.html. 
>> I 
>> > start up the default dev server and I go 
>> > to http://127.0.0.1:8000/accounts/signup/ and fill out the form and 
>> hit 
>> > submit. I get the response of:
>> > -
>> > Page not found (404)Request Method:
>> > GETRequest URL:
>> > http://127.0.0.1:8000/accounts/profile/
>> > 
>> > Using the URLconf defined in mysite.urls, Django tried these URL 
>> patterns, 
>> > in this order:
>> > 
>> > 1. admin/
>> > 2. accounts/ signup/ [name='account_signup']
>> > 3. accounts/ login/ [name='account_login']
>> > 4. accounts/ logout/ [name='account_logout']
>> > 5. accounts/ password/change/ [name='account_change_password']
>> > 6. accounts/ password/set/ [name='account_set_password']
>> > 7. accounts/ inactive/ [name='account_inactive']
>> > 8. accounts/ email/ [name='account_email']
>> > 9. accounts/ confirm-email/ [name='account_email_verification_sent']
>> > 10. accounts/ ^confirm-email/(?P[-:\w]+)/$ 
>> > [name='account_confirm_email']
>> > 11. accounts/ password/reset/ [name='account_reset_password']
>> > 12. accounts/ password/reset/done/ [name='account_reset_password_done']
>> > 13. accounts/ 
>> ^password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$ 
>> > [name='account_reset_password_from_key']
>> > 14. accounts/ password/reset/key/done/ 
>> > [name='account_reset_password_from_key_done']
>> > 15. accounts/ social/
>> > 16. accounts/ patreon/
>> > 
>> > The current path, accounts/profile/, didn't match any of these.
>>
>> That's the default LOGIN_REDIRECT_URL[1]. Explicitly set that in your
>> settings.py to wherever you want the user to land after login succeeds.
>>
>> [1] 
>> https://docs.djangoproject.com/en/3.1/ref/settings/#login-redirect-url
>>
>

-- 
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/6164113b-c063-4607-a194-4a19ed214b15n%40googlegroups.com.


Re: Patreon and Django-AllAuth Integration

2020-10-28 Thread Andrew Stringfield
Sorry for the late reply.  I found a youtube video 
of: https://www.youtube.com/watch?v=-TUEM2NCuVE and I followed the 
instructions as best as I could.  I created a button for a Patreon login 
and I get the below results:

In my URL bar I get: 
https://www.patreon.com/oauth2/errors?error=invalid_request_description=Mismatching+redirect+URI.=z5ycBAl8AI5V
and in my HTML Body I get: 
{"error":"invalid_request","error_description":"Mismatching redirect 
URI.","state":"z5ycBAl8AI5V"}


On Tuesday, October 27, 2020 at 9:28:38 AM UTC-4 Ryan Nowakowski wrote:

> On Mon, Oct 26, 2020 at 12:16:03PM -0700, Andrew Stringfield wrote:
> > Hello all,
> > 
> > I am trying to use Patreon's API Version 2 with Django 3.1. I 
> > read: https://docs.patreon.com/#third-party-libraries and found that 
> > Patreon supported the django-allauth library. I installed the library by 
> > following the instructions 
> > of: https://django-allauth.readthedocs.io/en/latest/installation.html. 
> I 
> > start up the default dev server and I go 
> > to http://127.0.0.1:8000/accounts/signup/ and fill out the form and hit 
> > submit. I get the response of:
> > -
> > Page not found (404)Request Method:
> > GETRequest URL:
> > http://127.0.0.1:8000/accounts/profile/
> > 
> > Using the URLconf defined in mysite.urls, Django tried these URL 
> patterns, 
> > in this order:
> > 
> > 1. admin/
> > 2. accounts/ signup/ [name='account_signup']
> > 3. accounts/ login/ [name='account_login']
> > 4. accounts/ logout/ [name='account_logout']
> > 5. accounts/ password/change/ [name='account_change_password']
> > 6. accounts/ password/set/ [name='account_set_password']
> > 7. accounts/ inactive/ [name='account_inactive']
> > 8. accounts/ email/ [name='account_email']
> > 9. accounts/ confirm-email/ [name='account_email_verification_sent']
> > 10. accounts/ ^confirm-email/(?P[-:\w]+)/$ 
> > [name='account_confirm_email']
> > 11. accounts/ password/reset/ [name='account_reset_password']
> > 12. accounts/ password/reset/done/ [name='account_reset_password_done']
> > 13. accounts/ ^password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$ 
> > [name='account_reset_password_from_key']
> > 14. accounts/ password/reset/key/done/ 
> > [name='account_reset_password_from_key_done']
> > 15. accounts/ social/
> > 16. accounts/ patreon/
> > 
> > The current path, accounts/profile/, didn't match any of these.
>
> That's the default LOGIN_REDIRECT_URL[1]. Explicitly set that in your
> settings.py to wherever you want the user to land after login succeeds.
>
> [1] https://docs.djangoproject.com/en/3.1/ref/settings/#login-redirect-url
>

-- 
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/44335b22-d73d-4ab9-9a13-b01a2cd2f6c2n%40googlegroups.com.


Re: Patreon and Django-AllAuth Integration

2020-10-26 Thread Andrew Stringfield
First, thank you for the response!  I want to use Patreon as a login 
account provider for my Patrons.  I have been playing around with the code 
some more.  This is what I have so far:

I created a view with the contents of:
def patreon(request):
request_string = 'http://patreon.com/oauth2/authorize'
request_string = request_string + '?response_type=code'
request_string = request_string + '_id=KEY_VARIABLE'
request_string = request_string + 
'_uri=http://website_name.com'
print(request_string)
response = requests.get(request_string)
print(response)
-
The print(response) produces: .  I looked up this error 
code and found: "403 Forbidden -- The requested is hidden for 
administrators only." at the URL of: https://docs.patreon.com/?python#errors
Please also note that the website_name.com is not currently online at this 
time.  If, I need to make it online, I can.
On Monday, October 26, 2020 at 4:33:16 PM UTC-4 andrea...@hypercode.se 
wrote:

> Hi,
>
> Django-allauth is used for handling login from SSO third party libraries - 
> EXACTLY what you are getting a response from.
>
> Do you want to use Patreon as a login account provider or do you want to 
> do something else?
>
> Regards,
>
> Andréas
>
>
> Den mån 26 okt. 2020 kl 20:47 skrev Andrew Stringfield <
> thefund...@gmail.com>:
>
>> Hello all,
>>
>> I am trying to use Patreon's API Version 2 with Django 3.1.  I read: 
>> https://docs.patreon.com/#third-party-libraries and found that Patreon 
>> supported the django-allauth library.  I installed the library by following 
>> the instructions of: 
>> https://django-allauth.readthedocs.io/en/latest/installation.html.  I 
>> start up the default dev server and I go to 
>> http://127.0.0.1:8000/accounts/signup/ and fill out the form and hit 
>> submit.  I get the response of:
>> -
>> Page not found (404)Request Method:
>> GETRequest URL:
>> http://127.0.0.1:8000/accounts/profile/
>>
>> Using the URLconf defined in mysite.urls, Django tried these URL 
>> patterns, in this order:
>>
>>1. admin/
>>2. accounts/ signup/ [name='account_signup']
>>3. accounts/ login/ [name='account_login']
>>4. accounts/ logout/ [name='account_logout']
>>5. accounts/ password/change/ [name='account_change_password']
>>6. accounts/ password/set/ [name='account_set_password']
>>7. accounts/ inactive/ [name='account_inactive']
>>8. accounts/ email/ [name='account_email']
>>9. accounts/ confirm-email/ [name='account_email_verification_sent']
>>10. accounts/ ^confirm-email/(?P[-:\w]+)/$ 
>>[name='account_confirm_email']
>>11. accounts/ password/reset/ [name='account_reset_password']
>>12. accounts/ password/reset/done/ 
>>[name='account_reset_password_done']
>>13. accounts/ 
>>^password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$ 
>>[name='account_reset_password_from_key']
>>14. accounts/ password/reset/key/done/ 
>>[name='account_reset_password_from_key_done']
>>15. accounts/ social/
>>16. accounts/ patreon/
>>
>> The current path, accounts/profile/, didn't match any of these.
>>
>> You're seeing this error because you have DEBUG = True in your Django 
>> settings file. Change that to False, and Django will display a standard 404 
>> page.
>>
>> -
>>
>> I want to get data from Patreon, but it looks like I am just creating 
>> local user accounts in the database.  What am I doing wrong?
>>
>> -- 
>> 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/090d5b8f-d8cf-4ba7-86b1-35017dec2397n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/090d5b8f-d8cf-4ba7-86b1-35017dec2397n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/ae46d39c-2b41-4c25-8cdf-11772ca7ebc5n%40googlegroups.com.


Patreon and Django-AllAuth Integration

2020-10-26 Thread Andrew Stringfield
Hello all,

I am trying to use Patreon's API Version 2 with Django 3.1.  I 
read: https://docs.patreon.com/#third-party-libraries and found that 
Patreon supported the django-allauth library.  I installed the library by 
following the instructions 
of: https://django-allauth.readthedocs.io/en/latest/installation.html.  I 
start up the default dev server and I go 
to http://127.0.0.1:8000/accounts/signup/ and fill out the form and hit 
submit.  I get the response of:
-
Page not found (404)Request Method:
GETRequest URL:
http://127.0.0.1:8000/accounts/profile/

Using the URLconf defined in mysite.urls, Django tried these URL patterns, 
in this order:

   1. admin/
   2. accounts/ signup/ [name='account_signup']
   3. accounts/ login/ [name='account_login']
   4. accounts/ logout/ [name='account_logout']
   5. accounts/ password/change/ [name='account_change_password']
   6. accounts/ password/set/ [name='account_set_password']
   7. accounts/ inactive/ [name='account_inactive']
   8. accounts/ email/ [name='account_email']
   9. accounts/ confirm-email/ [name='account_email_verification_sent']
   10. accounts/ ^confirm-email/(?P[-:\w]+)/$ 
   [name='account_confirm_email']
   11. accounts/ password/reset/ [name='account_reset_password']
   12. accounts/ password/reset/done/ [name='account_reset_password_done']
   13. accounts/ ^password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$ 
   [name='account_reset_password_from_key']
   14. accounts/ password/reset/key/done/ 
   [name='account_reset_password_from_key_done']
   15. accounts/ social/
   16. accounts/ patreon/

The current path, accounts/profile/, didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django 
settings file. Change that to False, and Django will display a standard 404 
page.

-

I want to get data from Patreon, but it looks like I am just creating local 
user accounts in the database.  What am I doing wrong?

-- 
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/090d5b8f-d8cf-4ba7-86b1-35017dec2397n%40googlegroups.com.


Re: Directly Accessing Dictionary Values

2019-11-20 Thread Andrew Stringfield
I have not!  I did see something about that on a website.  Would it go 
something like: dictionary_name.fieldname.0 ?  I will try it out later today.

-- 
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/f1615df3-04bc-4a28-9914-535c51f13268%40googlegroups.com.


Re: Directly Accessing Dictionary Values

2019-11-20 Thread Andrew Stringfield
Okie-dokie.  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/83187d02-2f28-4652-8986-83dfcd65108e%40googlegroups.com.


Re: Directly Accessing Dictionary Values

2019-11-20 Thread Andrew Stringfield
First, thank you for the reply Suraj!  I think that I misstated what I was 
really trying to do.  I am trying to access the dictionary values directly 
in the Template and not in the View.  I am trying to remove:

{% for question in unique_key_object %}
   {{ question.filename }}
   {% endfor %}

and just have:
{{ unique_key_object.filename }}




On Tuesday, November 19, 2019 at 10:59:07 PM UTC-5, Suraj Thapa FC wrote:
>
> Return the unique key object... Like
> return render(request, 'abc.html',unique_key)
>
> On Wed, 20 Nov 2019, 9:18 am Andrew Stringfield,  > wrote:
>
>> Hello all,
>>
>>  I am trying to access Dictionary values directly.  Here is my view:
>>
>> def unique_key_query(request, unique_key):
>> unique_key_object = 
>> simpleformmodel.objects.all().filter(id=unique_key)
>> context = {'unique_key_object': unique_key_object}
>> return render(request, "bash_file_page.html", context)
>>
>> Here is my template:
>> {% if unique_key_object %}
>> {% for question in unique_key_object %}
>> {{ question.filename }}
>> {% endfor %}
>> {% else %}
>> No data is available.
>> {% endif %}
>>
>> I can access Dictionary values with a for loop, but I just do not want to 
>> do that.  How can I access the values directly?
>>
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b8ee9cc4-1d49-4464-b181-583042182576%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/b8ee9cc4-1d49-4464-b181-583042182576%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/5dc09b06-1daa-432f-b31d-18a698bb0b4b%40googlegroups.com.


Directly Accessing Dictionary Values

2019-11-19 Thread Andrew Stringfield
Hello all,

 I am trying to access Dictionary values directly.  Here is my view:

def unique_key_query(request, unique_key):
unique_key_object = 
simpleformmodel.objects.all().filter(id=unique_key)
context = {'unique_key_object': unique_key_object}
return render(request, "bash_file_page.html", context)

Here is my template:
{% if unique_key_object %}
{% for question in unique_key_object %}
{{ question.filename }}
{% endfor %}
{% else %}
No data is available.
{% endif %}

I can access Dictionary values with a for loop, but I just do not want to 
do that.  How can I access the values directly?

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/b8ee9cc4-1d49-4464-b181-583042182576%40googlegroups.com.


Re: Drawing with Django

2016-11-13 Thread Andrew Stringfield
Yup.  I am going to need it. lol  I have never done anything like this 
before.  It should be interesting.

On Sunday, November 13, 2016 at 3:56:40 PM UTC-5, ludovic coues wrote:
>
> It's barely related to django. 
>
> If all you want is to make annotation, it's fairly easy and you don't 
> really need canvas and it's mainly javascript, which is independent 
> from django. 
> First, display your image. 
> Second, get where your user want their annotation. I would do that by 
> listening to click event on the image and computing the position of 
> the click in the image, which is position of the click in the page 
> minus position of the image in the page. 
> Third, get the actual annotation. 
> Fourth, send to django a request to store an annotation on image Z at 
> position X / Y with text T. 
>
> Fifth is to display the image. Get all the annotation for the image, 
> display dot at the position of each annotation, display the text on 
> mousehover. Or directly on the image if the image is huge. 
>
> Good luck 
>
> 2016-11-13 21:48 GMT+01:00 Andrew Stringfield <lone...@gmail.com 
> >: 
> > hello all, 
> > 
> >   I am interested in being able to draw on a Django view.  I have 
> been 
> > reading up some on how people draw in Html and it seems that the 
>  
> > tag seems to a good start.  Apparently I have to do some java scripting 
> as 
> > well.  What I envision is that I have a background image and then my 
> users 
> > can make annotations on the image and save the data...some how.  Any 
> ideas? 
> > 
> > -- 
> > 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 post to this group, send email to django...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/168eba94-cb9e-4dfa-a761-4f478150dd2f%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
>
> Cordialement, Coues Ludovic 
> +336 148 743 42 
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5464fd2a-9f09-4e83-ae55-27a4ec22dc5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Drawing with Django

2016-11-13 Thread Andrew Stringfield
hello all,

  I am interested in being able to draw on a Django view.  I have been 
reading up some on how people draw in Html and it seems that the  
tag seems to a good start.  Apparently I have to do some java scripting as 
well.  What I envision is that I have a background image and then my users 
can make annotations on the image and save the data...some how.  Any ideas?

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/168eba94-cb9e-4dfa-a761-4f478150dd2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Running Python3 code and placing results in a view

2016-01-03 Thread Andrew Stringfield
Hello all,

I am interested in running the code of: 
#!/usr/bin/python3
from wifi import Cell, Scheme
ssid = [cell.ssid for cell in Cell.all('wlan0')]
print(ssids)


with a view in Django and the results displayed in a drop down list.  Here 
is the information about the WIfi module that I am using: 
https://wifi.readthedocs.org/en/latest/ 

I am still trying to comprehend how the whole flow goes when creating views 
and I read that you can define a function in Django views and that should 
just about do it.  I tried to write a function, but that did not work out 
so well. lol

Any help would be appreciated.
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/454ac56d-ef2f-45e2-9cf8-8ab90dcddb47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Scanning for Wifi

2015-12-28 Thread Andrew Stringfield
Hello all,

   I saw a really cool feature that D-link wireless cameras have. First 
you physically hook up the camera to the LAN and then access the camera via 
web interface.  While on the web interface you can scan for your wireless 
network and connect the camera, wirelessly, to your network.  That is what 
I would like to do with my Django project.  Is this possible?

The host OS is Raspbian on Raspberry Pi B+.

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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f74a348d-8f4d-4f98-8bea-33fe74c1c706%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.