Re:Looking for co founders

2021-09-04 Thread yingi keme
Can you please elaborate more on the project if it's valuable enough to invest time and effort. Original Message Subject: Looking for co foundersFrom: balu k To: Django users CC: I am working on a project based on stock market.I am actively looking for co founder,if anyone interested please mail me.



-- 
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4abf6cf6-0fa5-45ae-9581-8a5a2dd31af7n%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/-dofmz2hve4je1gyegy-tkqba1-lubhtf-ok0np7lesa0cjoi4ci-dkygthvlsxj7c6noe-e0ovda-k8pej8qr6lr9qp3fwc-wfo9z5-5o4l26ggjjqn-6shwnx-1kfx1anc7joumizb9561px2jhbiiu.1630790157281%40email.android.com.


Re:REQUEST FOR GUIDES IN MY DJANGO CRYPTO EXCHANGE PROJECT

2021-01-13 Thread yingi keme
Send a mail to yingik...@gmail.com. From your name I know you are Ijaw. I am too. I can address all or most of your issues. Original Message Subject: REQUEST FOR GUIDES IN MY DJANGO CRYPTO EXCHANGE PROJECTFrom: Emiedonmukumo Dick Boro To: Django users CC: Hello Guys,This is my First Conversation in this Group. I want to create my Crypto Project using django, But I am having challenges with some areas in django.I need guides on :Login/Logout area,Signup,authentication,accepting and sending payments,also buy, that is the payment processor.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c1a17f64-ff78-48da-93b3-3e77c8e11b20n%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/t4bcik6m5aitpo8k64ycldtzu0w3iit5nmkn-vbj5oy-g8r38pfdwiov-3x0mv9-yd7hj0-20xung-rjr6xkleltim-fdmqcu-g1mbkk8p2jaerizduy-pyngxo-8kll6p850ygr-7qv1au-xt5fut-de3yr8.1610546533285%40email.android.com.


Re: Django Caching and Browser Caching

2018-04-08 Thread yingi keme
Thanks Jason

Yingi Kem

> On 8 Apr 2018, at 4:19 PM, Jason <jjohns98...@gmail.com> wrote:
> 
> Browsers cache images, js and css, but not the actual data that's rendered.  
> In addition, browser caching only works for repeat visitors to your site.  
> Using server side caching complements browser side caching but also works for 
> first time visitors.
> 
>> On Sunday, April 8, 2018 at 10:49:07 AM UTC-4, yingi keme wrote:
>> I Have set up cache in my File System and I have used the following code to 
>> cache my view
>> 
>> from django.views.decorators.cache import cache_page
>> 
>> @cache_page(60 * 15)
>> def myView(request):
>> #some code
>> 
>> 
>> What i want to know is that, How is this caching mechanism different from 
>> the automatic caching some browsers provide?
>> 
>> Browsers usually do cache web apps, so what difference will this manual 
>> caching configuration make?
> 
> -- 
> 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/9787aa43-5b35-446d-85a1-4609c6b38c5b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/8C8EE3BF-D3E3-4947-A0E0-D2C51F098138%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Caching and Browser Caching

2018-04-08 Thread yingi keme
I Have set up cache in my File System and I have used the following code to 
cache my view

from django.views.decorators.cache import cache_page


@cache_page(60 * 15)

def myView(request):

#some code



What i want to know is that, How is this caching mechanism different from 
the automatic caching some browsers provide?

Browsers usually do cache web apps, so what difference will this manual 
caching configuration make?

-- 
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/61c8eb2b-0293-4562-a3e2-625a85cdb75f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Unable to Send Email

2018-03-31 Thread yingi keme
Okk. Thanks

I will consult with them

Yingi Kem

