Re: Multiple websocket connection vs single websocket connection when using django channels

2018-04-07 Thread Robin Lery
Yes, I guess that's how to work around per connection for a user. Thank you
for your input!

On Fri, Apr 6, 2018 at 9:49 PM, Ken Whitesell 
wrote:

> Hi Robin,
>
> I can't speak to any generalized situations, or what might be considered
> "best practices" or most optimal.
>
> What I can say is that we have gone with the single websocket connection
> for each client - whether it's a real person at a browser or an
> application. All our communications through the channel are JSON objects,
> and we include a key named "app" in the object which identifies the
> specific "feature" or "application" to which a message is directed. It's
> done in both directions - submissions through the channel from the browsers
> to the server and from the server to the browser all have that key in the
> JSON.
>
> About the most I can say is that it works well for us.
>
> Ken
>
>
> On Friday, April 6, 2018 at 5:10:41 AM UTC-4, Robin Lery wrote:
>>
>> Hi,
>>
>> Suppose an application has features like Chat, Notification and Activity
>> feeds.
>>
>> I would like to know whether its recommended to have different
>>  websocket connection for different  feautues for each user. Meaning for
>> chat purpose a separate socket connection, for notification another
>> separate connection?
>>
>> Or is it better to have only one websocket connection for a user, and
>> work around that single connection for different features?
>>
>> Sincerely,
>> Robin
>>
> --
> 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/0bf0d083-1bb3-4963-905c-9e8bfce6c765%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/CA%2B4-nGqLx9FH9FBAbdVP_EtogctGQZPRKx0PnmETEptW-FJVOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: A first time programmer

2018-04-07 Thread Andréas Kühne
I would also recommend you start with a tutorial.

The django tutorial on the docs page is ok, but the djangogirls tutorial is
pretty extensive - try that and you should get some of your answers at
least : https://tutorial.djangogirls.org/en/

Best regards,

Andréas

2018-04-07 18:19 GMT+02:00 ansh srivastav :

> First check the version of python, then type :django-admin startproject
> projectname.
>
> On 7 Apr 2018 04:03, "Paul Baforh"  wrote:
>
> Please programmers, how do I engage django because i get syntax error i
> type in this code
> - $ django-admin startproject mySite ---
>
> --
> 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/ms
> gid/django-users/8c30cd6f-0745-44cf-a782-3cac82762a75%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/CAHMQ532wOZ6UNdJL%3DZdWncPBDspEt0M%2B-
> U1pkPs173J6_4piBw%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/CAK4qSCcpfTpL1i5K1FCytrFw6AC-HZ%3DG0c5sOLD0dTe43ZOLSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: FOREIGN KEY constraint failed

2018-04-07 Thread Christophe Pettus

> On Apr 7, 2018, at 12:27, DIlIMBEK TURANOV  wrote:
> File "/home/den/HTML_Projects/HTML5/test_project/orders/views.py" in checkout
>   59. order = Order.objects.create(user=user, customer_name=name, 
> customer_phone=phone, status_id=1)

You're most likely creating an Order object that has a foreign key, but that 
foreign key isn't properly set.

--
-- Christophe Pettus
   x...@thebuild.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 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/EC168E4D-4BA0-4A20-BDF6-01333BB96C5B%40thebuild.com.
For more options, visit https://groups.google.com/d/optout.


FOREIGN KEY constraint failed

2018-04-07 Thread DIlIMBEK TURANOV


Environment:Request Method: POSTRequest URL: 
http://127.0.0.1:8000/checkout/Django Version: 2.0.3Python Version: 
3.5.2Installed Applications:['django.contrib.admin', 'django.contrib.auth', 
'django.contrib.contenttypes', 'django.contrib.sessions', 
'django.contrib.messages', 'django.contrib.staticfiles', 'landing', 'products', 
'orders']Installed Middleware:['django.middleware.security.SecurityMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.middleware.clickjacking.XFrameOptionsMiddleware']Traceback:File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/backends/base/base.py"
 in _commit  239. return self.connection.commit()The above 
exception (FOREIGN KEY constraint failed) was the direct cause of the following 
exception:File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/core/handlers/exception.py"
 in inner  35. response = get_response(request)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/core/handlers/base.py"
 in _get_response  128. response = 
