Re: sqlite3.NotSupportedError: URIs not supported

2016-08-24 Thread Jeff Silverman
Well I may have answered my own question. Seems it may be a version incompatibility. I built another virtual environment at Python 2.7 and the error is gone. Also I am using the pycontrol module which is also not work g with Python 3.4. On Wednesday, August 24, 2016, Jeff Silverman wrote: > Ca

Re: hey.. are you there?

2016-08-24 Thread Lekan Wahab
Hi. On 24 Aug 2016 9:13 PM, "concussion" wrote: > good morning.. :) > > -- > You received this message because you are 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...@googlegro

sqlite3.NotSupportedError: URIs not supported

2016-08-24 Thread Jeff Silverman
Can anyone point me in the right direction to solve this? I am running DJANGO with python3.4 in virtualenv. I get this error running manage.py. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

hey.. are you there?

2016-08-24 Thread concussion
good morning.. :) -- You received this message because you are 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@go

how to access uploaded file list in django forms.py

2016-08-24 Thread ali Eblice
Hello friends how can i access uploaded file list (multi file upload) in forms.py ? In a view i access file list like this : *request.FILES.getlist('files')* but in forms.py i get this error: *Exception Value:'UploadForm' object has no attribute 'request'* i tried to add request object to

Re: Clarifying Project vs Apps

2016-08-24 Thread Rich Shepard
On Wed, 24 Aug 2016, Andromeda Yelton wrote: My feeling/practice on apps is: each app is a one-word informative noun. It contains the models that are logically grouped under that noun (and the views, urls, etc required to interact with those models on the front end). Andromeda, So are table

Re: Clarifying Project vs Apps

2016-08-24 Thread Andreas Kuhne
2016-08-24 21:09 GMT+02:00 Andromeda Yelton : > My feeling/practice on apps is: each app is a one-word informative noun. > It contains the models that are logically grouped under that noun (and the > views, urls, etc required to interact with those models on the front end). > > If there isn't a si

Re: Clarifying Project vs Apps

2016-08-24 Thread Andromeda Yelton
My feeling/practice on apps is: each app is a one-word informative noun. It contains the models that are logically grouped under that noun (and the views, urls, etc required to interact with those models on the front end). If there isn't a single word that logically represents all my models, then

Re: Running Django Project Locally

2016-08-24 Thread Michael Macdonald
Good points. I tend to merge the roles of developer and QA in my mind when thinking of Django, since it is not my day-job and I'm working alone. That said, you are correct, when doing something more than quick-hit problem resolution, I'm guessing I'd wind up going back to runserver. I do stil

Re: Running Django Project Locally

2016-08-24 Thread Asad Jibran Ahmed
One thing I'd add to this is that I could never work without runserver because I tend to use ipdb a *lot* while debugging any problems. For me the best way to debug is to put import ipdb; ipdb.set_trace() in my code and just start debugging from the command line. Having uwsgi or any other kind of s

Re: Running Django Project Locally

2016-08-24 Thread Andreas Kuhne
2016-08-24 17:54 GMT+02:00 Michael Macdonald : > Interestingly enough, just this morning, after a couple times being bitten > with differences in behavior between use of runserver in development vs. > wsgi in production, I've decided to do all development on my local machine > under lighttpd. In

Re: Clarifying Project vs Apps

2016-08-24 Thread Rich Shepard
On Wed, 24 Aug 2016, Andreas Kuhne wrote: If you know how your project will be used, you can usually group the models and views in logical apps. For example a customer app that has the customer (user) model, address model. Then another app for orders and invoices and so on. Andréas, Here yo

Re: Clarifying Project vs Apps

2016-08-24 Thread Rich Shepard
On Wed, 24 Aug 2016, Lee Hinde wrote: So, no one is going to grade it. You're making this for yourself, so I wouldn't over think it. I'm working on a project now that only has two apps, one with all the core models and one for utility models (like choice lists).(I'm using several packages, so th

Re: Clarifying Project vs Apps

