install geodjango in windows 10

2016-04-12 Thread Xristos Xristoou
can you tell me someone how to install geodjango step by step in windows10 
?i like to use pip if i can for that,it is easy pip.

-- 
You received this message because you are subscribed 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/780da4bf-496b-45d2-92ad-64b8eb4f13ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: install geodjango in windows 10

2016-04-12 Thread Jani Tiainen

Hi,

GeoDjango is actually built in as django.contrib.gis package so it's 
"batteries included".


To make it work you need to have certain GEOS and GDAL libraries. 
Easiest way to get them is install either MS4W stack or PostGIS 
librarios for PostgreSQL.


Also there exists few constraints for your models and of course, you 
need to use proper backend from gis.db.


On 12.04.2016 10:00, Xristos Xristoou wrote:
can you tell me someone how to install geodjango step by step in 
windows10 ?i like to use pip if i can for that,it is easy pip.

--
You received this message because you are subscribed 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/780da4bf-496b-45d2-92ad-64b8eb4f13ec%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/570CA3DE.8000406%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: install geodjango in windows 10

2016-04-12 Thread Xristos Xristoou
i dont have any libraries from GEOS and GDAL or PostGIS librarios for 
PostgreSQL.
how to install this libraries in windows 10 and python 3.5.
i try pip3.5 install GDAL but i have error(look image).


Τη Τρίτη, 12 Απριλίου 2016 - 10:00:24 π.μ. UTC+3, ο χρήστης Xristos 
Xristoou έγραψε:
>
> can you tell me someone how to install geodjango step by step in windows10 
> ?i like to use pip if i can for that,it is easy pip.
>

-- 
You received this message because you are subscribed 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/786280b2-8f84-47f9-9b1c-d1cbca55e2c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: install geodjango in windows 10

2016-04-12 Thread Xristos Xristoou
i dont have any from that libraries but how to install that libraries in 
windows 10 and python 3.5?
i try to use this pip3.5 install GDAL and show me error(look image)

Τη Τρίτη, 12 Απριλίου 2016 - 10:00:24 π.μ. UTC+3, ο χρήστης Xristos 
Xristoou έγραψε:
>
> can you tell me someone how to install geodjango step by step in windows10 
> ?i like to use pip if i can for that,it is easy pip.
>

-- 
You received this message because you are subscribed 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/91ce7533-2017-4796-976b-719b91a3b011%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "Error creating new content types" with multiple DB router

2016-04-12 Thread Jim T
Carlton, we have the exact same issue you described.  It took a lot of 
searching to even find someone who has the same problem which led us to the 
conclusion that we just didn't understand how to perform migrations with DB 
Routers in play.  As you described, we have:

Database A - contains the schema for auth, sessions, content-type, models 
for app A
Database B - contains the models for app B

Migrations for app A function correctly.
Migrations for app B do not function correctly.

Our goal is the same as yours - to have models for app B (in Database B) 
store it's content-type in Database A, which is actually the point of 
having an "app" label in the content types table.  We follow the same 
suggestions and examples and yield the same error messages.

We are convinced the solution is some subtlety in the DB Router code that 
we missed and continue to investigate.  Did you ever find the solution to 
this?

Thanks
-Jim


On Tuesday, December 15, 2015 at 4:30:25 PM UTC-5, Carlton Gibson wrote:
>
> Hi, 
>
> Using multiple DBs, with most models in the "default" db but models for a 
> single app being stored in a second DB, I've more or less copied the example 
> from the docs 
>  for 
> a custom database router. (My example is essentially identical to the 
> `AuthRouter` class given.)
>
> This works perfectly *except* when I run the migration on the second DB. 
>
> The app relations are all created but I then get an error creating the 
> ContentType...
>
> > RuntimeError: Error creating new content types. Please make sure 
> contenttypes is migrated before trying to migrate apps individually.
>
> This occurs because the relation "django_content_type" does not exist in 
> the second database — that's correct: I'm expecting content types to be 
> written only to the "default" db. 
>
> My question is why is this error occurring? 
>
> 1. As per the docs, in my router, I am returning "None if there is no 
> suggestion" for all the router methods — particularly `db_for_write`, which 
> seems relevant here. 
> 2. Looking at the source, the default router returns `DEFAULT_DB_ALIAS` if 
> all the custom routers return None. 
>
> So 3. I can't see the error. :-) — I'm expecting the content type to be 
> written to the default db. 
>
> I can work around the issue here — but I'd like to understand it. Can 
> anyone with experience of this explain what I've done wrong?
>
> Kind Regards,
>
> Carlton 
>
>
>