self.process_exception_by_middleware(e, request)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/core/handlers/base.py"
 in _get_response  126. response = wrapped_callback(request, 
*callback_args, **callback_kwargs)File 
"/home/den/HTML_Projects/HTML5/test_project/orders/views.py" in checkout  59.   
  order = Order.objects.create(user=user, customer_name=name, 
customer_phone=phone, status_id=1)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/models/manager.py"
 in manager_method  82. return getattr(self.get_queryset(), 
name)(*args, **kwargs)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/models/query.py"
 in create  417. obj.save(force_insert=True, using=self.db)File 
"/home/den/HTML_Projects/HTML5/test_project/orders/models.py" in save  47.  
   super(Order, self).save(*args, **kwargs)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/models/base.py"
 in save  729.force_update=force_update, 
update_fields=update_fields)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/models/base.py"
 in save_base  759. updated = self._save_table(raw, cls, 
force_insert, force_update, using, update_fields)File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/transaction.py"
 in __exit__  212. connection.commit()File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/backends/base/base.py"
 in commit  261. self._commit()File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/backends/base/base.py"
 in _commit  239. return self.connection.commit()File 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/utils.py"
 in __exit__  89. raise dj_exc_value.with_traceback(traceback) 
from exc_valueFile 
"/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/backends/base/base.py"
 in _commit  239. return self.connection.commit()Exception 
Type: IntegrityError at /checkout/Exception Value: FOREIGN KEY constraint failed

-- 
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/3823dd18-7da4-46e5-be63-bfee431b2943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using channels, how to send a notification to single user by model changed trigger event?

2018-04-07 Thread Andrew Godwin
Make a Group per user, and then send to that group. You should treat a user
as a group as they may have multiple windows or tabs open.

Andrew

On Sat, Apr 7, 2018 at 7:02 AM,  wrote:

> This example  showed
> in django project how to use channels package (channel 2).
> But here I can't find out sending data to a single user.
> I'm trying to send notification to user by using channels package.
> If someone know, pls tell 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/4c8a09ba-9632-411c-bc95-fd805c3d0ece%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/CAFwN1urv%3D_5HkNH5BCzop1CqnMTDGqY_2hB86jFNkNe9ZyryaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I'm trying to edit address form for Saleor ecommerce platform

2018-04-07 Thread ruslan.aldar
hello. 
I'm trying to build an local merchant website. So I don't know how to edit 
address form for Saleor. It uses google i18n address form. 
and when i'm trying to delete some fields like company_name, city 
city_area, postal_code, country, country_area, i'm having problem.

on the page : http://localhost:8000/checkout/shipping-address/

i'm getting 
{% with address_form_lines=address_form.i18n_fields_order %} 
this kind of error. 

Making migration doesn't solve the problem and I don't know why it's 
requesting the field which is doesn't exist!  I even tried deleting DB, 
migrating again!

If someone knows it please tell me. 
Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f44cebc-915e-4c08-b394-13efc4ca5c0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using channels, how to send a notification to single user by model changed trigger event?

2018-04-07 Thread mickey102644
This example  showed in 
django project how to use channels package (channel 2).
But here I can't find out sending data to a single user.
I'm trying to send notification to user by using channels package.
If someone know, pls tell 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/4c8a09ba-9632-411c-bc95-fd805c3d0ece%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Verify Emails

2018-04-07 Thread 'Anthony Flury' via Django users

why not use an email validator provided by Django ?

https://docs.djangoproject.com/en/2.0/ref/validators/#emailvalidator

The problem with the pypi module is that to validate that an email 
exists it simply looks for server in DNS (which is slightly better than 
the Django validator), but that doesn't mean that the :


 * Email server will accept emails from you - or your service
 * or that the user exists on that server ( even if the server exists).

The only real way to validate that an email server is entirely valid is 
to send an email to it, asking for a reply. Email parsing will only go 
so far.


In theory there is a defined protocol to allow clients to  query email 
servers for is valid email addresses - but most servers are set to 
ignore those requests - for obvious reasons.



--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury *

On 07/04/18 08:31, Samuel Muiruri wrote:
There's a python package for validating emails exists 
"validate_emails" https://pypi.python.org/pypi/validate_email think it 
would be useful to include it's features inside django so you can 
parse if emails exists before sending so you only send emails to those 
emails that *do *exists and also use it to get back those that don't 
so you can remove them from your list like dummy emails provided to 
your subscription page.


--
Best Regards,
Samuel Muiruri.
Student in Machine Learning & a veteran web developer.

 
	Virus-free. www.avast.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 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/CAJZFZXqyb9LQEmU_DHy1QToA6y1tmq3vwDBq28X%3DLYDxZgdstw%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/b2ad280e-fac2-f95f-d860-194a3046e6c8%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.


Re:how to create Django administration