> On 31 Mar 2018, at 11:52 AM, Jani Tiainen <rede...@gmail.com> wrote:
> 
> Hi,
> 
> Error means that user which is used as sender of email is actually not 
> permitted to send emails.
> 
> You need to check with your IT support is your support@**.org allowed to 
> send emails through your smtp provider.
> 
> la 31. maaliskuuta 2018 klo 13.30 yingi keme <yingik...@gmail.com> kirjoitti:
>> Hi
>> 
>> I am getting a SMTPData Error when i try to send message from my django 
>> application
>> 
>> The Error it gives is this
>> 
>> 
>> smtplib.SMTPDataError: (550, b'5.7.60 SMTP; Client does not have permissions 
>> to send as this sender [BN6PO18UB1201.namprd18.prod.outlook.com]')
>> 
>> In My settings.py I have the following
>> 
>> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
>> 
>> EMAIL_HOST = 'smtp.office365.com'
>> EMAIL_HOST_USER = 'support@**.org'
>> EMAIL_HOST_PASSWORD = '**'
>> EMAIL_PORT = 587
>> EMAIL_USE_TLS = True
>> DEFAULT_FROM_EMAIL = 'support@**.org'
>> SERVER_EMAIL = 'support@***.org'
>> 
>> What could possibly be 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 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/3772af22-43d6-4f4d-89cf-e41426fe9245%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAHn91oeD1R3gMxiJhdXUYdMXQ3xupOjD4ML-dOjFio5mew8uxg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/C12A52FD-A354-44EE-B815-DCD18BCE43EA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Unable to Send Email

2018-03-31 Thread yingi keme
Hi

I am getting a SMTPData Error when i try to send message from my django 
application

The Error it gives is this


smtplib.SMTPDataError: (550, b'5.7.60 SMTP; Client does not have 
permissions to send as this sender 
[BN6PO18UB1201.namprd18.prod.outlook.com]')

In My settings.py I have the following

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST = 'smtp.office365.com'
EMAIL_HOST_USER = 'support@**.org'
EMAIL_HOST_PASSWORD = '**'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'support@**.org'
SERVER_EMAIL = 'support@***.org'

What could possibly be 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 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/3772af22-43d6-4f4d-89cf-e41426fe9245%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pythonanywhere Hosting issue

2018-03-29 Thread yingi keme
Hello, 

my site is hosted on pythonanywhere.com. As per this 
tutorial https://help.pythonanywhere.com/pages/UsingANewDomainForExistingWebApp

I have changed the previous configuration from username.pythonanywhere.com 
to www.mydomain.com. There was a CNAME value webapp-.pythonanywhere.com

I bought my domain name from godaddy registrar. I am having an issue with 
managing DNS record. When i try to add the record

Type: CNAME
Host: www
Points to: webapp-.pythonanywhere.com
TTL: 1 Hr

It says "The specified CNAME already exist in the zone". 

And then when i try to load www,mydomain.com, it shows a page from the 
godaddy site instead of my HomePage

Please anyhelp will be appreciated

-- 
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/76b6f86a-35a1-4a0f-ad5b-70f689dcfe6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to install and use Django

2018-02-08 Thread yingi keme
Follow this quick video lessons on using django

https://m.youtube.com/watch?v=FNQxxpM1yOs

But you have to cd into the directory/environment where u have your python 
installed and type in the command 'pip install django'

You can follow the youtube video link above for lessons to understand the 
basics of django


Yingi Kem

> On 8 Feb 2018, at 11:14 AM, Vismaad Tamber  wrote:
> 
> Hi 
> 
> I am new to Django. can anyone please help me with installation and 
> starting a project. Does Django have IDE like dreamweaver or Visual studio to 
> design a website?
> I have installed Python 3.6 on my Windows machine. Also I have downloaded and 
> installed Django files at location 
> C:\Users\Vismaad\Documents\Django-2.0.2\build\lib\django.
> 
>I have no idea how to move ahead. What are Django-admin-tools?
> 
> 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 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/1f7aced7-72b8-4b7c-baee-ec891dc0509d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/F28A912C-4ED8-4702-91EC-7EC93145CBFC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: PostrgreSQL Inside Virtualenv

2018-01-25 Thread yingi keme
Its a pip install.

Yingi Kem

> On 25 Jan 2018, at 8:50 PM, bootcamprag  wrote:
> 
> Will that be a Pip install or from some other source? 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 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/bb0fcf30-0ff0-4c74-af69-5633acaa3250%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/042AA3E4-F952-4006-8D2C-1BEB93339B86%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: PostrgreSQL Inside Virtualenv

2018-01-25 Thread yingi keme
SQLite is fine when developing. But on production, it depends on the server you 
are going to host your site.

Some hosting service like pythonanywhere.com already provides you with 
POSTgresql. All you need to do is install the database adapter(psycopg2) in 
your virtual environment.

Yingi Kem

> On 25 Jan 2018, at 6:29 PM, bootcamprag  wrote:
> 
> Hello I am new to this group. At what point do you install PostrgreSQL? Is it 
> during the production phase?
> 
> -- 
> 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/e184c73c-e0b9-4f44-a2d3-56b160f3260d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/E3038F70-5988-4CF6-AA97-A18C7F25F7A8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing

2018-01-14 Thread yingi keme
Yes it does post

Yingi Kem

> On 14 Jan 2018, at 10:07 PM, Rich Shepard  wrote:
> 
>  I've not received messages from this mail list since last summer. I now
> have a need to communicate with others and learned that I'm still subscribed
> so I want to learn if this message posts and is sent back to me by the MLM.
> 
> Rich
> 
> -- 
> 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/alpine.LNX.2.20.1801141304320.5312%40salmo.appl-ecosys.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/62E14FBA-DCE0-4A25-8C94-BAA79D4D912C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread yingi keme
Okk Jani. I will take note of that too..

Thanks

Yingi Kem

> On 13 Jan 2018, at 10:28 PM, Jani Tiainen <rede...@gmail.com> wrote:
> 
> Hi,
> 
> Also be careful with file names. For example windows is case-preserving but 
> case-insensitive. You may accidentally name your templates with different  
> casing which may lead difficult to spot problems. 
> 
> 13.1.2018 22.58 "yingi keme" <yingik...@gmail.com> kirjoitti:
>> Thanks Kasper. It was the backslash.
>> 
>> Thanks for saving me...
>> 
>> Yingi Kem
>> 
>> > On 13 Jan 2018, at 2:52 PM, Kasper Laudrup <laud...@stacktrace.dk> wrote:
>> >
>> > Hi Yingi,
>> >
>> >> On 2018-01-13 14:46, yingi keme wrote:
>> >> I tried deploying my app to pythonanywhere hosting service and i am 
>> >> getting
>> >> TemplateDoesNotExist Error
>> >> Everything seems to work out well with my development server. But its not 
>> >> working fine when hosting
>> >> Anyhelp please!!
>> >> Here is my View
>> >> def Home(request):
>> >> template = 'Home\First.html'
>> >> return render(request, template)
>> >
>> > Avoid using backslashes ('\') in paths. Use a normal slash ('/') instead.
>> >
>> > Not sure if that solves your problem, but it's a good idea anyway.
>> >
>> > Backslashes are used for escaping characters in Python (and most other 
>> > languages).
>> >
>> > Also, if you post the entire error message (not just the exception type) 
>> > it would be much easier to help you.
>> >
>> > 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 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/2d02cda2-6678-607a-87c0-d8a862a35ecd%40stacktrace.dk.
>> > For more options, visit https://groups.google.com/d/optout.
>> 
>> --
>> 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/385DF731-B00F-4255-812C-27319239EF33%40gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAHn91oeFU1zweEcrQBR0-dE%2BuB8PYc_58LYHMMybu8ZVDDjBMw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/BD865F69-AC28-4E6A-A385-AC2F2A2418FD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread yingi keme
Thanks Kasper. It was the backslash. 

Thanks for saving me...

Yingi Kem

> On 13 Jan 2018, at 2:52 PM, Kasper Laudrup <laud...@stacktrace.dk> wrote:
> 
> Hi Yingi,
> 
>> On 2018-01-13 14:46, yingi keme wrote:
>> I tried deploying my app to pythonanywhere hosting service and i am getting
>> TemplateDoesNotExist Error
>> Everything seems to work out well with my development server. But its not 
>> working fine when hosting
>> Anyhelp please!!
>> Here is my View
>> def Home(request):
>> template = 'Home\First.html'
>> return render(request, template)
> 
> Avoid using backslashes ('\') in paths. Use a normal slash ('/') instead.
> 
> Not sure if that solves your problem, but it's a good idea anyway.
> 
> Backslashes are used for escaping characters in Python (and most other 
> languages).
> 
> Also, if you post the entire error message (not just the exception type) it 
> would be much easier to help you.
> 
> 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 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/2d02cda2-6678-607a-87c0-d8a862a35ecd%40stacktrace.dk.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/385DF731-B00F-4255-812C-27319239EF33%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


TemplateDoesNotExist Error on deploying

2018-01-13 Thread yingi keme
I tried deploying my app to pythonanywhere hosting service and i am getting

TemplateDoesNotExist Error

Everything seems to work out well with my development server. But its not 
working fine when hosting

Anyhelp please!!

Here is my View

def Home(request):
template = 'Home\First.html'
return render(request, template)

-- 
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/5078f6e6-1c01-450d-8933-e8abb5632aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Handling secret keys in digitalocean

2018-01-10 Thread yingi keme
Hi Etienne,

I will thoroughly investigate which is the best approach.


Yingi Kem

> On 10 Jan 2018, at 8:35 PM, Etienne Robillard  wrote:
> 
> Hi Jason,
> 
> I understand your views. But I have trust in Digital Ocean and Github that 
> they will not mess with "private" stuff unless they want to expose themselves 
> to lawsuits.
> 
> Personally, I don't care using a code repository to save Django-specific 
> data. 
> Cheers,
> 
> Etienne
> 
>> Le 2018-01-10 à 09:01, Jason a écrit :
>> Etienne, I think this is more related to having secrets outside of your code 
>> repository than actually on the server.  Having your AWS and db creds in 
>> your github repo, whether public or private, is a pretty bad thing to do.
>> -- 
>> 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/52e78880-3127-42c3-b2de-50a451b22072%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> Etienne Robillard
> tkad...@yandex.com
> https://www.isotopesoftware.ca/
> -- 
> 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/f28057cd-c300-c8e4-dbe7-52d155328db3%40yandex.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/F2BB3183-8695-44F0-8057-5251E3F9508F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Handling secret keys in digitalocean

2018-01-10 Thread yingi keme
Hi jason,

Ok so do you suggest moving secret keys to an environment variable because i am 
seeing tutorials on that, but its typically on the development stage. In 
production level, how will you do that..?

Yingi Kem

> On 10 Jan 2018, at 3:01 PM, Jason  wrote:
> 
> Etienne, I think this is more related to having secrets outside of your code 
> repository than actually on the server.  Having your AWS and db creds in your 
> github repo, whether public or private, is a pretty bad thing to do.
> -- 
> 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/52e78880-3127-42c3-b2de-50a451b22072%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/83521899-2750-46CA-9F31-B63BA827724B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Handling secret keys in digitalocean

2018-01-10 Thread yingi keme
I am aware that its a bad idea to put your secret keys and other API keys in 
your settinggs.py file. 

In a production environment like for instance hosting your site in 
digitalocean, where will you have to store your secret keys. And how will you 
load it in your settings.py file.?

I am a newbie when it comes to deploying, anyhelp will please.!!!

-- 
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/85aeb439-35c1-4586-bac8-b7daeda3d87d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread yingi keme
You nailed it james. It worked for me. The capitalization matters.

Thanks James..!!!

Yingi Kem

> On 17 Dec 2017, at 12:14 PM, James Schneider  wrote:
> 
> 
> 
> 
> Update
> 
> It gives the No Reverse Error. I dont seem to understand why
> 
> Instead of User.id, try user.id, capitalization matters.
> 
> Trying not to confuse things, but in this instance you may instead want to 
> use object.id, since you may be referring to a different User object than the 
> one that is logged in. I made an assumption that the view will be only 
> modifying the logged in user.
> 
> -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+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/CA%2Be%2BciWcjSo3%3DXOPLopKxo5r2qqwZ3pE_97gGpJV4q5gGNELCA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/BB378E17-CAEB-4ADB-AF11-3E9A1F4AFE18%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread yingi keme
So is there no way out? I am really confused how to go on with this

Yingi Kem

> On 17 Dec 2017, at 9:44 AM, Andréas Kühne <andreas.ku...@hypercode.se> wrote:
> 
> 
> 
> 2017-12-17 9:35 GMT+01:00 pradam programmer <pradam.programm...@gmail.com>:
>> From this:
>> Update
>> Change to this:
>> Update
> 
> That will not work and isn't recommended. Everything within {% %} is python 
> code already, so you don't need to interpolate again. I don't even think that 
> will work.
> 
> Unfortunately I don't have any suggestions to get it working either...
> 
> Regards,
> 
> Andréas
> 
> 
>  
>>> On 17-Dec-2017 2:00 PM, "yingi keme" <yingik...@gmail.com> wrote:
>>> The problem is that, it works perfectly when i put the number on the 
>>> template like this
>>> 
>>> Update
>>> 
>>> But when i do 
>>> 
>>> Update
>>> 
>>> It gives the No Reverse Error. I dont seem to understand why
>>> 
>>> Yingi Kem
>>> 
>>>> On 16 Dec 2017, at 11:18 AM, Любопытный Енот <kpblc...@gmail.com> wrote:
>>>> 
>>>> try fix your pattern to
>>>> r'^/Core/UpdateMe/(?P\\d+)/$'
>>>> 
>>>> 
>>>> суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme 
>>>> написал:
>>>>> 
>>>>> I am using the django generic UpdateView
>>>>> 
>>>>> class UserUpdate(UpdateView):
>>>>> model = User
>>>>> fields = ['first_name', 'last_name', 'email', 'username']
>>>>> template_name = 'Core\MyUpdate.htm'
>>>>> 
>>>>> And my url pattern is this:
>>>>> 
>>>>> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
>>>>> 
>>>>> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives 
>>>>> this error
>>>>> 
>>>>> NoReverseMatch at /Core/UpdateMe/34/
>>>>> 
>>>>> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) 
>>>>> tried: ['Core/UpdateMe/(?P\\d+)/$']
>>>> 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/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> -- 
>>> 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/249DD07C-736B-4861-A32B-2C00FC04E960%40gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> 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/CAGGVXBPV1H%2BiT7gDb3DmDVOm%2B94i8wOr0KH%2BwEf97jGRfGFtmg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAK4qSCf-uU8cMQrz1JBWkrEU9e4ny_jW%2BRU8z4zbD0s-0hvHbw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/2595AC34-1A5D-447D-9D51-E02980B8376D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread yingi keme
The problem is that, it works perfectly when i put the number on the template 
like this

Update

But when i do 

Update

It gives the No Reverse Error. I dont seem to understand why

Yingi Kem

> On 16 Dec 2017, at 11:18 AM, Любопытный Енот <kpblc...@gmail.com> wrote:
> 
> try fix your pattern to
> r'^/Core/UpdateMe/(?P\\d+)/$'
> 
> 
> суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme написал:
>> 
>> I am using the django generic UpdateView
>> 
>> class UserUpdate(UpdateView):
>> model = User
>> fields = ['first_name', 'last_name', 'email', 'username']
>> template_name = 'Core\MyUpdate.htm'
>> 
>> And my url pattern is this:
>> 
>> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
>> 
>> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives this 
>> error
>> 
>> NoReverseMatch at /Core/UpdateMe/34/
>> 
>> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
>> ['Core/UpdateMe/(?P\\d+)/$']
> 
> -- 
> 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/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/249DD07C-736B-4861-A32B-2C00FC04E960%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


No Reverse Match Exception

2017-12-16 Thread yingi keme
I am using the django generic UpdateView

class UserUpdate(UpdateView):
model = User
fields = ['first_name', 'last_name', 'email', 'username']
template_name = 'Core\MyUpdate.htm'

And my url pattern is this:

url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')

However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives this 
error

NoReverseMatch at /Core/UpdateMe/34/

Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
['Core/UpdateMe/(?P\\d+)/$']



-- 
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/53dc7230-00ec-45ae-b6d8-da9a135e04fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls website from documentation

2017-12-05 Thread yingi keme
Your url is not pointing to the url pattern specified

Try this:

http://localhost:8000/polls

What u are doing is http://localhost:8000/admin/polls.

Then i noticed you deleted the admin url pattern in you urls.py file. You will 
definitely need to use the admin page pretty soon.

Yingi Kem

> On 5 Dec 2017, at 11:22 PM, lmchikukwa  wrote:
> 
> I am a beginner in the django framework. I am having a problem with a page 
> not found error. The code for both the urls' files are attached and the 
> output from the site is show.
> Please help me understand what I dd wrong because I do not know.
> -- 
> 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/91994018-827d-49f0-b920-63332ffe90bb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
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/48C6CBC9-2084-4ECF-9A1F-4B55133A3610%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I customize registration form HTML?

2017-12-01 Thread yingi keme
Hey, i made a mistake in the previous reply. Its widget and not widgets. The 
correct code is:


Intead of rendering it with the as_p. You can render them individually.
ie

{{form.name}}
{{form.username}}

 In the forms.py, in each of the fields, add widget attributes.

def MyForm(forms.ModelForm):
name = forms.CharField(label='name', 
widget=forms.TextInput(attrs={'placeholder':'Name', 
'class':'yourInputFieldClassName'}))


Yingi Kem

> On 1 Dec 2017, at 1:50 AM, Tom Tanner  wrote:
> 
> The HTML for the user registration form looks like this:
> 
>  {% csrf_token %}
>  {{ registration_form.as_p }}
>  Register
> 
> 
> I understand that the `registration_form.as_p` line automatically gives me 
> the form's HTML. But I'd like to customize that HTML. For instance, I'd like 
> the label text to be placeholders instead. How do I do this?
> 
> If it helps, `registration_form` is `UserCreationForm()`
> -- 
> 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/12490918-6d56-4079-ab53-9b8cb6f9fd9b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/67032251-4A45-46B5-95F3-EC7B552A273E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I customize registration form HTML?

2017-12-01 Thread yingi keme


Yingi Kem

> On 1 Dec 2017, at 3:25 PM, yingi keme <yingik...@gmail.com> wrote:
> 
> Intead of rendering it with the as_p. You can render them individually.
> ie
> 
> {{form.name}}
> {{form.username}}
> 
>  In the forms.py, in each of the fields, add widget attributes.
> 
> def MyForm(forms.ModelForm):
> name = forms.CharField(label='name', 
> widget=forms.TextInput(attrs={'placeholder':'Name', 
> 'class':'yourInputFieldClassName'}))
> 
> 
> 
> Yingi Kem
> 
>> On 1 Dec 2017, at 1:50 AM, Tom Tanner <dontsendemailher...@gmail.com> wrote:
>> 
>> The HTML for the user registration form looks like this:
>> 
>>  {% csrf_token %}
>>  {{ registration_form.as_p }}
>>  Register
>> 
>> 
>> I understand that the `registration_form.as_p` line automatically gives me 
>> the form's HTML. But I'd like to customize that HTML. For instance, I'd like 
>> the label text to be placeholders instead. How do I do this?
>> 
>> If it helps, `registration_form` is `UserCreationForm()`
>> -- 
>> 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/12490918-6d56-4079-ab53-9b8cb6f9fd9b%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

-- 
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/EDB274E4-9EF7-4DE5-8AE0-FFFC53C3713E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I customize registration form HTML?

2017-12-01 Thread yingi keme
Intead of rendering it with the as_p. You can render them individually.
ie

{{form.name}}
{{form.username}}

 In the forms.py, in each of the fields, add widget attributes.

def MyForm(forms.ModelForm):
name = forms.CharField(label='name', 
widgets=forms.TextInput(attrs={'placeholder':'Name', 
'class':'yourInputFieldClassName'}))



Yingi Kem

> On 1 Dec 2017, at 1:50 AM, Tom Tanner  wrote:
> 
> The HTML for the user registration form looks like this:
> 
>  {% csrf_token %}
>  {{ registration_form.as_p }}
>  Register
> 
> 
> I understand that the `registration_form.as_p` line automatically gives me 
> the form's HTML. But I'd like to customize that HTML. For instance, I'd like 
> the label text to be placeholders instead. How do I do this?
> 
> If it helps, `registration_form` is `UserCreationForm()`
> -- 
> 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/12490918-6d56-4079-ab53-9b8cb6f9fd9b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/13998D7F-2C4F-4CD8-A879-D96BF836D035%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wants to make webpage auto reload whenever database is update.

2017-11-25 Thread yingi keme
You can use channels. Check out channels in django. It is a websocket library 
and it will be useful for what you are looking for

Yingi Kem

> On 25 Nov 2017, at 4:55 PM, Unnati C  wrote:
> 
> Web page is about displaying data from database, Till now webpage is 
> displaying data, but if I want to see latest update I have to refresh page in 
> browser. Is their any solution to auto reload page so user at end doesn't 
> have to refresh it.
> -- 
> 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/a7a12b04-bec0-4d08-aaf9-e7b3b4d6a117%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/F985AC95-D38D-43A8-8352-0861A4445848%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Authenticating to /admin doesn't redirect

2017-11-20 Thread yingi keme
Try python manage.py createsuperuser. Follow the instructions, then try login 
in again

Yingi Kem

> On 20 Nov 2017, at 1:51 PM, Christian Ahidjo  wrote:
> 
> Hi,
> I started working on an existing django project and for a reason I ignore if 
> I try to log in /admin the page does nothing. There is no error message about 
> wrong credentials. Only error message I get is when the input fields are 
> empty. What is the way on Django to create a new user? What could be the 
> cause of such issue ?
> -- 
> 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/e293fc17-ea16-4729-a4b1-19ef6a8fc4ac%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/16CED3CD-8A97-4620-9A95-0BE7C6A423C3%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Limit a view to superuser only

2017-11-19 Thread yingi keme
All of a sudden and out of the blue, it just worked. I had the re-run my 
server

On Sunday, November 19, 2017 at 5:54:11 AM UTC-8, Jani Tiainen wrote:
>
> Hi.
>
> Could you paste the full traceback here because having an OSError sounds 
> like there is is something else wrong in your system.
>
> On 19 Nov 2017, at 15.22, yingi keme <ying...@gmail.com > 
> wrote:
>
> I have a function that i want to be accessed only if the user is a 
> supersuser.
>
> I have tried this
>
> from django.contrib.admin.views.decorators import staff_member_required
>
> @staff_member_required
> def my_view(request):
> template_name = 'Core\CustomizedAdmin.html'
> return render(request, template_name)
>
>
> What happens is that when i try to access this view, it directs me to the 
> default login admin page. 
> And then when i login as a superuser, it gives an OSError invalid argument:
>
> I expected that after login in as a superuser it will redirect to the Page 
> i want.
>
> Am i doing it the wrong way?
>
> Is there an alternative way to Limit a view to superuser only?
>
> -- 
> 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/fc05e300-5e71-4bc5-b388-2996c5b8bb0a%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/fc05e300-5e71-4bc5-b388-2996c5b8bb0a%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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/47bc5cb1-0b67-4849-b621-ef2f066f25e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Limit a view to superuser only

2017-11-19 Thread yingi keme
I have a function that i want to be accessed only if the user is a 
supersuser.

I have tried this

from django.contrib.admin.views.decorators import staff_member_required

@staff_member_required
def my_view(request):
template_name = 'Core\CustomizedAdmin.html'
return render(request, template_name)


What happens is that when i try to access this view, it directs me to the 
default login admin page. 
And then when i login as a superuser, it gives an OSError invalid argument:

I expected that after login in as a superuser it will redirect to the Page 
i want.

Am i doing it the wrong way?

Is there an alternative way to Limit a view to superuser only?

-- 
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/fc05e300-5e71-4bc5-b388-2996c5b8bb0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Callback Function Not running

2017-11-11 Thread yingi keme
No i dont.

But i am thinking that since it is a GET http request, Then there shouldnt be a 
parameter in the url pattern. So maybe it should be

url(r'callback/' call_back) instead the previous one i did.

Although i havent tried it out yet.

Yingi Kem

> On 11 Nov 2017, at 4:46 PM, Dylan Reinhold <dreinh...@gmail.com> wrote:
> 
> Do you have a url entry above that is also matching it?
> 
>> On Sat, Nov 11, 2017 at 3:52 AM, yingi keme <yingik...@gmail.com> wrote:
>> I have a callback function(webhook) implemented below
>> 
>> def call_back(request, param):
>> # Testnet
>> method='GET'
>> x_signature = request.headers.get('X-Signature')
>> print(siri)
>> 
>> request_uri_encoded = str(request).splitlines()[0].split()[1]
>> request_uri = urllib.parse.unquote(request_uri_encoded)
>> 
>> constant_digest = hashlib.sha512('').digest() # [207, 131, 225, 53, 
>> 126,.., 249, 39, 218, 62]
>> 
>> requestt = method+request_uri+constant_digest
>> raw_signature = hmac.new(secret, requestt, hashlib.sha512)
>> b64_signature = base64.b64encode(raw_signature.digest())
>> 
>> print('request_uri_encoded: ', request_uri_encoded)
>> print('request_uri: ', request_uri) 
>> print('x_signature: ', x_signature) 
>> print('b64_signature: ', b64_signature) 
>> 
>> if (x_signature == b64_signature):  # IT PRINTS ERROR
>> print('SUCCESS')
>> else:
>> print('ERROR') 
>> 
>> 
>> But this callback function dont get to run. The API is to issue a  GET http 
>> request to the url specified as my callback url.
>> 
>> The url specified is 'https://Jshhhtoo.localtunnel.me/callback/blue-cap'
>> 
>> And in my urls.py i have this pattern
>> 
>> url(r'^callback/(?P[-\w]+)/$', call_back, name='callback'),
>> 
>> But i dont seem to get why the callback function refuses to run even though 
>> from my command line i see that the webservice
>> keeps issuing a GET callback request. Here is what the GET request shows in 
>> my command
>> 
>> [11/Nov/2017 03:23:17] "GET 
>> /callback/blue-cap?order_id=204199=4570384_in_btc=
>> 0.04570384_paid_in_btc=0.04570384=2=muAYN5HZBN4VfvmVhZhTnm7yBN33JQ3JGD=9a5327bb9efa3b2be285c8a47222d6c89a95fd2d3e10c7c4707974c0c52e7e57&
>> transaction_ids=[%229a5327bb9efa3b2be285c8a47222d6c89a95fd2d3e10c7c4707974c0c52e7e57%22]_id=2_keychain_id=1_payment_redirect_to=
>> https%3A%2F%2Fbitcoinkem.localtunnel.me%2Fsucessful_redirect=true 
>> HTTP/1.1" 301 0
>> 
>> 
>> Any help please 
>> 
>> 
>> 
>> 
>> -- 
>> 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/7ad40d95-3e21-432d-939a-8e4f947aba92%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAHtg44AJ4346P_6Y%3DA7EGXnVOrm75h1hJCdJg%2BpcUcCE%2Bj3P3w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/8520E585-524D-45D8-AE71-DC221DA97728%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Callback Function Not running

2017-11-11 Thread yingi keme
I have a callback function(webhook) implemented below

def call_back(request, param):
# Testnet
method='GET'
x_signature = request.headers.get('X-Signature')
print(siri)

request_uri_encoded = str(request).splitlines()[0].split()[1]
request_uri = urllib.parse.unquote(request_uri_encoded)

constant_digest = hashlib.sha512('').digest() # [207, 131, 225, 53, 
126,.., 249, 39, 218, 62]

requestt = method+request_uri+constant_digest
raw_signature = hmac.new(secret, requestt, hashlib.sha512)
b64_signature = base64.b64encode(raw_signature.digest())

print('request_uri_encoded: ', request_uri_encoded)
print('request_uri: ', request_uri) 
print('x_signature: ', x_signature) 
print('b64_signature: ', b64_signature) 

if (x_signature == b64_signature):  # IT PRINTS ERROR
print('SUCCESS')
else:
print('ERROR') 


But this callback function dont get to run. The API is to issue a  GET http 
request to the url specified as my callback url.

The url specified is 'https://Jshhhtoo.localtunnel.me/callback/blue-cap'

And in my urls.py i have this pattern

url(r'^callback/(?P[-\w]+)/$', call_back, name='callback'),

But i dont seem to get why the callback function refuses to run even though 
from my command line i see that the webservice
keeps issuing a GET callback request. Here is what the GET request shows in 
my command

[11/Nov/2017 03:23:17] "GET 
/callback/blue-cap?order_id=204199=4570384_in_btc=
0.04570384_paid_in_btc=0.04570384=2=muAYN5HZBN4VfvmVhZhTnm7yBN33JQ3JGD=9a5327bb9efa3b2be285c8a47222d6c89a95fd2d3e10c7c4707974c0c52e7e57&
transaction_ids=[%229a5327bb9efa3b2be285c8a47222d6c89a95fd2d3e10c7c4707974c0c52e7e57%22]_id=2_keychain_id=1_payment_redirect_to=
https%3A%2F%2Fbitcoinkem.localtunnel.me%2Fsucessful_redirect=true 
HTTP/1.1" 301 0


Any help please 




-- 
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/7ad40d95-3e21-432d-939a-8e4f947aba92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Localtunnel with my Django Project

2017-10-30 Thread yingi keme
Thanks alot

I did it and it worked, added the address to ALLOWED_HOSTS in my settings.py

Thanks once again

Yingi Kem

> On 30 Oct 2017, at 2:02 AM, shreekant bohra <skbohra...@gmail.com> wrote:
> 
> Hi 
> 
> You don't need to integrate localtunnel with django. Open django test server 
> in one terminal and issue localtunnel command in another -
> 
> lt --port 8000
> Above command will expose port number 8000 on internet, which is the port of 
> your django test server and you can test as required.
> 
> --
> Shree Kant Bohra
> Co-founder 
> Geekybuddha Technologies
> 
> 
> 
> 
>> On Mon, Oct 30, 2017 at 3:09 AM, yingi keme <yingik...@gmail.com> wrote:
>> Hello
>> 
>> I need to test a service that uses Webhooks - HTTP callbacks.
>> 
>> I want to use localtunnel to open my localhost to the internet. However i 
>> dont know how to integrate it with my django project. I also dont know how 
>> to set up the url patterns if i am to use localtunnel.
>> 
>> Any help please...!!!
>> 
>> --
>> 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/ad8fdd20-95f3-4868-a17f-580dd54a800d%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAD5EYcq%3DhHU8aGAK0hu_pSdLijCFKX%3DdEYdH%2B_9v%2BRse5igOSQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/5712AC55-2647-4331-A5F2-80ED3B748F90%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Following tutoria: View not defined

2017-10-29 Thread yingi keme
Okkk. From your url pattern, What you should do is http://127.0.0.1:8000/hello. 
Because your url pattern says r'^hello/$'

But what u are doing presently is 

http://127.0.0.1:8000/

In this case your url pattern is supposed to be r'^$' and not r'^hello/$'


Yingi Kem

> On 29 Oct 2017, at 10:51 PM, Andre Basel  wrote:
> 
> Hi all
> 
> I see that I missed the import.
> 
> I now have 
> from django.conf.urls import url
> from django.contrib import admin
> 
> from mysite.views import hello
> 
> urlpatterns = [
> url(r'^admin/', admin.site.urls),
> url(r'^hello/$', hello),
> ]
> 
> 
> But get the following error in my browser now
> Page not found (404)
> Request Method:   GET
> Request URL:  http://127.0.0.1:8000/
>   Using the URLconf defined in mysite.urls,
>   Django tried these URL patterns, in this order: 
> 
> ^admin/
> 
> ^hello/$
> The empty path 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.
>
> 
> 
> 
> 
>> On Monday, October 30, 2017 at 10:29:36 AM UTC+13, Oğuzhan Arslan wrote:
>> import views method in urls.py file like this:
>> 
>> 
>> from django.conf.urls import url
>> from django.contrib import admin
>> 
>> from yourapp.views import hello # <<
>> 
>> urlpatterns = [
>> url(r'^admin/', admin.site.urls),
>> url(r'^hello/$', hello),
>> ]
>> 
>> 
>> 29 Ekim 2017 Pazar 23:39:12 UTC+3 tarihinde Andre Basel yazdı:
>>> 
>>> I am totally new to Django, and working through the following tutorial 
>>> https://djangobook.com/views-urlconfs/
>>> 
>>> Ihavecreatddf the following view in views.py
>>> 
>>> from django.http import HttpResponse
>>> 
>>> def hello(request):
>>> return HttpResponse("Hello world")
>>> 
>>> 
>>>  And then as per the tutorial updated urls.py as follows:
>>> from django.conf.urls import url
>>> from django.contrib import admin
>>> 
>>> urlpatterns = [
>>> url(r'^admin/', admin.site.urls),
>>> url(r'^hello/$', hello),
>>> ]
>>> 
>>> 
>>>  When I try an browse http://127.0.0.1:8000/ I now no can no longer connect 
>>> and the console shows the following error.
>>> 
>>> System check identified no issues (0 silenced).
>>> October 29, 2017 - 20:14:10
>>> Django version 1.11.6, using settings 'mysite.settings'
>>> Starting development server at http://127.0.0.1:8000/
>>> Quit the server with CONTROL-C.
>>> [29/Oct/2017 20:14:14] "GET / HTTP/1.1" 200 1716
>>> Performing system checks...
>>> 
>>> Unhandled exception in thread started by >> check_errors..wrapper at 0x7f1eae0c4268>
>>> Traceback (most recent call last):
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/utils/autoreload.py",
>>>  line 228, in wrapper
>>> fn(*args, **kwargs)
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/core/management/commands/runserver.py",
>>>  line 125, in inner_run
>>> self.check(display_num_errors=True)
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/core/management/base.py",
>>>  line 359, in check
>>> include_deployment_checks=include_deployment_checks,
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/core/management/base.py",
>>>  line 346, in _run_checks
>>> return checks.run_checks(**kwargs)
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/core/checks/registry.py",
>>>  line 81, in run_checks
>>> new_errors = check(app_configs=app_configs)
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/core/checks/urls.py",
>>>  line 16, in check_url_config
>>> return check_resolver(resolver)
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/core/checks/urls.py",
>>>  line 26, in check_resolver
>>> return check_method()
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/urls/resolvers.py",
>>>  line 254, in check
>>> for pattern in self.url_patterns:
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/utils/functional.py",
>>>  line 35, in __get__
>>> res = instance.__dict__[self.name] = self.func(instance)
>>>   File 
>>> "/home/abasel/Dajango_Projects/my_first_project/project_venv/lib64/python3.6/site-packages/django/urls/resolvers.py",
>>>  line 405, in url_patterns
>>> patterns = getattr(self.urlconf_module, "urlpatterns", 
>>> self.urlconf_module)
>>>   File 
>>> 

Localtunnel with my Django Project

2017-10-29 Thread yingi keme
Hello

I need to test a service that uses Webhooks - HTTP callbacks.

I want to use localtunnel to open my localhost to the internet. However i dont 
know how to integrate it with my django project. I also dont know how to set up 
the url patterns if i am to use localtunnel.

Any help please...!!!

-- 
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/ad8fdd20-95f3-4868-a17f-580dd54a800d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django samples

2017-10-25 Thread yingi keme
Follow this link. This is lesson 1.

https://m.youtube.com/watch?v=FNQxxpM1yOs

I think there are about 11 videos altogether. So you can search further for 
remaining video lessons.
It will give you a basic overview on how to create a simple web application 
with django.

You can later go deep if you wish. But i highly suggest u watch the videos from 
the above link.

Yingi Kem

> On 25 Oct 2017, at 4:43 PM, Ruifeng Hu  wrote:
> 
> 
> Hello everyone,
> 
>  Is there anyone who can share with me a small example, I just start learning 
>  Django.
> 
>  Than you.
> 
> Ruifeng Hu
> -- 
> 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/1d3d8a78-3c4b-4e82-a116-64ca9a870440%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/840EC294-3110-4D8D-AF71-67C3CC192D87%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can anyone help me in Template error?

2017-10-15 Thread yingi keme
Check the extension. Sometimes editor will save the file as .htm while your are 
referencing .html in your views. This can give a "No templates found" exception 
too.


Yingi Kem

> On 15 Oct 2017, at 11:22 AM, utpalbrahma1...@gmail.com wrote:
> 
> even though i have correct to login.htmlwhile running server and when i 
> try to open accounts page
> it pops an error show below--
> "no templates found"
> in my browser
>  
> -- 
> 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/656d9364-0e46-4cbb-9d3a-502595aa18c4%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/2D5A18B7-BF9B-4530-89AD-EF70D3FD6056%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can anyone help me in Template error?

2017-10-15 Thread yingi keme
What exactly is the error you are trying to fix?

Yingi Kem

> On 14 Oct 2017, at 10:49 AM, utpalbrahma1...@gmail.com wrote:
> 
> my code that caused an error :
> ///
> from django.shortcuts import render
> from django.http import HttpResponse
> from django.template import loader
> # Create your views here.
> 
> def home(request) :
> return render(request,'login.html',context) 
> ///
> above code is in my views.py of my app name "accounts"
> my project name "tutorial"
> All my directories are :
> 
> tutorial->
>  accounts
>  tutorial
>  manage.py
> and accounts->
> migrations
> __pycache__
> templates
> admin.py
> apps.py
> __init__.py
> models.py
> tests.py
> urls.py
> views.py
> 
> and templates->
>  accounts->
>  login.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 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/e74b849c-1757-43ca-9bea-e5820cc06f85%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/5AE24C94-582D-40D9-AEFE-57F885BB8AC2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Integrating Bitcoin Payment to Django Project

2017-10-14 Thread yingi keme

I am aware that you need a third-party services like Bitpay, Coinbase, 
BitcoinPayFlow etc if you want to speedily integrate a bitcoin payment gateway 
to your site.

I am also aware that python and django do have libraries available for the 
bitcoin implementation.

In the case of using python/django libraries (eg django-cc). How do you 
integrate it into your site and how does it access the merchants bitcoin wallet?

And do such libraries provide a function for generating invoice page containing 
QR code and the merchants address for the customer to easily make payment?

I want to know the basic level of integrating bitcoin payment to a django 
project using any of the python/django libraries out there.

Any help?

-- 
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/800f0f36-173a-42fc-8287-90b90be886c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rendering DataBase Image File

2017-09-24 Thread yingi keme
Okk. I will like to know how to set the MEDIA_ROOT and MEDIA_URL.?

And then, my images are uploaded to a directory named 'img' inside my static 
files directory. Does it affect how you set the MEDIA_ROOT and MEDIA_URL?



Yingi Kem

> On 24 Sep 2017, at 1:56 PM, Antonis Christofides 
> <anto...@djangodeployment.com> wrote:
> 
> Hi,
> 
> You need to put this in your template:
> 
> 
> 
> You must make sure that settings MEDIA_ROOT and MEDIA_URL are set correctly.
> 
> Regards,
> 
> Antonis
> Antonis Christofides
> http://djangodeployment.com
>> On 2017-09-24 12:04, yingi keme wrote:
>> Hello
>> 
>> Ok i have a simple model that has an ImageField to store image files
>> 
>> class Product(models.Model):
>> category = models.ForeignKey('CatalogCategory',
>> related_name='products')
>> name = models.CharField(max_length=300)
>> photo = models.ImageField(upload_to='Home/static/Home/img',
>> blank=True)
>> price_in_dollars = models.DecimalField(max_digits=6,
>> decimal_places=2)
>> 
>> The images are uploaded to static img folder.
>> 
>> How do you render the image in your template?
>> 
>> My Template file looks like this
>> 
>> {{ object.name }}
>> {{ object.description }}
>> 
>> {{ object.photo }}
>> Price: ${{ object.price_in_dollars }}
>> 
>> But the image file doesnt display {{object,photo}} , only the other items 
>> get to show.
>> 
>> How do you render ImageField in your templates?
>> -- 
>> 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/71d39500-4e57-4220-bdd0-dd2900b7e499%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/ebced5a4-1274-f268-3b67-02ea5f82d2ae%40djangodeployment.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/A3137EDF-EC9C-40BA-A1FA-5963AB08516F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Rendering DataBase Image File

2017-09-24 Thread yingi keme
Hello

Ok i have a simple model that has an ImageField to store image files

class Product(models.Model):
category = models.ForeignKey('CatalogCategory',
related_name='products')
name = models.CharField(max_length=300)
photo = models.ImageField(upload_to='Home/static/Home/img',
blank=True)
price_in_dollars = models.DecimalField(max_digits=6,
decimal_places=2)

The images are uploaded to static img folder.

How do you render the image in your template?

My Template file looks like this

{{ object.name }}
{{ object.description }}

{{ object.photo }}
Price: ${{ object.price_in_dollars }}

But the image file doesnt display {{object,photo}} , only the other items 
get to show.

How do you render ImageField in your templates?

-- 
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/71d39500-4e57-4220-bdd0-dd2900b7e499%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: JSON Objects

2017-09-16 Thread yingi keme
I will check it out, i have just used the third party package jsonpickle. And 
it was easy to use

Thanks a lot

Yingi Kem

> On 16 Sep 2017, at 11:31 AM, Jani Tiainen <rede...@gmail.com> wrote:
> 
> Hi
> 
> One of the simplest ways is to use special serializer. At least django-nap 
> and django-rest-framework do have excellent serializers you can leverage.
> 
> Django itself also has serializer you can use. 
> https://docs.djangoproject.com/en/1.11/topics/serialization/
> 
> 16.9.2017 13.26 "yingi keme" <yingik...@gmail.com> kirjoitti:
>> Say you have a simple class
>> 
>> class Cart(object):
>> def _init_(self, name, age):
>> self.name = name
>> self.age = age
>> 
>> And then you have an instance of the class
>> 
>> T = Cart('john', 23)
>> 
>> How will you serialize the object instance T using json?
>> 
>> I know json serializes limited data structure. But i think there is a custom 
>> way to serialize and deserialize Object instances.
>> 
>> Please help.
>> 
>> --
>> 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/67356dad-a1cd-40f0-aaf5-8a32ed481676%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAHn91ofw_JPyEuZJ2fG48w6kydPFzbdq5SjYHRWK0TDaSNehZg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/AF606193-FD96-4571-A49D-66F03A4C3901%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


JSON Objects

2017-09-16 Thread yingi keme
Say you have a simple class

class Cart(object):
def _init_(self, name, age):
self.name = name
self.age = age

And then you have an instance of the class

T = Cart('john', 23)

How will you serialize the object instance T using json?

I know json serializes limited data structure. But i think there is a custom 
way to serialize and deserialize Object instances. 

Please help.

-- 
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/67356dad-a1cd-40f0-aaf5-8a32ed481676%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django custom authentication

2017-09-13 Thread yingi keme
I have this code in my app view

from django.shortcuts import render
from django.contrib.auth.decorators import login_required


@login_required(login_url="login/")
def home(request):
return render(request, "home.html")


Here also is my project url

from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth import views

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'', include('log.urls')),
url(r'^login/$', views.login, {'template_name': 'login.html'}),
url(r'^logout/$', views.logout, {'next_page': '/login'}),

]