-- 
You received this message because you are subscribed 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/2b461815-8b7a-4507-b7a9-07e54bf6c497%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Collectstatic and determine which files need to be updated by comparing their checksum

2016-04-12 Thread Daniel Blasco
Hi,

In my particular case, I'm using django-storages to upload my static files 
to Amazon S3. I'm serving my application from Heroku.

In my local development, when I run collectstatic for a second time just 
after the first one, no files are being uploaded to S3 because 
collectstatic checks for the modified_time to determine if the local files 
are newer than the ones in S3. That's fine so far.

The problem is when I deploy to Heroku. Collectstatic is being executed 
from the Heroku server and absolutely all the files are always being 
uploaded to S3, even the ones that have not changed. This is because during 
the deployment Heroku creates a full copy of the source code, and therefore 
all the files have a new modified_time. In my case, it takes almost 10 
minutes to upload ~1000 files for each deployment.

Also, imagine the situation where the modified_times are not being changed 
and I wanted to upload older versions of the static files. I wont be able 
because storage wouldn't allow to upload files with an older modified_time.

I think that a more accurate way to check if a file needs to be replaced 
could be by comparing their checksum/hash and offer this feature for all 
the Storage subclasses. To preserve backwards compatibility, in 
collectstatic command first determine if the storage subclass implements a 
checksum generation and otherwise fallback to modified_time comparison.

What do you think, is this something that makes sense?

 

-- 
You received this message because you are subscribed 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/04748bab-050a-4f2c-8982-21406de30b35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multidimensional form requirements

2016-04-12 Thread C. Kirby
If you are already add/deleting in place using ajax you can use that to 
your advantage. Don't think of it as a single form - each ajax capable 
component (profile, extra1, extra2, extra3) is a separate form. You have a 
view that populates your template with multiple forms - the profile and 
each extra. Then each of those has an ajax endpoint for update/delete. You 
can also have and add extra button that has an endpoint that provided the 
form via ajax, and its save endpoint is the save/update endpoint you 
already have.  

On Saturday, April 9, 2016 at 12:02:02 PM UTC-5, Scot Hacker wrote:
>
>
>
> On Friday, April 8, 2016 at 11:27:01 AM UTC-7, Tundebabzy wrote:
>>
>> I don't know if I'm off target but. 
>>
>> I'm presently work on something like this where I have have to save three 
>> models at a go. One model is a stand alone while the other two have a 
>> foreign key to the stand alone model which is a many to one relationship. 
>> So to implement the many to one where I can save many of the dependent 
>> models together with the standalone models, I made use of inline formset 
>> and no problems thus far.
>>
>
> It's interesting - Django provides non-model forms, model forms, and 
> formsets for dealing with multiple instances of the same model, but no way 
> to build a single form that deals with multiple model types simultaneously. 
> At this point, it's looking pretty much like I'll solve this outside of the 
> Django box, by generating JSON representing the collection of data and 
> using Angular to add/edit to the set with client-side validation, then 
> post-processing the results in a Django view.
>
> ./s
>
>

-- 
You received this message because you are subscribed 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/485dd261-69f2-458f-8015-bf6730ea2704%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Deploying a Django 1.9 project

2016-04-12 Thread Nick Jenkins
I've been developing a site with Django 1.9 with Python3 and I'm hitting a 
wall when trying to deploy it to a hosting service. I currently have a 
shared service plan through BlueHost and I'm having trouble getting 
everything to work right. In talking with BlueHost they stated they only 
support Python 2.7 and Django 1.4. So, I'm trying to determine how best to 
proceed.

After reading many old walkthoughs on Django installs here's is what I've 
tried so far:
1. I was able to get Python 3.5 and Django 1.9 installed as a local source. 
Then after an error 500 page, I realized FastCGI was not longer supported.
2. Then after many linking errors I was able to get mod_wsgi installed with 
Python3.5 having shared libraries. The trouble is BlueHost shared services 
doesn't have root access.

(That list seems so short when compared to the actual time and number of 
tries it took to get this far)

I guess the question I'm trying to ask is: Should I switch hosting 
companies, stay with Bluehost and upgrade to a VPS or am I missing 
something simple in the configuration and I can actually get this whole 
mess to work?

Any help would 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/85426dfd-5252-4a02-9b21-6eb07d3b6b45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying a Django 1.9 project

2016-04-12 Thread Devrhoid Davis
Hi Nick,

In my limited experience, you seem to have two options:

1. You can switch to another host who will grant you root access (such as
linode.com) and proceed to install django and python with the required
dependencies.

OR