2018-04-07 Thread PRADEEP SINGH


Sent from RediffmailNG on Android




From: ansh srivastav ansh.srivastav...@gmail.com
Sent: Sat, 7 Apr 2018 21:49:20 GMT+0530
To: django-users@googlegroups.com
Subject: Re: A first time programmer

First check the version of python, then type :django-admin startproject 
projectname.
On 7 Apr 2018 04:03, "Paul Baforh" baforhpau...@gmail.com wrote:Please 
programmers, how do I engage django because i get syntax error i type in this 
code- $ django-admin startproject mySite ---



-- 

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:roups.google.com/group/django-users.

To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8c30cd6f-0745-44cf-a782-3cac82762a75%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/CAHMQ532wOZ6UNdJL=zdwncpbdspet0m+-u1pkps173j6_4p...@mail.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/1523117960.S.15211.26489.f5-224-129.1523118040.26678%40webmail.rediffmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: A first time programmer

2018-04-07 Thread ansh srivastav
First check the version of python, then type :django-admin startproject
projectname.

On 7 Apr 2018 04:03, "Paul Baforh"  wrote:

Please programmers, how do I engage django because i get syntax error i
type in this code
- $ django-admin startproject mySite ---

-- 
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/8c30cd6f-0745-44cf-a782-3cac82762a75%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/CAHMQ532wOZ6UNdJL%3DZdWncPBDspEt0M%2B-U1pkPs173J6_4piBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: A first time programmer

2018-04-07 Thread James Farris
No one can walk you through how to use Django in this group. That is too much 
to explain. 

I recommend choosing a plain text editor like Sublime Text or many others that 
are free in order to start working on any coding project. 

Then once you have that, read the documentation and follow this tutorial 
written by the Django developers. 

https://docs.djangoproject.com/en/2.0/intro/tutorial01/

-- 
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/1f2a4ee9-f435-47a5-810e-c439d4f779d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: new Feature: yay or neigh?

2018-04-07 Thread Jani Tiainen
Hi,

If you want to prove your idea useful write a template tag and try ti get
people to use it.

la 7. huhtikuuta 2018 klo 10.04 Samuel Muiruri 
kirjoitti:

> Hey guys,
> Think this would be a neat feature to add to django.
>
> {% if request.connection %}
> #if there's a connection to the internet returns True, by default
> tries to connect to google
> {% else %}
> #could for example load local js/css files instead of from cdn
> {% endif %}
>
> primarily could be used to check if a site/link you really for service is
> operational before moving forward
>
> {% if request.connection:"http://www.somesite/service; %}
> #load js and present service
> {% else %}
> Sorry the service seems to be unavailable for now, please try again
> later.
> {% endif %}
>
>
> --
>
> Best Regards,
>
> Samuel Muiruri.
>
> Student in Machine Learning & a veteran web developer.
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_3794760325429669718_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> 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/CAJZFZXpYyXd4gdEPFrS9FS3ngHR%3D0fHg1imxBGBN5tOxj_PM5w%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/CAHn91ocZXPVWaAExw4w-csr4xy1-ncBZEpej%2Bacb%3DtsGij7hFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: new Feature: yay or neigh?

2018-04-07 Thread Julio Biason
My 2 cents:

1.  Django )and it's template system) runs on server. When I'll the serve not 
have a connection? If the sever doesn't have a connection, it will not sis 
anyway.

2.  What you want is probably develop a PWA with offline support. This is kinda 
built in in most browse using webworkers.

Get Outlook for iOS

From: django-users@googlegroups.com  on behalf 
of Melvyn Sopacua 
Sent: Saturday, April 7, 2018 12:46:45 AM
To: django-users@googlegroups.com
Subject: Re: new Feature: yay or neigh?

On zaterdag 7 april 2018 09:02:52 CEST Samuel Muiruri wrote:
> Hey guys,
> Think this would be a neat feature to add to django.
>
> {% if request.connection %}
> #if there's a connection to the internet returns True, by default tries
> to connect to google
> {% else %}
> #could for example load local js/css files instead of from cdn
> {% endif %}

Neigh. Think about what you're proposing here:

