Re: BooleanField ignored by makemigrations Django 2.0

2018-02-13 Thread Andy
Your app is most likely not listed in installed_apps when makemigrations is 
not picking up anything.
Or its just because you named it model.py instead of models.py?
Is any other model of that app picked up by makemigrations?


Am Donnerstag, 8. Februar 2018 23:28:19 UTC+1 schrieb Gary Mumford:
>
> Hi,
> I have just installed Django 2.0 and Python 3.6.3. I am not a noobie, but 
> it has been a while since I djangoed.
>
> I have several fields in a model.py which are BooleanField type.
>
> When running makemigrations.py, these fields are being ignored and not 
> being generated into the migrations code or the migrations db. 
>
> Also, any changes are not being tracked and so my migrations are getting 
> hopelessly screwed.
>
> To see if anything made sense - I ran an inspectdb on an existing mySQL db 
> and found that even though this utility recognised the tinyInt being on the 
> db - even after changing the field type to BooleanField - no changes were 
> detected during makemigrations.
>
> Has anyone seen this before and know how to work around it 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/32c8de4c-e5c2-4979-9266-273e2d27cfa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Json data from javascript

2018-02-13 Thread Etienne Robillard

Hi Shazia,

You can make a XHR (Ajax) request in javascript to send the data to a 
django callback.


HTH,

Etienne


Le 2018-02-12 à 18:04, Shazia Nusrat a écrit :

Hi,

Below is the code for Javascript from Django template Google Maps API. 
I need to be able to save this in my Django models with JSON response. 
I am new user so an example will be really a great help.


Precisely I need to be able to save coordinates like latitude and 
longitude and then convert it to an address.