So i have the templates folder in my project root url and i have also 
configured TEMPLATES DIR in my settings.py

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
..
..
..
],
},
},


However, when i try to access my homepage,i expect it to render my custom 
login page(login.html). But it always say TemplateDoesNotExist.
I also tried putting the template folder inside an app. But the login page 
doesnt get rendered still.

I need help urgently.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 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/44041d5a-5969-4397-91e1-ba245f68339c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Connection with SQL server and user registration form

2017-08-28 Thread yingi keme
Okk so django has its own server set up already configured

All you need to so is type in the command

 python manage.py runserver

Yes. Django uses the MVC approach. So you have to use Models if you want to 
connect with your database.



Yingi Kem

> On 28 Aug 2017, at 3:25 PM, Gopi Devarapalli  
> wrote:
> 
> Hi everyone,
> 
> I am new to django. I just want to connect with sql server. And when user 
> submit the form i need to save the details on the sql server database table.  
> And I am confusing that there are models that are using SQLite, is it 
> mandatory to use Model?
> -- 
> 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/cac3e9a5-9cbf-4cde-8875-c32e20c2d637%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/D0A687A0-4027-4F46-90EF-F01626A0B240%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python and Django traing

2017-08-26 Thread yingi keme
Check google and download this pdf

"Definitive Guide to Django". 