You can downgrade to Python 2.7 and use django 1.7 with your current
BlueHost plan. The issue of not having root access will however remain.

I hope this will help you in choosing a way forward and to getting your
project completed.

Best regards,
Devrhoid
On Apr 12, 2016 1:27 PM, "Nick Jenkins"  wrote:

> I've been developing a site with Django 1.9 with Python3 and I'm hitting a
> wall when trying to deploy it to a hosting service. I currently have a
> shared service plan through BlueHost and I'm having trouble getting
> everything to work right. In talking with BlueHost they stated they only
> support Python 2.7 and Django 1.4. So, I'm trying to determine how best to
> proceed.
>
> After reading many old walkthoughs on Django installs here's is what I've
> tried so far:
> 1. I was able to get Python 3.5 and Django 1.9 installed as a local
> source. Then after an error 500 page, I realized FastCGI was not longer
> supported.
> 2. Then after many linking errors I was able to get mod_wsgi installed
> with Python3.5 having shared libraries. The trouble is BlueHost shared
> services doesn't have root access.
>
> (That list seems so short when compared to the actual time and number of
> tries it took to get this far)
>
> I guess the question I'm trying to ask is: Should I switch hosting
> companies, stay with Bluehost and upgrade to a VPS or am I missing
> something simple in the configuration and I can actually get this whole
> mess to work?
>
> Any help would 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/85426dfd-5252-4a02-9b21-6eb07d3b6b45%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/CAH5S8Zgbsu6EOuxWCFQY%2B1JhDB%2BJcwGDAwL0pJcP9i9jCXy_WQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Migration bug in 1.9.5?

2016-04-12 Thread Aaron C. de Bruyn
* My project has been around since the Django 1.2 days.
* Some time around 1.8.x I ran squashmigrations and everything worked
perfectly.
* I've done lots of migrations since then.
* I updated the app to Python 3.
* Everything was working perfectly

I just did my first makemigration under python 3.  Specifically I added a
Boolean 'enabled' field to a model.

The migration appears to have been created properly, but when I try to run
the 'migrate' command, it tries to apply
0001_squashed_0009_auto_20150109_1447.

I tried to fake it by running 'manage.py migrate myapp 0001 --fake' and it
says it applied (faked).
Running 'manage.py migrate' shows it trying to apply the 0001_squashed...
migration again.

I also tried using the --fake-initial flag with no luck.

'showmigrations' show every migration since the squash has been applied,
just not the squashed migration or the most recent one I just created:

myapp
 [ ] 0001_squashed_0009_auto_20150109_1447 (9 squashed migrations)
 [X] 0010_auto_20150109_1824
 [X] 0011_auto_20150818_1946
 [X] 0012_auto_20150829_1610
 [X] 0013_auto_20150829_1610
 [X] 0014_auto_20150829_1618
 [X] 0015_auto_20150829_1618
 [X] 0016_remove_internetprovider_old_phone
 [X] 0017_office_linked_location
 [X] 0018_auto_20150829_2345
 [X] 0019_office_pib_version
 [X] 0020_auto_20150908_1643
 [X] 0021_internetservice_notes
 [X] 0022_office_last_router_backup_alert
 [ ] 0023_auto_20160412_1433

How can I get the system to recognize that 0001_squashed... has been
applied already?

Thanks,

-A

-- 
You received this message because you are subscribed 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/CAEE%2BrGrgYE-Dp9iVeZHV_%3Dh8nSqFwTwydb3yfoo2e8M20ViQ0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trouble getting posted

2016-04-12 Thread James Schneider
> My original post was a test to see whether I had a global problem which I
> didn't. The rest is just a  discussion that ensued. ie Off topic by
> accident.
>
>
Meh, it happens.


> One last comment. I use a Debian Linux system with Mozilla's firebird
> email client. No insults intended but I stay as far away from Microsoft as
> I can.
>

Totally get it, but its a necessary evil in my daily duties.

To clarify, I said I used it. I didn't say I liked it. MS is all cordoned
off in its own VM at work. Everything else I personally run is either
Debian (servers) or Xubuntu (desktop/laptop). My laptop dual-boots
Xubuntu/Win7, is the only Windows machine in my house, and I'm pretty sure
I'm about 6 months behind on my Win7 patches because it hasn't been booted
in that long.

But hey, maybe I'll finally get around to upgrading to Win10 and installing
Ubuntu/Bash, and then I'll never need a native Linux installation again,
right? ;-)

-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%2BciXV0HCnw0UjWzRTJPPdSN-ZxHOg-SCRfT3d4W5RxCLv5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.