Thanks
varmap,infoWindow;functioninitMap(){        map 
=newgoogle.maps.Map(document.getElementById('map'),{          
center:{lat:-34.397,lng:150.644},          zoom:6});        infoWindow 
=newgoogle.maps.InfoWindow;// Try HTML5 
geolocation.if(navigator.geolocation){          
navigator.geolocation.getCurrentPosition(function(position){varpos ={  
            lat:position.coords.latitude,              
lng:position.coords.longitude };            
infoWindow.setPosition(pos);            
infoWindow.setContent('Location found.');            
infoWindow.open(map);            map.setCenter(pos);},function(){      
      handleLocationError(true,infoWindow,map.getCenter());});}else{// 
Browser doesn't support Geolocation          
handleLocationError(false,infoWindow,map.getCenter());}}functionhandleLocationError(browserHasGeolocation,infoWindow,pos){  
      infoWindow.setPosition(pos);        
infoWindow.setContent(browserHasGeolocation ?'Error: The Geolocation 
service failed.':'Error: Your browser doesn\'t support 
geolocation.');        infoWindow.open(map);}


--
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/CAD83tOzabkiPgniqofN6BH2tLogeiGE9JaZ5rppi3f44Hb0ybA%40mail.gmail.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/e87c4a18-519e-5264-00cb-65d3203048bd%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


i need to highlight the current page in navbar.!!its work!! but i extends new html page the navigation bar can't show ????

2018-02-13 Thread varun kishore Ravi

  

  DASHBOARD
  EVENT
  LOBBIES
  MARKET
  ONLINE PLAYERS
  SUBSCRIBE

  



$(function () {
setNavigation();
});

function setNavigation() {
var path = window.location.pathname;
path = path.replace(/\/$/, "");
path = decodeURIComponent(path);

$(".nav a").each(function () {
var href = $(this).attr('href');
if (path.substring(0, href.length) === href) {
$(this).closest('li').addClass('active');
}
});
}


-- 
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/2eaaf0c0-7d84-4807-823e-baafdec70cc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to fetch data from sql server and display on django web pages

2018-02-13 Thread PASCUAL Eric
Hi,


> You may want to check out sqlalchemy they provide a pretty good documentation 
> on what you are aftering


For my understanding, why are you suggesting to use SQLAlchemy while Django 
provides an ORM out of the box ?


SQLAlchemy is required for frameworks such as Flask, which do nothing with 
respect to the data layer, but it's not clear which benefit it could bring here.


Best regards


Eric

From: django-users@googlegroups.com  on behalf 
of sum abiut 
Sent: Monday, February 12, 2018 10:24:07 PM
To: django-users@googlegroups.com
Subject: Re: How to fetch data from sql server and display on django web pages


You may want to check out sqlalchemy they provide a pretty good documentation 
on what you are aftering 
http://docs.sqlalchemy.org/en/latest/dialects/mssql.html

>From you view you can defile a function like so.

view.py

from sqlalchemy import*
from django.shortcuts import render

def connectto_db(request):
engine=create_engine('mssql+pymssql://username:password@servername 
/Ddabname')
connection=engine.connect()
metadata=MetaData()


table=Table('tablename',metadata,autoload=True,autoload_with=engine)
stmt='SELECT * FROM table'
results=connection.execute(stmt).fetchall()
return render(request,'template.html',locals())


then  you can pass the results to your template.html

Hope this helps.

Cheers

On Sun, Feb 11, 2018 at 4:37 PM, Amit Kadivar 
mailto:amit.kadiv...@gmail.com>> wrote:
Please Help me.
How to fetch data from sql server and display them on django web pages through 
nginx web server..




--
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/b5577524-e67d-465f-bb49-e54bca92c88b%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/CAPCf-y5CZ-HAUSbGkTWKe23CfuCMWozoLqL85V52924NpDwd-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/AM5P193MB008317CB26D147DD042FD98A8CF70%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Json data from javascript

2018-02-13 Thread Shazia Nusrat
Can you please show me any example about the structure of code I've
provided?

Thanks

On Tue, Feb 13, 2018 at 2:27 AM, Etienne Robillard 
wrote:

> Hi Shazia,
>
> You can make a XHR (Ajax) request in javascript to send the data to a
> django callback.
>
> HTH,
>
> Etienne
>
> Le 2018-02-12 à 18:04, Shazia Nusrat a écrit :
>
> Hi,
>
> Below is the code for Javascript from Django template Google Maps API. I
> need to be able to save this in my Django models with JSON response. I am
> new user so an example will be really a great help.
>
> Precisely I need to be able to save coordinates like latitude and
> longitude and then convert it to an address.
>
> Thanks
>
> var map, infoWindow;
>   function initMap() {
> map = new google.maps.Map(document.getElementById('map'), {
>   center: {lat: -34.397, lng: 150.644},
>   zoom: 6
> });
> infoWindow = new google.maps.InfoWindow;
>
> // Try HTML5 geolocation.
> if (navigator.geolocation) {
>   navigator.geolocation.getCurrentPosition(function(position) {
> var pos = {
>   lat: position.coords.latitude,
>   lng: position.coords.longitude
> };
>
> infoWindow.setPosition(pos);
> infoWindow.setContent('Location found.');
> infoWindow.open(map);
> map.setCenter(pos);
>   }, function() {
> handleLocationError(true, infoWindow, map.getCenter());
>   });
> } else {
>   // Browser doesn't support Geolocation
>   handleLocationError(false, infoWindow, map.getCenter());
> }
>   }
>
>   function handleLocationError(browserHasGeolocation, infoWindow, pos) {
> infoWindow.setPosition(pos);
> infoWindow.setContent(browserHasGeolocation ?
>   'Error: The Geolocation service failed.' :
>   'Error: Your browser doesn\'t support 
> geolocation.');
> infoWindow.open(map);
>   }
>
>
> --
> 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/CAD83tOzabkiPgniqofN6BH2tLogei
> GE9JaZ5rppi3f44Hb0ybA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Etienne Robillardtkadm30@yandex.comhttps://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/CAD83tOyZn16gV7%3D2am9W8je-Q4mQALNNR5TAgPwYvVs%2B_n%2B9aQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Json data from javascript

2018-02-13 Thread Etienne Robillard
I'm not really sure what you meant here. Anyways, there's plenty of good 
JS frameworks like jQuery to allow you to write Ajax functions to send a 
JSON array for post-processing in Django.


Etienne

Le 2018-02-13 à 08:34, Shazia Nusrat a écrit :
Can you please show me any example about the structure of code I've 
provided?


Thanks

On Tue, Feb 13, 2018 at 2:27 AM, Etienne Robillard > wrote:


Hi Shazia,

You can make a XHR (Ajax) request in javascript to send the data
to a django callback.

HTH,

Etienne


Le 2018-02-12 à 18:04, Shazia Nusrat a écrit :

Hi,

Below is the code for Javascript from Django template Google Maps
API. I need to be able to save this in my Django models with JSON
response. I am new user so an example will be really a great help.

Precisely I need to be able to save coordinates like latitude and
longitude and then convert it to an address.

Thanks
varmap,infoWindow;functioninitMap(){        map
=newgoogle.maps.Map(document.getElementById('map'),{         
center:{lat:-34.397,lng:150.644},          zoom:6});       
infoWindow =newgoogle.maps.InfoWindow;// Try HTML5
geolocation.if(navigator.geolocation){         
navigator.geolocation.getCurrentPosition(function(position){varpos
={              lat:position.coords.latitude,             
lng:position.coords.longitude };           
infoWindow.setPosition(pos);           
infoWindow.setContent('Location found.');           
infoWindow.open(map);           
map.setCenter(pos);},function(){           
handleLocationError(true,infoWindow,map.getCenter());});}else{//
Browser doesn't support Geolocation         

handleLocationError(false,infoWindow,map.getCenter());}}functionhandleLocationError(browserHasGeolocation,infoWindow,pos){
 
      infoWindow.setPosition(pos);       
infoWindow.setContent(browserHasGeolocation ?'Error: The
Geolocation service failed.':'Error: Your browser doesn\'t
support geolocation.');        infoWindow.open(map);}

-- 
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/CAD83tOzabkiPgniqofN6BH2tLogeiGE9JaZ5rppi3f44Hb0ybA%40mail.gmail.com

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


-- 
Etienne Robillard

tkad...@yandex.com 
https://www.isotopesoftware.ca/ 




--
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/42a3efaf-7a67-b436-d297-be9d3dfcdad7%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Basic note/trello app - how to link model object IDs

2018-02-13 Thread Gonzalo Delgado
Hi Lylio,

On 12/2/18 16:20, Lylio wrote:
> 1. To click on a card so it opens up and displays the details, am I right
> to say I should create a card.html file in the templates folder for this?

It isn't necessary, but it is a good idea
What you need is to create a view that renders such template.
I suggest you write your own view function that does that, but what
you'd usually do is just use a generic view and either pass it the
template you want to use, or name the template in a way the generic view
will find it on its own.
See:
https://docs.djangoproject.com/en/2.0/topics/class-based-views/generic-display/

> 2. I'm confused about how Django keeps track of the cards in my app - I
> presume each card object has an ID in the database and I'd need this
ID in
> order to retrieve the card's details when it's clicked - but I'm
unsure of
> how to link the two. In the two pictures above, say someone clicked on
the
> 'class progression' card on the left... I'd like a new page to open up
that
> display the details for that card and allows the user to edit the info or
> completely delete the card.

Yes, in general, every Django model instance has an id (unless you
specifically tell it not to), and you can use it to create urls for the
detail view I mentioned earlier. This is a good start, but you'll later
want to add a SlugField to your Card model, and use that instead of the
id so urls look nicer.

> I'm maybe asking a bit much here - but I'm unsure of how complex these
> requirements are. It feels like it should be *fairly *straightforward.
Any
> thoughts or advice would be greatly appreciated.

I can assure you using Django for a project like yours is *very*
straightforward.
When in doubt, revisit the Django tutorial. This part is a good one for
where you're at: https://docs.djangoproject.com/en/2.0/intro/tutorial03/


-- 
Gonzalo Delgado

-- 
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/c13ffca9-7a4a-e153-86d8-198a4a2d197a%40gonzalodelgado.com.ar.
For more options, visit https://groups.google.com/d/optout.


Migrating into Django 1.9; question about autoescape

2018-02-13 Thread Bill Torcaso

Hello all,

I have the task of migrating a very old website from Django 1.7 to either 
Django 1.11 or 2.0, depending on the effort.

My plan is to go from 1.7 --> 1.8 --> 1.9 -->1.10 --> 1.11, adapting the 
codebase as I go.  It's been easy enough until I arrive at 1.9, and the 
change in template-rendering in which "autoescape" defaults to "on".

Now a lot of my payload is arriving at the browser with my HTML tags 
escaped.  For example,

   gets rendered as

Where use JSON in Django?

2018-02-13 Thread Hayk Manukyan
Maybe my question is stupid but I want understand where and why developer 
need use json.
project  on github 
 
this is my project. In templates used 
django tags.
Have to need project changes for example from ({% for product in products 
%}{{ product }}{% endfor %}) to json?
Thank you for your time

-- 
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/5402f8e4-0d15-4fe8-a1d6-6f54a0bab451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Migrating into Django 1.9; question about autoescape

2018-02-13 Thread Matthew Pava
At first, I would do your step 1.  I would check for any other errors in Django 
1.8, and then proceed with updating to 1.9 -> 1.10 -> 1.11 -> 2.0.  You are 
probably going to find other issues that need to be resolved in those upgrades. 
 Ultimately, you will probably have to do step 3.  I wouldn’t do step 2 since 
you’ll be updating all of your templates.  If you are going to update all your 
templates, you might as well just do step 3.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Bill Torcaso
Sent: Tuesday, February 13, 2018 8:54 AM
To: Django users
Subject: Migrating into Django 1.9; question about autoescape


Hello all,

I have the task of migrating a very old website from Django 1.7 to either 
Django 1.11 or 2.0, depending on the effort.

My plan is to go from 1.7 --> 1.8 --> 1.9 -->1.10 --> 1.11, adapting the 
codebase as I go.  It's been easy enough until I arrive at 1.9, and the change 
in template-rendering in which "autoescape" defaults to "on".

Now a lot of my payload is arriving at the browser with my HTML tags escaped.  
For example,

   gets rendered as

Re: Where use JSON in Django?

2018-02-13 Thread M Hashmi
JSON is parsing in and out information from JS to Python or Django in your
case directly. For instance let's suppose you have a JS script in your
template and you need to pass your context variables into JS code as
variables. You can jsonify your request/response to get or post data.

A good example would be charts, lets suppose you need to show the number of
student per class in any project and you want to visually project the
quantity. In that case you need to parse your Student model to JS charting
scripts. That is where you create JSON request/response objects to supply
or capture the events.

Please check this out an try the following link for practice:

https://www.youtube.com/watch?v=B4Vmm3yZPgc

Regards,

Mudassar



On Tue, Feb 13, 2018 at 7:08 AM, Hayk Manukyan  wrote:

> Maybe my question is stupid but I want understand where and why developer
> need use json.
> project  on github
> 
> this is my project. In templates used
> django tags.
> Have to need project changes for example from ({% for product in products
> %}{{ product }}{% endfor %}) to json?
> Thank you for your time
>
> --
> 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/5402f8e4-0d15-4fe8-a1d6-6f54a0bab451%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/CANoUts46R7aS_5e1-un%3DyuLUj4O%3DEmT6KVQShG3oT3oqfuvNDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi,

I want to seek some advice about the error. All of my pet projects in my
desktop are getting the same error even though virtualenv is activated. I
can confirm that when I started playing around with the projects, I have
installed Django inside virtualenv without using "sudo". Now, I can't run
python manage.py runserver and the packages that I am getting whenever I
run pip freeze are different from before which doesn't include Django in
the list.


Any advice pls?


Thanks,
Jarvis

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


Migrating into Django 1.9; question about autoescape

2018-02-13 Thread Daniel Roseman
autoescape has defaulted to on since before Django 1.0; it was a massive change 
at the time.

The only change in escaping behaviour in 1.9 was around the output of simple 
tags, see 
https://docs.djangoproject.com/en/2.0/releases/1.9/#simple-tag-now-wraps-tag-output-in-conditional-escape
 - this is a very minor change which can be easily fixed within the tags 
themselves.
-- 
DR.

-- 
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/7286de5a-05a8-4357-8751-02e244e5047f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread Jason
if pip freeze doesn't include django in the output, then the django package 
is not installed in the virtualenv.  are you sure the virtualenv was active 
when you installed django?

also, remember that if you installed latest django, eg *pip install django*, 
it won't install for python2 venvs.

On Tuesday, February 13, 2018 at 3:44:42 PM UTC-5, tangoward15 wrote:
>
> Hi,
>
> I want to seek some advice about the error. All of my pet projects in my 
> desktop are getting the same error even though virtualenv is activated. I 
> can confirm that when I started playing around with the projects, I have 
> installed Django inside virtualenv without using "sudo". Now, I can't run 
> python manage.py runserver and the packages that I am getting whenever I 
> run pip freeze are different from before which doesn't include Django in 
> the list.
>
>
> Any advice pls?
>
>
> Thanks,
> Jarvis
>

-- 
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/9ddf691d-6d16-4fa1-aab0-f534fef445ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django-hotsauce 1.0 commercial edition looking for beta testers!

2018-02-13 Thread Etienne Robillard

Hello everyone,

Django-hotsauce 1.0 commercial edition (LTS) is now available for 
preorder :)


Checkout: https://www.livestore.ca/product/django-hotsauce/

I'm also looking for expert Django and Python programmers to test and 
review the design and API of Django-hotsauce 1.0 commercial edition in 
order to develop a low-cost, high-performance, Django alternative 
microframework to develop scalable web apps in Python and WSGI. 
Furthermore, i will always be happy to support a free version of 
Django-hotsauce in order to drive the development and research of 
Python/Django web programming. :)


Final note, the Paypal payment gateway is experimental. I might one day 
decide to switch to monero or flashcoin... I'm not really sure it's a 
good idea yet.


What do you think?

Etienne


--
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/21340642-c3ef-c50e-e49b-6c86c8e8849a%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


How many live websocket connection can django channels handle?

2018-02-13 Thread John Conner
I'm working on a project where a user could have up to 10 websocket open at 
the same time. 2 of the connections will need to send and receive every min 
or seconds while the rest are not very intensive(one send and receive every 
5min to 10 hour). user base could range from 10,000 to 10,000,000.
I could do one websocket per client but the project is 95 percent done and 
i rather not to change anything *IF* it's not necessary.
So what are your suggestion, should i change it to one wb per client or 
django-channels can handle 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/04239fd0-c8a8-41b5-854e-03e539be4d8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Syntax Error when trying to migrate to Postgresql

2018-02-13 Thread Joe
I have installed django, Postgresql, and psycopg2 and went to migrate a 
project to a new database I created on postgresql, This is the error 
message I got. 

Traceback (most recent call last):

  File "manage.py", line 15, in 

execute_from_command_line(sys.argv)

  File 
"/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 371, in execute_from_command_line

utility.execute()

  File 
"/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 317, in execute

settings.INSTALLED_APPS

  File 
"/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
 
line 56, in __getattr__

self._setup(name)

  File 
"/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
 
line 43, in _setup

self._wrapped = Settings(settings_module)

  File 
"/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
 
line 106, in __init__

mod = importlib.import_module(self.SETTINGS_MODULE)

  File 
"/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/importlib/__init__.py", 
line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

  File "", line 978, in _gcd_import

  File "", line 961, in _find_and_load

  File "", line 950, in _find_and_load_unlocked

  File "", line 655, in _load_unlocked

  File "", line 674, in exec_module

  File "", line 781, in get_code

  File "", line 741, in source_to_code

  File "", line 205, in 
_call_with_frames_removed

  File 
"/Users/JosephConrad/Desktop/Joetestsite/MySite/BudgetSite/settings.py", 
line 77

‘postgresql’: {

   ^

SyntaxError: invalid character in identifier



I am able to migrate with sqllite but I can't migrate to postgresql.

-- 
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/8f699b48-4f09-4b55-a8d1-c3dfbe5a4166%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread PASCUAL Eric
Hi Jarvis,


Can you provide the error messages trace ? It can greatly help understanding 
what's happening.


If you haven't already done this, try to restart from a fresh new virtualenv 
inside which you'll install Django and the additional packages you've added (if 
any). Then restore a copy of your project in this context (if by chance you 
work with git, a simple git clone will do the trick) and test your app again.


Hoping you haven't already messed your system Python by installing stuff in 
sudo mode. The situation could be a little more complicated then.


Best.


Eric

From: django-users@googlegroups.com  on behalf 
of tango ward 
Sent: Tuesday, February 13, 2018 9:43:45 PM
To: django-users@googlegroups.com
Subject: importError: Count Not import Django inside Virtualenv

Hi,

I want to seek some advice about the error. All of my pet projects in my 
desktop are getting the same error even though virtualenv is activated. I can 
confirm that when I started playing around with the projects, I have installed 
Django inside virtualenv without using "sudo". Now, I can't run python 
manage.py runserver and the packages that I am getting whenever I run pip 
freeze are different from before which doesn't include Django in the list.


Any advice pls?


Thanks,
Jarvis

--
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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%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/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: How many live websocket connection can django channels handle?

2018-02-13 Thread Andrew Godwin
What it can handle depends on your setup. If you're using Channels 1,
there's potential bottlenecking in the Redis channel layer. Channels 2 is
much easier to scale and you can just add more servers as your load demands.

I would suggest reducing your websocket load, but it's your call which is
more expensive - more server power or the extra development time needed.
There's no baseline "number" that Daphne/Channels can terminate without
reference to exact hardware.

Andrew

On Tue, Feb 13, 2018 at 3:52 PM, John Conner  wrote:

> I'm working on a project where a user could have up to 10 websocket open
> at the same time. 2 of the connections will need to send and receive every
> min or seconds while the rest are not very intensive(one send and receive
> every 5min to 10 hour). user base could range from 10,000 to 10,000,000.
> I could do one websocket per client but the project is 95 percent done and
> i rather not to change anything *IF* it's not necessary.
> So what are your suggestion, should i change it to one wb per client or
> django-channels can handle 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/04239fd0-c8a8-41b5-854e-03e539be4d8c%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/CAFwN1urzuiYkV-fQykXm0Lm%3DxfLKGR0tR4q5yjohDzfHunbR9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi,

The error message that I am getting is:

Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 14, in 
) from exc
ImportError: Couldn't import Django. Are you sure it's installed and
available on your PYTHONPATH environment variable? Did you forget to
activate a virtual environment?


@Jason,

It's weird because couple of days, I can still run these pet projects
without any error. If I go to venv folder
virtual/lib/python3.6/site-packages, I can see django there. It seems that
even though virtualenv is activated, the packages I installed inside it are
not recognized by the system.


On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric  wrote:

> Hi Jarvis,
>
>
> Can you provide the error messages trace ? It can greatly help
> understanding what's happening.
>
>
> If you haven't already done this, try to restart from a fresh new
> virtualenv inside which you'll install Django and the additional packages
> you've added (if any). Then restore a copy of your project in this context
> (if by chance you work with git, a simple git clone will do the trick) and
> test your app again.
>
>
> Hoping you haven't already messed your system Python by installing stuff
> in sudo mode. The situation could be a little more complicated then.
>
>
> Best.
>
>
> Eric
> --
> *From:* django-users@googlegroups.com  on
> behalf of tango ward 
> *Sent:* Tuesday, February 13, 2018 9:43:45 PM
> *To:* django-users@googlegroups.com
> *Subject:* importError: Count Not import Django inside Virtualenv
>
> Hi,
>
> I want to seek some advice about the error. All of my pet projects in my
> desktop are getting the same error even though virtualenv is activated. I
> can confirm that when I started playing around with the projects, I have
> installed Django inside virtualenv without using "sudo". Now, I can't run
> python manage.py runserver and the packages that I am getting whenever I
> run pip freeze are different from before which doesn't include Django in
> the list.
>
>
> Any advice pls?
>
>
> Thanks,
> Jarvis
>
> --
> 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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2Y
> hFA%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/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.
> EURP193.PROD.OUTLOOK.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/CAA6wQLLZyeuQiFL6fe4HvC4a6ogZnTh7kGrc62ni95aPggChyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi Eric,


I tried what you suggested and it works! I was just wondering why my
existing pet projects have the same problem?

On Wed, Feb 14, 2018 at 10:13 AM, tango ward  wrote:

> Hi,
>
> The error message that I am getting is:
>
> Traceback (most recent call last):
>   File "manage.py", line 8, in 
> from django.core.management import execute_from_command_line
> ModuleNotFoundError: No module named 'django'
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in 
> ) from exc
> ImportError: Couldn't import Django. Are you sure it's installed and
> available on your PYTHONPATH environment variable? Did you forget to
> activate a virtual environment?
>
>
> @Jason,
>
> It's weird because couple of days, I can still run these pet projects
> without any error. If I go to venv folder virtual/lib/python3.6/site-packages,
> I can see django there. It seems that even though virtualenv is activated,
> the packages I installed inside it are not recognized by the system.
>
>
> On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric 
> wrote:
>
>> Hi Jarvis,
>>
>>
>> Can you provide the error messages trace ? It can greatly help
>> understanding what's happening.
>>
>>
>> If you haven't already done this, try to restart from a fresh new
>> virtualenv inside which you'll install Django and the additional packages
>> you've added (if any). Then restore a copy of your project in this context
>> (if by chance you work with git, a simple git clone will do the trick) and
>> test your app again.
>>
>>
>> Hoping you haven't already messed your system Python by installing stuff
>> in sudo mode. The situation could be a little more complicated then.
>>
>>
>> Best.
>>
>>
>> Eric
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of tango ward 
>> *Sent:* Tuesday, February 13, 2018 9:43:45 PM
>> *To:* django-users@googlegroups.com
>> *Subject:* importError: Count Not import Django inside Virtualenv
>>
>> Hi,
>>
>> I want to seek some advice about the error. All of my pet projects in my
>> desktop are getting the same error even though virtualenv is activated. I
>> can confirm that when I started playing around with the projects, I have
>> installed Django inside virtualenv without using "sudo". Now, I can't run
>> python manage.py runserver and the packages that I am getting whenever I
>> run pip freeze are different from before which doesn't include Django in
>> the list.
>>
>>
>> Any advice pls?
>>
>>
>> Thanks,
>> Jarvis
>>
>> --
>> 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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWb
>> e1JNx2YhFA%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/ms
>> gid/django-users/AM5P193MB0083C66FCD689270720750708CF60%
>> 40AM5P193MB0083.EURP193.PROD.OUTLOOK.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/CAA6wQLJCkd0B-0ep8jrUFk1QUp%3D_jQ_AuundhzBMwOSYf7h4fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.