But hope you are good in python language?

Yingi Kem

> On 26 Aug 2017, at 10:25 PM, AFSungo  wrote:
> 
> Hi,
> 
> I am beginner and want know:
> 
> Where can I find an online and remote class to learn Django??
> 
> 
> -- 
> 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/0a0f6385-33b1-4d11-b8c7-c2db089cdbb5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/5B5B3A40-CAA3-471F-BDEB-D41A8CBC00DE%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Group Models

2017-07-26 Thread yingi keme
What will be the best approach to designing a database schema that groups users 
in a collection of 4?

How will you create a model for lets say in an online game setting such that 
you want only 4 players in a single group based on thesame criteria amongst 
players?

Creating this model is problematic for me.

-- 
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/b0856edd-1adf-44b3-b1ac-bf20c39274ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Static files

2017-07-18 Thread yingi keme
Antonis, i think i understand the logic now. Thanks for the help.

Yingi Kem

> On 18 Jul 2017, at 3:25 PM, Antonis Christofides 
> <anto...@djangodeployment.com> wrote:
> 
> Hi,
> 
> Define staticUrl in the base template, like this:
> 
> 
>  staticUrl = "{% static '' %}";
> 
> 
> 
> Then, inside d6.js:
> 
> var imageBank = staticUrl + 'Game/blank.gif';
> 
> (It is also good practice to use a single JavaScript global variable, like
> app.staticUrl, in order to not pollute the global namespace, but that's 
> another
> issue.)
> 
> Regards,
> 
> Antonis
> 
> Antonis Christofides
> http://djangodeployment.com
> 
>> On 2017-07-18 16:53, yingi keme wrote:
>> I have a javascript file in my app static directory.
>> 
>> However inside my javascript file. I want to make use of an image. That is:
>> 
>> Javascript file is d6.js and it contains this code
>> 
>> var imageBank = baseUrl + "static/Game/blank.gif";
>> 
>> And then my html has this
>> 
>> {% load staticfiles %}
>> 
>> 
>> 
>> However when i render my html file the javascript file is unable to locate 
>> the img file (blank.gif). How do i get to reference an img file inside the 
>> static directory?
> 
> -- 
> 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/ea3a37fe-9d28-ac5d-93a5-5d54d40011ba%40djangodeployment.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/DA0EAF5B-D15A-40DE-BCEE-02E2AEAF2F7F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Static files