> {% if request.connection:"http://www.somesite/service; %}

So on the incoming browser request object you instantiate a connection from
your server to some site. This by no means ensures that the browser can
connect to that service.
There's also no way to "tell the browser to check availability to that site",
because once the request object is created in Django the browser has already
sent the request - it's not two-way communication.

This should be handled in javascript and Django cannot do anything for you
here as it's not part of the problem.
--
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/3237607.4kOfbIVUhA%40fritzbook.
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/DM5PR18MB14199C9664AB49D01335B563AEB90%40DM5PR18MB1419.namprd18.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using other schema in PostgeSQL

2018-04-07 Thread john fabiani`

https://stackoverflow.com/questions/1160598/how-to-use-schemas-in-django?utm_medium=organic_source=google_rich_qa_campaign=google_rich_qa

Johnf


On 04/06/2018 05:28 PM, Michel Vega Fuenzalida wrote:

Hello people,

I'm using PostgeSQL not using the public schema but a different one named: 
'correo', I need to tell Django to use the that schema (I have deleted the 
public schema)

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/c910cb9e-d28b-f418-08d2-6bd4c6ed374f%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: A first time programmer

2018-04-07 Thread Sherine Tresa
i am a first time user.and i don't know how to open and type code in it.
the error corrected when i typed the pip install statement in commandprompt
outside.
i need to know how to start using django?

On Sat, Apr 7, 2018 at 9:57 AM, James Farris  wrote:

> Hi,
>
> If you type this in your terminal, you should see Django==2.0.4 (or some
> other version)
>
> $ pip freeze
>
> If not, Django is not installed.
>
> Also, what is the syntax error you are receiving?
>
> On Friday, April 6, 2018 at 10:33:39 PM UTC, Paul Baforh wrote:
>>
>> Please programmers, how do I engage django because i get syntax error i
>> type in this code
>> - $ django-admin startproject mySite ---
>>
> --
> 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/732d0a71-22bc-4983-b335-09de5554c518%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/CAMCh2vbDX2-iPCnt8c_Y6C7nWzgOE9W0KvY%2BrD7MKAKTq5G%3D%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Verify Emails

2018-04-07 Thread Jani Tiainen
Hi,

Nothing prevents you to create django validator that does use that package.

Including functionality that package provides would add more dependencies
to Django (pyDNS) which greatly reduces chances to get existence
verification into Django itself.

And Django already has email validator built-in.

la 7. huhtikuuta 2018 klo 10.32 Samuel Muiruri 
kirjoitti:

> There's a python package for validating emails exists "validate_emails"
> https://pypi.python.org/pypi/validate_email think it would be useful to
> include it's features inside django so you can parse if emails exists
> before sending so you only send emails to those emails that *do *exists
> and also use it to get back those that don't so you can remove them from
> your list like dummy emails provided to your subscription page.
>
> --
>
> Best Regards,
>
> Samuel Muiruri.
>
> Student in Machine Learning & a veteran web developer.
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_-8150656898444985068_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> 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/CAJZFZXqyb9LQEmU_DHy1QToA6y1tmq3vwDBq28X%3DLYDxZgdstw%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/CAHn91ofF6LFO-vR-_kvfF_%2Bk8Rvmig4h1B8b4MSr9qetRROVyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: new Feature: yay or neigh?

2018-04-07 Thread Melvyn Sopacua
On zaterdag 7 april 2018 09:02:52 CEST Samuel Muiruri wrote:
> Hey guys,
> Think this would be a neat feature to add to django.
> 
> {% if request.connection %}
> #if there's a connection to the internet returns True, by default tries
> to connect to google
> {% else %}
> #could for example load local js/css files instead of from cdn
> {% endif %}

Neigh. Think about what you're proposing here:

> {% if request.connection:"http://www.somesite/service; %}

So on the incoming browser request object you instantiate a connection from 
your server to some site. This by no means ensures that the browser can 
connect to that service.
There's also no way to "tell the browser to check availability to that site", 
because once the request object is created in Django the browser has already 
sent the request - it's not two-way communication.

This should be handled in javascript and Django cannot do anything for you 
here as it's not part of the problem.
-- 
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/3237607.4kOfbIVUhA%40fritzbook.
For more options, visit https://groups.google.com/d/optout.


Verify Emails

2018-04-07 Thread Samuel Muiruri
There's a python package for validating emails exists "validate_emails"
https://pypi.python.org/pypi/validate_email think it would be useful to
include it's features inside django so you can parse if emails exists
before sending so you only send emails to those emails that *do *exists and
also use it to get back those that don't so you can remove them from your
list like dummy emails provided to your subscription page.

-- 

Best Regards,

Samuel Muiruri.

Student in Machine Learning & a veteran web developer.



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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/CAJZFZXqyb9LQEmU_DHy1QToA6y1tmq3vwDBq28X%3DLYDxZgdstw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


new Feature: yay or neigh?

2018-04-07 Thread Samuel Muiruri
Hey guys,
Think this would be a neat feature to add to django.

{% if request.connection %}
#if there's a connection to the internet returns True, by default tries
to connect to google
{% else %}
#could for example load local js/css files instead of from cdn
{% endif %}

primarily could be used to check if a site/link you really for service is
operational before moving forward

{% if request.connection:"http://www.somesite/service; %}
#load js and present service
{% else %}
Sorry the service seems to be unavailable for now, please try again
later.
{% endif %}


-- 

Best Regards,

Samuel Muiruri.

Student in Machine Learning & a veteran web developer.



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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/CAJZFZXpYyXd4gdEPFrS9FS3ngHR%3D0fHg1imxBGBN5tOxj_PM5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to use Graphviz/Networkx in django?

2018-04-07 Thread Jani Tiainen
Hi,

You could take a look at django-extensions how it generates graphs from
models as an inspiration.

pe 6. huhtikuuta 2018 klo 21.17  kirjoitti:

> Thanks a lot for your help!
> But since the data that needed to be visualized is already shown in the
> page, generate input file is actually not necessary. In that case, what
> should I do to make django aware that the data shown in the page is the
> 'input' how can I call the tool to process the visualization?
> I am sorry to ask the stupid question.I am new to django and I am
> really hope you could help me!
> Thanks
>
> 在 2018年4月6日星期五 UTC+2下午7:39:43,Jani Tiainen写道:
>>
>> Hi,
>>
>> It's relatively simple. Just generate proper input file for graphwiz or
>> networkx to consume call that tool for input file and create output file.
>> Then render output file via view to your page.
>>
>>
>> pe 6. huhtikuuta 2018 klo 18.31  kirjoitti:
>>
>>> Hi, thank you for your help.
>>> But I think this link cannot really solve my problem. My question is
>>> actually how to visualize the data of my model, rather than visualize the
>>> model.
>>>
>>>
>>> 
>>> The situation is, As you can see, the Formula detail table include the
>>> reactants that participates in the reaction, now I want to add a function
>>> to this page, like add a button at the right side. And when I click on the
>>> button, a graph could be generated automatically. The graph should looks
>>> like '10fthf5glu_m(in a circle) -> 10fthf5glu_c(in a circle)' I know this
>>> function should be done by using Graphviz and Networkx, but how?
>>>
>>> 在 2018年4月6日星期五 UTC+2上午10:04:31,Christian Ledermann写道:

 https://django-extensions.readthedocs.io/en/latest/graph_models.html

 On 5 April 2018 at 19:10,   wrote:
 > Hi everyone,
 > If I have three models and I successfully displayed the data using
 templates
 > and views, how can I use graphviz or networkx to draw graph using the
 data
 > that I displayed?
 >
 > --
 > 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/0dc4b526-9643-4096-9726-6277c807b33b%40googlegroups.com.

 > For more options, visit https://groups.google.com/d/optout.



 --
 Best Regards,

 Christian Ledermann

 Newark-on-Trent - UK
 Mobile : +44 7474997517

 https://uk.linkedin.com/in/christianledermann
 https://github.com/cleder/


 <*)))>{

 If you save the living environment, the biodiversity that we have left,
 you will also automatically save the physical environment, too. But If
 you only save the physical environment, you will ultimately lose both.

 1) Don’t drive species to extinction

 2) Don’t destroy a habitat that species rely on.

 3) Don’t change the climate in ways that will result in the above.

 }<(((*>

>>> --
>>> 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/48cff3a7-d877-424b-9492-f4d4d34daffe%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/c13afc96-5de3-40b1-bc0f-0184b5928b52%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message 

Re: Using other schema in PostgeSQL

2018-04-07 Thread Jani Tiainen
You can give search path in database options which IMO is cleanest option
you can have now.

See
https://stackoverflow.com/questions/31726064/how-to-connect-to-multiple-postgresql-schemas-from-django

For example how to do that.

la 7. huhtikuuta 2018 klo 4.15 Michel Vega Fuenzalida 
kirjoitti:

> Hello people,
>
> I'm using PostgeSQL not using the public schema but a different one named:
> 'correo', I need to tell Django to use the that schema (I have deleted the
> public schema)
>
> Thanks
> --
> Michel Vega Fuenzalida
> Usuario Linux: 323650
>
> --
> 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/DDE1CD0F-2A03-467A-81EF-6E6AC958017F%40nauta.cu
> .
> 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/CAHn91oeWQwNk41XyDvDm%2BvE8R5cK4tcTVWnJLo%2Bv4CjY1RL0FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.