2016-08-24 Thread Andreas Kuhne
2016-08-24 19:12 GMT+02:00 Lee Hinde : > On Wed, Aug 24, 2016 at 9:23 AM, Rich Shepard > wrote: > >> On Wed, 24 Aug 2016, Lee Hinde wrote: >> >> My tuppence. >>> >> >> Lee, >> >> Before or after Brexit? The value might change. :-) >> >> No, an app is a logical grouping of objects/tables. You mi

Re: Running Django Project Locally

2016-08-24 Thread Michael Macdonald
Interestingly enough, just this morning, after a couple times being bitten with differences in behavior between use of runserver in development vs. wsgi in production, I've decided to do all development on my local machine under lighttpd. In the process of (mis?)configuring it now. I'm prett

Close database connection for long running django-admin command

2016-08-24 Thread Charanpal Dhanjal
Hi all, I am using GeoDjango and I have a django-admin command that does some route calculations for approximately 24 hours and then saves the results to a MySQL database. Unfortunately the database connection times out after 8 hours resulting in: django.db.utils.OperationalError: (2006, 'MySQL

Re: Clarifying Project vs Apps

2016-08-24 Thread Lee Hinde
On Wed, Aug 24, 2016 at 9:23 AM, Rich Shepard wrote: > On Wed, 24 Aug 2016, Lee Hinde wrote: > > My tuppence. >> > > Lee, > > Before or after Brexit? The value might change. :-) > > No, an app is a logical grouping of objects/tables. You might, for >> instance,have an Invoice app that would inc

Re: Clarifying Project vs Apps

2016-08-24 Thread Rich Shepard
On Wed, 24 Aug 2016, Lee Hinde wrote: My tuppence. Lee, Before or after Brexit? The value might change. :-) No, an app is a logical grouping of objects/tables. You might, for instance,have an Invoice app that would include an Invoice table (model) and a LineItems table. Products and relat

Re: Clarifying Project vs Apps

2016-08-24 Thread Lee Hinde
> On Aug 24, 2016, at 8:48 AM, Rich Shepard wrote: > > While I think that I understand the differences between a project and its > apps there remains one point of uncertainty. I've not found the answer, > although it might be in the 1.10 docs or on the Web and I've missed it. > > If the proje

Clarifying Project vs Apps

2016-08-24 Thread Rich Shepard
While I think that I understand the differences between a project and its apps there remains one point of uncertainty. I've not found the answer, although it might be in the 1.10 docs or on the Web and I've missed it. If the project represents the entire database, do the apps represent indivi

Re: "add another" for inline in admin disappeared in 1.10

2016-08-24 Thread Chris Gray
I've resolved the issue. There was no problem with the development server only in Apache. The Apache configuration was set up before the upgrade and was referring to the Python3.4 libraries not the Python3.5 libraries where pip installs Django 1.10. I updated the Apache configuration and now

Re: Strange failing test

2016-08-24 Thread Gergely Polonkai
That’s indeed great news. Too bad I’m rooted with 1.9 for a while, as 1.10 doesn’t play nice with Python 2.7.8. I hope I can upgrade both Python and Django to as recent as possible soon. Thank you for the info anyways! Tim Graham ezt írta (időpont: 2016. aug. 24., Sze, 16:59): > You'll be glad t

Re: Strange failing test

2016-08-24 Thread Tim Graham
You'll be glad to know that's fixed in Django 1.10: https://github.com/django/django/commit/e0837f2cb12de5e95e621d19b186b0da43bcdee2 On Wednesday, August 24, 2016 at 10:27:37 AM UTC-4, Gergely Polonkai wrote: > > It just turned out that value_list(…, flat=True) returns a QuerySet, not a > list.

Re: Strange failing test

2016-08-24 Thread Gergely Polonkai
It just turned out that value_list(…, flat=True) returns a QuerySet, not a list. So expected_json couldn’t be equal to the actual result. It took a bit of debugging as repr() displays [1, 2, 3], not QuerySet(1, 2, 3) or something. Derek ezt írta (időpont: 2016. aug. 24., Sze, 16:03): > Assuming

Re: Postcode Search

2016-08-24 Thread Derek
The Google geocoding API can help - see: https://developers.google.com/maps/documentation/geocoding/intro Their example shows the ZIP code being returned in the JSON/XML response. Or there is: https://www.zipcodeapi.com/ Of course, you need to adhere to the terms&conditions of these service prov