2017-07-18 Thread yingi keme
When i opened the console in my browser. It shows the error 'staticUrl is not 
defined'. 

The problem i am having is this. You are making use of a static file 
(blank.gif) inside another static file (d6.js)

Do you have to load static files inside the d6.js much thesame way you load 
static files in your template?



Yingi Kem

> On 18 Jul 2017, at 3:25 PM, Antonis Christofides 
> <anto...@djangodeployment.com> wrote:
> 
> Hi,
> 
> Define staticUrl in the base template, like this:
> 
> 
>  staticUrl = "{% static '' %}";
> 
> 
> 
> Then, inside d6.js:
> 
> var imageBank = staticUrl + 'Game/blank.gif';
> 
> (It is also good practice to use a single JavaScript global variable, like
> app.staticUrl, in order to not pollute the global namespace, but that's 
> another
> issue.)
> 
> Regards,
> 
> Antonis
> 
> Antonis Christofides
> http://djangodeployment.com
> 
>> On 2017-07-18 16:53, yingi keme wrote:
>> I have a javascript file in my app static directory.
>> 
>> However inside my javascript file. I want to make use of an image. That is:
>> 
>> Javascript file is d6.js and it contains this code
>> 
>> var imageBank = baseUrl + "static/Game/blank.gif";
>> 
>> And then my html has this
>> 
>> {% load staticfiles %}
>> 
>> 
>> 
>> However when i render my html file the javascript file is unable to locate 
>> the img file (blank.gif). How do i get to reference an img file inside the 
>> static directory?
> 
> -- 
> 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/ea3a37fe-9d28-ac5d-93a5-5d54d40011ba%40djangodeployment.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/885637A5-8648-4E02-BF3B-A55B872CFAE9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Static files

2017-07-18 Thread yingi keme
Okk

The static url you defined in the script. Isnt it supposed to be:

var staticUrl = "{% static %}";

I am thinking there is an error with the quotation mark u used. Am i correct?



Yingi Kem

> On 18 Jul 2017, at 3:25 PM, Antonis Christofides 
> <anto...@djangodeployment.com> wrote:
> 
> Hi,
> 
> Define staticUrl in the base template, like this:
> 
> 
>  staticUrl = "{% static '' %}";
> 
> 
> 
> Then, inside d6.js:
> 
> var imageBank = staticUrl + 'Game/blank.gif';
> 
> (It is also good practice to use a single JavaScript global variable, like
> app.staticUrl, in order to not pollute the global namespace, but that's 
> another
> issue.)
> 
> Regards,
> 
> Antonis
> 
> Antonis Christofides
> http://djangodeployment.com
> 
>> On 2017-07-18 16:53, yingi keme wrote:
>> I have a javascript file in my app static directory.
>> 
>> However inside my javascript file. I want to make use of an image. That is:
>> 
>> Javascript file is d6.js and it contains this code
>> 
>> var imageBank = baseUrl + "static/Game/blank.gif";
>> 
>> And then my html has this
>> 
>> {% load staticfiles %}
>> 
>> 
>> 
>> However when i render my html file the javascript file is unable to locate 
>> the img file (blank.gif). How do i get to reference an img file inside the 
>> static directory?
> 
> -- 
> 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/ea3a37fe-9d28-ac5d-93a5-5d54d40011ba%40djangodeployment.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/6186817A-5AEC-4620-8871-E2FF510F2AFB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Using Static files

2017-07-18 Thread yingi keme
I have a javascript file in my app static directory.

However inside my javascript file. I want to make use of an image. That is:

Javascript file is d6.js and it contains this code

var imageBank = baseUrl + "static/Game/blank.gif";

And then my html has this

{% load staticfiles %}



However when i render my html file the javascript file is unable to locate the 
img file (blank.gif). How do i get to reference an img file inside the static 
directory?




-- 
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/899b66b3-8b98-402e-a926-e8f0fe677dbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I am new in this world of Python.

2017-07-17 Thread yingi keme
Well you just need to keep practicing. Try to write programs to solve some 
simple task. 

Remember, learning the syntax is just the first step. You have to practice more 
by doing some exercises. When you are very comfortable with language, then you 
can start a web app project. 

You always learn more by doing stuffs. I assume this is your first programming 
language, so you have to be patient enough to debug your codes.

Yingi Kem

> On 17 Jul 2017, at 7:22 PM, Adil Balti  wrote:
> 
> Hello all. 
> I am a beginner in Python .Just started to learn Python .Using Python 3.6 .
> Practicing variables, strings , etc .
> Any suggestion from you seniors would be appreciated .
> Thnx in advance
> (sorry for my bad Eng grammer)
> -- 
> 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/ac4767f9-80e1-488c-be47-38e407e2368f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/60A0F316-758B-413E-ABED-CCDF79CC4DCA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django beginner

2017-07-13 Thread yingi keme
Try getting the book 'django unleashed'. It is one of the most comprehensive 
books for absolute beginners in django.

Also learn http basics, it will be valuable to understand the client/server 
model of django.

Yingi Kem

> On 14 Jul 2017, at 12:48 AM, Amir Pirmoradian  
> wrote:
> 
> Hey Guys, i'm a absolute beginner  at Django. I started to learn django from 
> https://www.djangoproject.com but it's too confusing.
> I know python completely.
> My question is:Should i know anything else except python to learn 
> Django?because i don't understand Django at all.Or i should try harder?
> -- 
> 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/1d33e1c7-42fb-414d-b8d7-b6441a6d0cfc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/ADC9787D-0B56-4011-9E0C-65379BD3CC66%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to Contribute to the Django?

2017-07-12 Thread yingi keme
You can contribute by helping to solve problems of others. Its just a matter of 
some few hours or even minutes before you start recieving mails from people 
stuck with a particular code. Ofcourse that is if you set your forum account to 
be recieving mails.

You can also ask python questions and submit codes of topics you dont 
understand, and you will always get a generous person to help you solve it.

Yingi Kem

> On 12 Jul 2017, at 8:25 AM, Kaustubh Vats  wrote:
> 
> Hi all, I am new to this organisation and I want to contribute. Can anybody 
> please tell me how to get started. I have the following skills HTML, CSS, 
> JS,Python and I have some experience of working with Django.
> -- 
> 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/d0808d75-b372-4e8d-9d49-05bcc755%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/DC8B2994-7B4C-4554-8B80-E87BB0CF379D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Defining project apps

2017-07-11 Thread yingi keme
I dont think you will have any app conflicts if you give them names applying to 
the content of the app or any other name that suites you best. 
Yes Ofcourse you should avoid name conflicts as regards to naming the apps 
within the project. But on the purpose of github, maybe you should be concerned 
about project names.

Yingi Kem

> On 11 Jul 2017, at 7:54 PM, Rich Shepard  wrote:
> 
>  My background is database applications, not web site, development so I
> have started my first django-1.11.3 project by defining the database schema
> and defining the classes in models.py. Now I want to define the app based on
> this file and am not sure how to name it.
> 
>  This project is for my own use, a client relation management application
> (which will go to github when done). I want to avoid name conflicts with app
> names so my first inclination is to define one app as data and another as
> reports.
> 
>  Please suggest appropriate app names if these would be problematic.
> 
> Rich

-- 
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/340C57A0-E893-490A-9B53-E3165284D945%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django channels for single user

2017-07-05 Thread yingi keme
Okk. I have tried it. What happens is that
When it starts the HANDSHAKING, it DISCONNECTS. So the websocket doesnt connect.

Any reason why that is happening.?

Yingi Kem