Re: Strange failing test

2016-08-24 Thread Derek
Assuming that the long function you have embedded inside your dictionary simply generates a list i.e. cloned_build.groupings.get(group=group1) .field_values .exclude(template=approvable_template) .values_list('id', flat=True)[:] results in: [1,2,3] Then some examples of possible t

Re: what is the unit of measure in GEOSGeometry.area

2016-08-24 Thread Jani Tiainen
If I'm not mistaken if you don't have geographic coordinates, units are square degrees. If you do have geographic coordinates .area should return square meters instead, On 24.08.2016 06:11, Joyce Chan wrote: https://docs.djangoproject.com/en/1.10/ref/contrib/gis/geos/ -- You received this m

what is the unit of measure in GEOSGeometry.area

2016-08-24 Thread Joyce Chan
https://docs.djangoproject.com/en/1.10/ref/contrib/gis/geos/ -- You received this message because you are 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 t

Re: Running Django Project Locally

2016-08-24 Thread Hendro Wibowo
Maybe you can fix it by creating a new Django project in another directory and then copy manage.py (and/or other missing default files) to your current project directory. On Wednesday, August 24, 2016 at 3:42:57 PM UTC+7, Lekan Wahab wrote: > > Thanks for getting back to me. > ​So, i just figure

Re: Celery task output

2016-08-24 Thread palansh agarwal
Hey, You need to refer the celery documentation. Whenever you submit a task to celery, it returns a uniques id for that task. Later you can use it to retrieve the results. This might help -> http://stackoverflow.com/questions/5544611/retrieve-a-task-result-object-given-a-task-id-in-celery Regards

Celery task output

2016-08-24 Thread Arshpreet Singh
I am adding few functions as celery task those are making calls to certain WebAPI, Parsing and filtering but returning results continuously. I want output of those results in my application view. Now I am not able to understand that how to get results of those functions in my application view when

Strange failing test

2016-08-24 Thread Gergely Polonkai
Hello, I have a test that fetches some JSON data from my API and compares it with the expected result, which is generated like this: expected_json = { 'status': 'ok', 'invalid-fields': {}, 'updated-fields': cloned_build.groupings.get(group=group1)

Re: Running Django Project Locally

2016-08-24 Thread Lekan Wahab
So, I have been handed the other part of the project which now contains everything except the manage.py file(which i have created). Also, the project is quiet old and some of the dependencies are either no longer being managed or don't exist anymore.(unobase for an example). As such, i was handed

Re: Running Django Project Locally

2016-08-24 Thread Mike Dewhirst
On 24/08/2016 6:42 PM, Lekan Wahab wrote: Thanks for getting back to me. ​So, i just figured *manage.py* would also require the *settings.py* which is missing now. What do i do about that? That depends. Is the system currently working? If so there will be a bunch of settings somewhere and

Re: Running Django Project Locally

2016-08-24 Thread Lekan Wahab
Thanks for getting back to me. ​So, i just figured *manage.py* would also require the *settings.py* which is missing now. What do i do about that? Lekan​ On Wed, Aug 24, 2016 at 8:48 AM, Mike Dewhirst wrote: > On 24/08/2016 5:23 PM, Lekan Wahab wrote: > >> Good morning, >> I was recently given

Re: Running Django Project Locally

2016-08-24 Thread Mike Dewhirst
On 24/08/2016 5:23 PM, Lekan Wahab wrote: Good morning, I was recently given  a django project to manage at work. However, i noticed the project has neither a django-admin.py or a manage.py file. Is that normal? There is usually a manage.py file in the root of the project. django-admin.py is

Re: Running Django Project Locally

2016-08-24 Thread Asad Jibran Ahmed
Hi, It's definitely weird to not have a manage.py since all new Django projects should have it by default. But the manage.py file is pretty simple, and you can just paste this inside a new manage.py: #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefaul

Running Django Project Locally

2016-08-24 Thread Lekan Wahab
Good morning, I was recently given a django project to manage at work. However, i noticed the project has neither a django-admin.py or a manage.py file. Is that normal? If it is, how do i run the project on my local machine for testing purposes? The file structure is something like this: Project