> On 5 Jul 2017, at 3:30 PM, Andrew Godwin <and...@aeracode.org> wrote:
> 
> Yes, you should create a group per user. That way users with more than one 
> tab open will get data sent to all tabs too.
> 
> Andrew
> 
>> On Wed, Jul 5, 2017 at 6:42 AM, yingi keme <yingik...@gmail.com> wrote:
>> How will you create a web socket for a single user such that another program 
>> can send a json data to thesame specific user open channel. What i normally 
>> see is:
>> 
>> Html script:
>> 
>> var mysocket = new WebSocket('ws://' + window.location.host + '/users/');
>> 
>> routing.py:
>> 
>> channel_routing = [route("websocket.connect", ws_connect),
>> ...
>> 
>> And finally you consumers.py:
>> 
>> def ws_connect(message):
>> Group('users').add(message.reply_channel)
>> 
>> This is quite the norm for adding a new client to open connection list. But 
>> what if you want to send data to a specific client and you dont want to use:
>> 
>>Group('users').send(json_data). As this sends to all clients on the group.
>> 
>> Do you have to create a Group for a every user?
>> 
>> Please i am stuck on this.
>> 
>> --
>> 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/269c3144-280e-4e65-8ab2-38a208e08dd2%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAFwN1uphRg5mLJBL48N%3DDV%3D6ryh9-du69ng90ofnGSj94803-A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/1D041694-AC47-40EE-AB04-00931DB1F4D3%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django channels for single user

2017-07-05 Thread yingi keme
So how do you create a group for a single user? What is the syntax like?

If you have a site that opens a connection for every user. What is going to be 
the argument for:

Group(argument).add(message.reply_channel)

Yingi Kem

> On 5 Jul 2017, at 3:30 PM, Andrew Godwin <and...@aeracode.org> wrote:
> 
> Yes, you should create a group per user. That way users with more than one 
> tab open will get data sent to all tabs too.
> 
> Andrew
> 
>> On Wed, Jul 5, 2017 at 6:42 AM, yingi keme <yingik...@gmail.com> wrote:
>> How will you create a web socket for a single user such that another program 
>> can send a json data to thesame specific user open channel. What i normally 
>> see is:
>> 
>> Html script:
>> 
>> var mysocket = new WebSocket('ws://' + window.location.host + '/users/');
>> 
>> routing.py:
>> 
>> channel_routing = [route("websocket.connect", ws_connect),
>> ...
>> 
>> And finally you consumers.py:
>> 
>> def ws_connect(message):
>> Group('users').add(message.reply_channel)
>> 
>> This is quite the norm for adding a new client to open connection list. But 
>> what if you want to send data to a specific client and you dont want to use:
>> 
>>Group('users').send(json_data). As this sends to all clients on the group.
>> 
>> Do you have to create a Group for a every user?
>> 
>> Please i am stuck on this.
>> 
>> --
>> 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/269c3144-280e-4e65-8ab2-38a208e08dd2%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAFwN1uphRg5mLJBL48N%3DDV%3D6ryh9-du69ng90ofnGSj94803-A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/FB1C4E26-E699-4A9A-AA5D-5E183524495B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django channels for single user

2017-07-05 Thread yingi keme
How will you create a web socket for a single user such that another program 
can send a json data to thesame specific user open channel. What i normally see 
is:

Html script:

var mysocket = new WebSocket('ws://' + window.location.host + '/users/');

routing.py:

channel_routing = [route("websocket.connect", ws_connect),
...

And finally you consumers.py:

def ws_connect(message):
Group('users').add(message.reply_channel)

This is quite the norm for adding a new client to open connection list. But 
what if you want to send data to a specific client and you dont want to use:

   Group('users').send(json_data). As this sends to all clients on the group.

Do you have to create a Group for a every user?

Please i am stuck on this.

-- 
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/269c3144-280e-4e65-8ab2-38a208e08dd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-tables2 and javascript

2017-07-05 Thread yingi keme
Thanks James.

Yingi Kem

> On 4 Jul 2017, at 11:55 PM, James Schneider <jrschneide...@gmail.com> wrote:
> 
> 
> 
> On Jul 4, 2017 1:31 PM, "yingi keme" <yingik...@gmail.com> wrote:
> I want to know. How do you access a table generated by django-tables2 in your 
> client side using javascript?
> 
> Does django-tables2 provide a mechanism to access table contents via client 
> side.? A traditional html  tags do have an id or a classname for 
> access purpose. How will you do such with a django generated table.?
> 
> You can add an HTML class or id to the  tag by specifying it in your 
> python Table class:
> 
> http://django-tables2.readthedocs.io/en/latest/pages/custom-rendering.html#css
> 
> Once that is done, you can identify the table in the DOM with JS and perform 
> whatever manipulations you need.
> 
> To answer your question specifically, Django-tables2 is strictly server-side, 
> so there is no direct connection between it and your JS (which is only 
> client-side).
> 
> -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+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/CA%2Be%2BciWSDDUT%3Dj_hTsbFtQ6H4A30rGVPMLs3SLA%2BzcRcAAgWOw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/6E0E719D-6DA8-478A-A91C-B76DC3DF694F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-tables2 and javascript

2017-07-05 Thread yingi keme
Thanks...

Yingi Kem

> On 4 Jul 2017, at 9:45 PM, Владислав Котвицкий <photocriti...@gmail.com> 
> wrote:
> 
> Sorry, i dont know django-tables2, but i try use DOJO framework DataGrid and 
> this framework have all mechanism
> 
> вторник, 4 июля 2017 г., 23:31:04 UTC+3 пользователь yingi keme написал:
>> 
>> I want to know. How do you access a table generated by django-tables2 in 
>> your client side using javascript?
>> Does django-tables2 provide a mechanism to access table contents via client 
>> side.? A traditional html  tags do have an id or a classname for 
>> access purpose. How will you do such with a django generated table.?
>> 
> 
> -- 
> 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/07acaf2e-8822-44fb-8cf2-83d8ad2ca9c7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/DD9DD130-07F0-4B15-88C4-3DD6E4514601%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


django-tables2 and javascript

2017-07-04 Thread yingi keme
I want to know. How do you access a table generated by django-tables2 in your 
client side using javascript?

Does django-tables2 provide a mechanism to access table contents via client 
side.? A traditional html  tags do have an id or a classname for access 
purpose. How will you do such with a django generated table.?

-- 
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/d23b7d9c-282a-43e7-82bb-e0bb46e0c5ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Want to create a website like about.me

2017-07-03 Thread yingi keme
If your site is gonna be dynamic. Sure, django provides tools to create high 
level web application. 
But if your site is going to be static, i think you should just stick with 
html/css


Yingi Kem

> On 3 Jul 2017, at 9:02 PM, Jagjeet Ubhi  wrote:
> 
> Hello!
> I am new to Django. I would like to create a website like http://about.me
> Is Django a right framework for such websites? 
> Please let me know from where should I start. Can someone gives the 
> procedures to 
> achieve this talk? 
> Thank you.
> 
> --
> Jagjeet Singh
> https://github.com/iamjagjeetubhi
> -- 
> 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/cfe1c721-fe5c-4fe5-bace-59c8bc4f2245%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/249B2DD1-E7C9-4CD5-A1E2-44B8452C4082%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django signals **kwargs

2017-06-27 Thread yingi keme
Okkk..


Thanks Vijay..

Yingi Kem

> On 27 Jun 2017, at 9:53 PM, Vijay Khemlani <vkhem...@gmail.com> wrote:
> 
> Same link
> 
> https://docs.djangoproject.com/en/1.11/ref/signals/#post-save
> 
> post_save¶
> 
> django.db.models.signals.post_save¶
> Like pre_save, but sent at the end of the save() method.
> 
> Arguments sent with this signal:
> 
> sender
> The model class.
> instance
> The actual instance being saved.
> created
> A boolean; True if a new record was created.
> raw
> A boolean; True if the model is saved exactly as presented (i.e. when loading 
> a fixture). One should not query/modify other records in the database as the 
> database might not be in a consistent state yet.
> using
> The database alias being used.
> update_fields
> The set of fields to update as passed to Model.save(), or None if 
> update_fieldswasn’t passed to save().
> 
>> On Tue, Jun 27, 2017 at 4:48 PM, yingi keme <yingik...@gmail.com> wrote:
>> Okk.
>> 
>> But what i am actually asking is, what type of contents does the **kwargs. 
>> Give me a typical example of **kwargs in the context of signals. The actual 
>> data **kwargs may contain.
>> 
>> Yingi Kem
>> 
>>> On 27 Jun 2017, at 9:24 PM, Vijay Khemlani <vkhem...@gmail.com> wrote:
>>> 
>>> https://docs.djangoproject.com/en/1.11/topics/signals/#receiver-functions
>>> 
>>> We’ll look at senders a bit later, but right now look at the **kwargs 
>>> argument. All signals send keyword arguments, and may change those keyword 
>>> arguments at any time. In the case of request_finished, it’s documented as 
>>> sending no arguments, which means we might be tempted to write our signal 
>>> handling as my_callback(sender).
>>> 
>>> This would be wrong – in fact, Django will throw an error if you do so. 
>>> That’s because at any point arguments could get added to the signal and 
>>> your receiver must be able to handle those new arguments.
>>> 
>>> 
>>>> On Tue, Jun 27, 2017 at 4:14 PM, yingi keme <yingik...@gmail.com> wrote:
>>>> So i want to know, when using a model signals. The reciever function has 
>>>> **kwargs. What is the content of **kwargs in this reciever function below:
>>>> 
>>>> @reciever(post_save, sender=MyModel)
>>>> def func(sender, instance, **kwargs):
>>>> # some action.
>>>> 
>>>> --
>>>> 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/504e60a9-9ef7-4dc6-a1a8-ab734f250455%40googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> -- 
>>> 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/CALn3ei0kP77zFO_WDPDptZPg7GWOdkyZwtN6sJ9W07d9ruZicg%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> 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/C07282C1-3DFC-4787-9F52-9C12B07A0AE3%40gmail.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this g

Re: Django signals **kwargs

2017-06-27 Thread yingi keme
Okk.

But what i am actually asking is, what type of contents does the **kwargs. Give 
me a typical example of **kwargs in the context of signals. The actual data 
**kwargs may contain.

Yingi Kem

> On 27 Jun 2017, at 9:24 PM, Vijay Khemlani <vkhem...@gmail.com> wrote:
> 
> https://docs.djangoproject.com/en/1.11/topics/signals/#receiver-functions
> 
> We’ll look at senders a bit later, but right now look at the **kwargs 
> argument. All signals send keyword arguments, and may change those keyword 
> arguments at any time. In the case of request_finished, it’s documented as 
> sending no arguments, which means we might be tempted to write our signal 
> handling as my_callback(sender).
> 
> This would be wrong – in fact, Django will throw an error if you do so. 
> That’s because at any point arguments could get added to the signal and your 
> receiver must be able to handle those new arguments.
> 
> 
>> On Tue, Jun 27, 2017 at 4:14 PM, yingi keme <yingik...@gmail.com> wrote:
>> So i want to know, when using a model signals. The reciever function has 
>> **kwargs. What is the content of **kwargs in this reciever function below:
>> 
>> @reciever(post_save, sender=MyModel)
>> def func(sender, instance, **kwargs):
>> # some action.
>> 
>> --
>> 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/504e60a9-9ef7-4dc6-a1a8-ab734f250455%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CALn3ei0kP77zFO_WDPDptZPg7GWOdkyZwtN6sJ9W07d9ruZicg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/C07282C1-3DFC-4787-9F52-9C12B07A0AE3%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django signals **kwargs

2017-06-27 Thread yingi keme
So i want to know, when using a model signals. The reciever function has 
**kwargs. What is the content of **kwargs in this reciever function below:

@reciever(post_save, sender=MyModel)
def func(sender, instance, **kwargs):
# some action.

-- 
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/504e60a9-9ef7-4dc6-a1a8-ab734f250455%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: can somebody help me understand django framework please

2017-06-23 Thread yingi keme
Do you have a strong knowledge of python? Have you used any other web 
development framework before?

Let me know your programming background.

Yingi Kem

> On 23 Jun 2017, at 1:51 PM, Daniel Jacob 
>  wrote:
> 
> I am new to django and i want some form of tutorial
> -- 
> 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/ba4fbd0c-1579-41aa-afed-2146b296f56d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/BF8D00EC-CFED-47A6-9427-0786A9B86F33%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django website

2017-06-20 Thread yingi keme
Is your project residing in django? Or you are using a different web framework?

Yingi Kem

> On 20 Jun 2017, at 7:24 PM, MigDotCom  wrote:
> 
> I want to use python and django to make a news-feed for my website I have 
> searched about it but i still don't even have clue where to start:
> 1. Do i make it as a new app in my django site?
> 2. Where can i get this info or go back as reference ?
> 3. do i need any prerequisites before hand?(i.e: setting up a database and 
> such)
> 
> 
> -- 
> 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/78227722-5587-482f-af44-a47cd14d2210%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/C28A74ED-4116-4AC8-9937-D5BB66E6DA7C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to combine views in one template

2017-06-16 Thread yingi keme
def builddetails(request, id):
build = Build.objects.get(pk=id)
Obj = BuildForm(request.POST)
Obj.save()
return render(request, .)




> On 16 Jun 2017, at 12:03 AM, Mark Alan Jones  wrote:
> 
> Hello Django Community,
> 
> I am new to Django and tackling my first app outside of the tutorial. The app 
> I'm working on is a simple ticket system for build requests at my IT Company. 
> I only have one model 'Build', and I have checkboxes that denote how far the 
> build has been done. 
> 
> I have a page that shows all build requests, and then a separate page with 
> the details of each build request. I want to add a form to this builddetails 
> template, but I'm not sure what is the correct way to do this when the 
> template is already pulling info from the model. Every tutorial I've followed 
> has shown using a form under a separate URL, but that is not viable.
> 
> my current view for builddetails is this:
> 
> def builddetails(request, id):
> build = Build.objects.get(pk=id);
> return render(request, 'app/builddetails.html', { 'build': build });
> 
> How do I combine this with a ModelForm on the same page? 
> 
> the ModelForm I was trying to use looks like this:
> 
> class BuildForm(forms.ModelForm):
> class Meta:
> model = Build,
> fields = ['notes', 'build_engineer', 'latest_bios','bios_settings', 
> 'hot_keys_tested', 'office_activated']
> 
> If I need to provide any more information please let me know, and thank you 
> so much in advance for any help you can offer. 
> 
> -- 
> 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/733168e2-2559-4726-9067-dc2a23397bb7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/A194F7C1-2840-4090-BF25-ECD003805839%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed building wheels for twisted

2017-06-16 Thread yingi keme
I really dont know how to post it.

> Okk,
> 
> So what i had to do is, download the Twisted .whl file from this link:
> 
> http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
> 
> You have to choose which is compatible with your python version. Mine is 
> python 3.5 and win32. So make sure you choose the correct .whl file
> Then you can install the .whl file you just downloaded in your virtual 
> environment. 
> 
> ..\MyVenv> pip install 
> C:\Users\Documents\Twisted-17.5.0-cp35-cp35-cp35m-win32.whl
> 
> After installing Twisted, then you can now go on ahead and install channels 
> in your virtual environment
> 
> ..\MyVenv> pip install channels.
> 
> Thats all.



> On 15 Jun 2017, at 11:07 AM, Oladipupo Elegbede 
> <dipo.elegb...@dipoelegbede.com> wrote:
> 
> Do you want to share what you did to resolve it?
> 
> That may help someone else.
> 
> Thanks.
> 
> On Jun 14, 2017 5:07 PM, "yingi keme" <yingik...@gmail.com> wrote:
> I have solved the problem. Thanks anyways..!
> 
> Yingi Kem
> 
> > On 14 Jun 2017, at 6:43 PM, yingi keme <yingik...@gmail.com> wrote:
> >
> > Hello
> >
> > I tried installing django channels on my virtual environment. But it has 
> > failed. And it gives the following error 'failed building wheel for 
> > twisted'.
> >
> > What is this about.? And how can i handle this issue?
> >
> > --
> > 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/95e49887-8f39-4a53-8e8c-73b216a4c43a%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> --
> 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/1C2C6D76-E535-461B-853E-36623A7942CB%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAHjgLX4dki5woio85Fh5GTiicMFZEcoKxFDAByVAAPm7wtcYrw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/A01E5BB2-EEB7-4598-8223-384561AAE567%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Integration of Django with other python codes

2017-06-15 Thread yingi keme
You have to study django tutorials.

Ok for a simple task like this. After you have successfully created your app in 
your project, all you need is to configure your url so it can point the 
views.py.

The views.py file will have a function like this

def myInput(request, input):
  return render(...)

It is this function in your views.py that will be called when you hit enter. So 
you can do whatever you wish with your input inside this function.

Take note. This is just a sketch of how django calls python functions to handle 
request, forms etc.

Yingi Kem

> On 15 Jun 2017, at 12:10 PM, sunitha.b...@algonox.com wrote:
> 
> Hi guys,
>  Im a newbee to Django.. Actually I was trying to integrate my python code to 
> Django web application.. 
> For example.. Im having a python code in which if i enter any input it will 
> generate an output.. 
>In web application I have one input box, button and 
> text area.. When I enter any text(hello) inside the textbox and hit enter 
> means then it should call my python code and pass the text(hello) as an input 
> argument to the code and pass the output(Welcome) to be passed to the 
> textarea of the web app.
>  
> 
> If anyone knows help me to solve this!!
> -- 
> 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/6316cf1b-91b9-4a64-9152-f6df0e21ba66%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CDFF6644-48AF-4DC5-AEEA-3EEF755EE95C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed building wheels for twisted

2017-06-14 Thread yingi keme
I have solved the problem. Thanks anyways..!

Yingi Kem

> On 14 Jun 2017, at 6:43 PM, yingi keme <yingik...@gmail.com> wrote:
> 
> Hello
> 
> I tried installing django channels on my virtual environment. But it has 
> failed. And it gives the following error 'failed building wheel for twisted'.
> 
> What is this about.? And how can i handle this issue?
> 
> -- 
> 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/95e49887-8f39-4a53-8e8c-73b216a4c43a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/1C2C6D76-E535-461B-853E-36623A7942CB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Failed building wheels for twisted

2017-06-14 Thread yingi keme
Hello

I tried installing django channels on my virtual environment. But it has 
failed. And it gives the following error 'failed building wheel for twisted'.

What is this about.? And how can i handle this issue?

-- 
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/95e49887-8f39-4a53-8e8c-73b216a4c43a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread yingi keme
I dont particularly understand how you wish to be updated and know when a 
record is added or removed. 

Nevertheless, you can make use of django signals (Thanks to melvyn). It will be 
of great help.

Yingi Kem

> On 13 Jun 2017, at 12:54 PM, Stodge  wrote:
> 
> I have a model with a many to many relationship. I need to know when a record 
> is added to or removed from the many to many.
> 
> Is this possible? 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 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/f38aaf2b-fda8-49ff-86db-bfc1a25b1ac1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/ECB76784-23D3-477A-BD7F-7DEB8C7545AD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Virtual Environment

2017-06-12 Thread yingi keme
Okk.

But then when i create a new virtual environment, and i try to install a 
seperate django. It says the django package already exist. Is it that i have to 
install another version of django?

Yingi Kem

> On 12 Jun 2017, at 2:22 PM, Russell Keith-Magee <russ...@keith-magee.com> 
> wrote:
> 
> Hi Yingi,
> 
> Once you create a virtual environment, it is an isolated sandbox. It doesn’t 
> have access to the world outside that sandbox. That includes Django - your 
> virtual environment will need to have Django installed separately, even if 
> your “main” Python 3.5 install already has Django installed.
> 
> Yours,
> Russ Magee %-)
> 
>> On 12 Jun 2017, 9:10 PM +0800, yingi keme <yingik...@gmail.com>, wrote:
>> Hello
>> 
>> I have this issue i am trying to resolve. I installed django directly into 
>> my Python35 directory without creating a new virtual environment for my 
>> project.
>> 
>> However, now i want to create a new virtual environment for a new project. 
>> If i make some modifications in django inside this new virtual environment, 
>> will it not affect my previous project.? Do i need to install a new django 
>> entirely?
>> 
>> --
>> 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/857441fd-c46f-48b1-818e-13380d4c0072%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/330dd057-0b22-4cad-83ba-25837e8f52a7%40Spark.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/C99A432F-BF49-4885-9647-3B97473A7FFC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: new to django

2017-06-12 Thread yingi keme
I recommend you buy the book 'django unleashed'. It is highly recommended for 
beginners. Some sites will help you, but not nearly as close to the book 
'Django Unleashed'

And hope you are proficient in python programming language? If not, i suggest 
you learn python first before diving into django

Yingi Kem

> On 12 Jun 2017, at 4:49 AM, jlew921  wrote:
> 
> hi guys new to django...and directions pls???
> -- 
> 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/70091a5d-6cc8-4ee8-9784-8ec762ec0c1a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/E68C8451-D9E9-49BA-8AB7-24623940EA6B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Virtual Environment

2017-06-12 Thread yingi keme
Hello

I have this issue i am trying to resolve. I installed django directly into my 
Python35 directory without creating a new virtual environment for my project.

 However, now i want to create a new virtual environment for a new project. If 
i make some modifications in django inside this new virtual environment, will 
it not affect my previous project.? Do i need to install a new django entirely?

-- 
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/857441fd-c46f-48b1-818e-13380d4c0072%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Real time Notifications

2017-06-11 Thread yingi keme
Thanks melvyn. I think you nailed it for me.

Thanks again

Yingi Kem

> On 11 Jun 2017, at 1:18 PM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote:
> 
> On Sunday 11 June 2017 05:00:19 yingi keme wrote:
> > I want to know if django supports any real time
> > notifications/communications in web applications.
> >
> > For instance, if User A makes an update to its model instance, User B
> > should get an instant notification in real time.
> >
> > Does django provide a mechanism for that?
>  
> Yes and no.
> Django allows you to define signals, one of them being a post_save signal on 
> a Model.
> It has no mechanism to notify "User B", as it does not know how to notify 
> User B.
>  
> But, it has views and urls and browsers have Ajax. So you can poll (not 
> realtime).
>  
> Django Channels (which is a 3rd party package created by one of Django's core 
> developers) supports websockets. Using websockets one can notify in (near) 
> real time.
>  
> So in order to do what you want, you need to glue signals to channels, or 
> teach Django Channels how to detect a change in your model.
> --
> Melvyn Sopacua
> -- 
> 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/1912475.GSAzsYGyPs%40devstation.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/95737D4D-E561-422E-8B41-64A3724A1863%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Real time Notifications

2017-06-11 Thread yingi keme
Thanks Andreas. I will check it out

Yingi Kem

> On 11 Jun 2017, at 1:08 PM, Andréas Kühne <andreas.ku...@hypercode.se> wrote:
> 
> Hi,
> 
> You should check out django-channels 
> (https://channels.readthedocs.io/en/stable/) for that. That is a websocket 
> based solution for doing realtime notifications (as long as the users are 
> logged in to the website).
> 
> Regards,
> 
> Andréas
> 
> 2017-06-11 14:00 GMT+02:00 yingi keme <yingik...@gmail.com>:
>> I want to know if django supports any real time notifications/communications 
>> in web applications.
>> 
>> For instance, if User A makes an update to its model instance, User B should 
>> get an instant notification in real time.
>> 
>> Does django provide a mechanism for that?
>> 
>> --
>> 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/f67beae9-a58b-40ec-8ecf-9181f617b089%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAK4qSCft1DweuZ5DMJqwHKFNUz0Lm_%2BjUaxuX2k6Mm43shVmxA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/B58A8F7B-2BB5-45D7-948C-31441E37D195%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Real time Notifications

2017-06-11 Thread yingi keme
I want to know if django supports any real time notifications/communications in 
web applications.

For instance, if User A makes an update to its model instance, User B should 
get an instant notification in real time.

Does django provide a mechanism for that?

-- 
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/f67beae9-a58b-40ec-8ecf-9181f617b089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Same form saving to related models

2017-06-10 Thread yingi keme
Yea exactly. A many to many relationship is the best approach on this. 

Elorm you should try many to many relationship if you are not completely 
satisfied.

Thanks Melvyn

Yingi Kem

> On 10 Jun 2017, at 3:38 PM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote:
> 
> On Saturday 10 June 2017 13:20:11 yingi keme wrote:
>  
> > The variable for foreign key is supposed to be declared under Student
> > model because parents can typically have more than one kid in a
> > school isnt it?
>  
> And typically, students can have more then one parent. So either rename your 
> Parent model as Parents (plular) to indicate that you use one object to 
> describe two natural persons (and indeed, switch the foreign key) - or - use 
> a ManyToMany as both sides of the relation can be linked to more then one of 
> the other.
>  
> In practice having one object for two Parents isn't ideal, as half of the 
> parents end up in the divorce, so contact details and so on, become a mess 
> again.
>  
> ManyToManyField is the best fit here.
>  
> --
> Melvyn Sopacua
> -- 
> 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/1653535.zO1WQPNAma%40devstation.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/8661C98C-EDBB-4C20-9F7C-A79E2368A5D4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Same form saving to related models

2017-06-10 Thread yingi keme
Well. What you are trying to do is a bit awkward, but i will try my best to 
answer.

The variable for foreign key is supposed to be declared under Student model 
because parents can typically have more than one kid in a school isnt it?
You should try and understand relational database.

Now this is how i will write the code

class Parent(models.Model):
   ...

class Student(models.Model):
 parent = models.ForeignKey(Parent)

Now if you want to save with a form. Remember that when you render a form field 
   which contains some kind of relationship, it appears as a drop-down list in 
your webpage. What i suggest is to do the saving in your views.py instead of 
rendering the relational form field. 

So u can do it Like this

def Function(request):
Obj = Parents.object.get(name='David')
StudentObj= MyForm({'parent' : Obj})
StudentObj.save()

Remember the function above is just an assumed prototype of how your function 
should be and not the actual code.

Yingi Kem

> On 9 Jun 2017, at 5:43 AM, Elorm Koku  wrote:
> 
> Hi guys,
> I need a means to save these 2 models related by FK but I want to use one 
> form. I searched but I jus can't do it.
> 
> class Student(models.Model):
> ...
> 
> class Parent(models.Model):
> 
> child = models.ForeignKey(Student)
> 
> 
> All I need is a form I can use to every student and their parent 
> simultaneously.
> Am I doing this wrong? If so kindly correct me.
> 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 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/CAG%2BabP8sVSiKpfkeWtkBrNCoipT1xE%2BPUUkuDNOgaPNd5zeaDw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CDB0032A-2B58-42D1-8CF6-A300299BDF31%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django: Importing python modules into static webpage

2017-06-06 Thread yingi keme
By static files, i believe you are talking about webpage files. First of all, 
you cant import a module to a static  files. 
What you can do is to use the jinja logic in your webpage files. But then you 
have to create a context that will enable you render python objects to your 
webpages.

I deeply suggest you learn jinja logic. It is typically how you code your html 
files in a logical way. It takes the objects supplied to your context function 
and then perform the operations you want in your webpage. Although it is quite 
limited what u can do with jinja logic.

Jinja logic and rendering your context definitely answers your question.

Yingi Kem

> On 6 Jun 2017, at 7:08 PM, ABHIJIT ROY  wrote:
> 
> 
> 
> I am very new to Django. Recently I was developing a site just for getting 
> aquainted with the framework and I came to a point where I needed to import a 
> python module such as request,pytube etc into a static webpage so that i can 
> use their functions . So two questions arose -
> 
> 1. Is it possible to have python code embedded in static content. 
> 
> 2. How can I import a python module into a static webpage.
> 
> 
> 
> -- 
> 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/4df7680f-b916-410d-b865-ca744e555734%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/D2697610-A6D4-4226-BEDF-479B1652BEE6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: After Django

2017-06-06 Thread yingi keme
You can start your own web application project if you have any start-up idea.

You can also create a web service since you have a good knowledge of the REST 
framework. 
I think its all about what you want to do with your knowledge

Yingi Kem

> On 6 Jun 2017, at 8:54 AM, Karan Tatiwala  wrote:
> 
> Hello,
> 
> I am currently working on Django and REST framework, now I have a pretty good 
> command over Django.
> What should be next thing I should start in this field.
> 
> Can someone please help me out with this.
> -- 
> 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/40e37ca0-81a9-4c07-bdc3-c25e43acdb2e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/D94B8C12-97D3-4316-AFBA-C01320B25740%40gmail.com.
For more options, visit https://groups.google.com/d/optout.