Re: Django Documentation 1.7 shows "django-admin.py" whereas it should be "django-admin"

2015-03-04 Thread James Schneider
Not technically a bug, although it is a common point of confusion. It depends on how you installed Django. Both perform the same function on their respective systems. There's a note with this link on the first page of the tutorial, although admittedly I believe they should be more explicit with

Django Documentation 1.7 shows "django-admin.py" whereas it should be "django-admin"

2015-03-04 Thread Deep Sukhwani
Hi, I am a newbie to this community and I am not sure how should I submit this bug/error in 1st part of Django Tutorial. Here's the error: On page Writing your first Django app, part 1 | Creating a project notice it

Re: Prefetching a single item

2015-03-04 Thread Simon Charette
I agree it's a bit devious, it took me a couple of minutes to figure out it would work for this particular use case. Ideally there would a kwarg to Prefect that does the limiting automatically, something like: SELECT train.id, s.* FROM train LATERAL JOIN ( SELECT * FROM seat WHERE

Django CMS 3.0.12 Released!

2015-03-04 Thread Martin Koistinen
*Django CMS 3.0.12 Released!* This quick-cycle release fixes a regression discovered by a user shortly after the release of 3.0.11. -- 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

getting tuples from http request.GET

2015-03-04 Thread Sunil Sawant
Hi Guys, Pretty new to Django, but used it blindly and works wonders. But here is a situation I am blocked at now for a new project I request.GET the following URL

Data migration using RunPython

2015-03-04 Thread Murthy Sandeep
I am working on a data migration for my Django app to populate the main table in the db with data that will form the mainstay of the app - this is persistent/permanent data that may added to but never deleted. My reference is the Django 1.7 documentation and in particular an example on page

Re: File Upload, Download and Search Files

2015-03-04 Thread Vijay Khemlani
You can save files as part of models, for example using FileFields https://docs.djangoproject.com/en/1.7/ref/models/fields/#filefield Or you can handle them manually, for example using default_storage https://docs.djangoproject.com/en/1.7/topics/files/ Regarding File Search, I don't know,

Re: django doesnt wait for my time.sleep

2015-03-04 Thread Vijay Khemlani
Also, why would matplotlib return without having finished its job? On Wed, Mar 4, 2015 at 2:58 PM, Bill Freeman wrote: > Sleeping in a web server, which potentially has many users, is considered > bad form, even if it works. A better place for such time outs is in >

Re: Future for Django, Jobs, Confused :/

2015-03-04 Thread Andrew Farrell
One thing to keep in mind is that there are more fields using primarily python than using primarily ruby. A company that that does primarily scientific computing in python may not advertise jobs in Django or Flask. However, when they need to build a web interface for something, they will reach for

Re: Future for Django, Jobs, Confused :/

2015-03-04 Thread Javier Guerra Giraldez
On Wed, Mar 4, 2015 at 5:40 PM, François Schiettecatte wrote: > commit to learning a new one every couple of years (or more often if you can). this. even if I write Python as a requisite when hiring, I expect any new recruit to be able to pick languages as needed. Of

Re: Future for Django, Jobs, Confused :/

2015-03-04 Thread François Schiettecatte
If the question is What Do I Invest In? Then the answer is to learn enough tools to be able to develop a full stack (JavaScript, HTML, Django, Python, MySQL/Postgres/Other), and expect that you will be learning new things all the time. I picked Django because I settled for Python rather than

Re: Fixing a poorly written Django website (no unit tests)

2015-03-04 Thread Mike Dewhirst
On 4/03/2015 11:01 PM, Some Developer wrote: Hi, I've been working on a Django website for about 2 months on and off and am nearing the end of development work where I can start thinking about making it look pretty and the after that deploy to production. I've been doing lots of manual testing

Re: Test, RunPython, Datamigrations with Django 1.7.5

2015-03-04 Thread sam
Well, answer is here: https://docs.djangoproject.com/en/1.7/topics/testing/overview/#rollback-emulation Need to use serialized_rollback = True in TransactionTestCase Le mercredi 4 mars 2015 18:24:34 UTC+1, sam a écrit : > > Hello, > > I have an issue trying to run tests. > My application use a

Re: Future for Django, Jobs, Confused :/

2015-03-04 Thread Avraham Serour
so what is the question? On Tue, Mar 3, 2015 at 2:34 AM, Ismael Ezequiel wrote: > I'm confused what "framework" choice for web development, I love Python. > as is the future for Django, I spend a lot time studying Django. I see more > jobs for Ruby on Rails than Django

Django CMS 3.0.11 Released!

2015-03-04 Thread Martin Koistinen
*Django CMS 3.0.11 Released!* This is mostly a bug-fix release, but there's at least one very interesting thing added: better support for using the same application in multiple apphooks! Using this combined with aldryn-apphooks-config () you can use a single app in multiple places in your

Re: Can't run django!

2015-03-04 Thread Bill Blanchard
Can we see a sanitized version of your settings file? My guess is there's probably a typo in there somewhere. On Mon, Mar 2, 2015 at 10:44 AM, David Zahedi wrote: > Hi there, > > I am using python 2.7 and django 1.75; when I run "manage.py runserver" I > get the following

Rolling back to practice on old bugs

2015-03-04 Thread Javis Sullivan
I am following this tutorial here "Writing your first Django patch" and while it directs me to rollback to this 39f5bc7fc3a4bb43ed8a1358b17fe0521a1a63ac

Re: Prefetching a single item

2015-03-04 Thread Ram Rachum
Thanks Simon! That worked. I would say it's a bit devious though, and it was nice if there was a method that didn't use `distinct`, which has its own issues. (And can't be used for any number of items other than 1 in this case.) On Tue, Mar 3, 2015 at 7:15 AM, Simon Charette

Re: [1.7] Django Admin - Secondary, extended user-admin

2015-03-04 Thread Thomas Rega
https://github.com/jpulgarin/django-tokenapi ? 2015-03-02 17:47 GMT+01:00 Flemming Hansen : > Hi all, > > I need to set up a passwordless login system using tokens, and I need to > manage it from the admin backend. > > Simplified, the tokens need to be set for a user (one

Re: Can't run django!

2015-03-04 Thread Andrew Farrell
You might see if DEBUG is being set to False in an unexpected location by using the silver searcher (also on windows ) to quickly search for a string in a directory tree. $ ag DEBUG within your

Re: Can't run django!

2015-03-04 Thread James Schneider
Is there a possibility of having more than one settings file? If so, ensure that your manage.py is pointing at the right settings file. The output of 'manage.py runserver' should also show the dotted path of the settings file that it is using just before that error is displayed (I believe). You

Re: Custom lookup field for text comparison in Django 1.6

2015-03-04 Thread Simon Charette
Hi Jorgue, As you already know there's no officially supported API to create custom lookups in Django < 1.7 However it's possible to get something working by monkey patching WhereNode.make_atom. Here's an example GIST that expose a

Re: RoR dev having trouble with finding best-packages for Django

2015-03-04 Thread Daniel França
... And you can compare On Wed 4 Mar 2015 at 20:33 Daniel França wrote: > 4. Have you tried https://www.djangopackages.com/ ? > It has some sections with grids that shows several information about each > one > On Wed 4 Mar 2015 at 20:30 Avraham Serour

Re: RoR dev having trouble with finding best-packages for Django

2015-03-04 Thread Daniel França
4. Have you tried https://www.djangopackages.com/ ? It has some sections with grids that shows several information about each one On Wed 4 Mar 2015 at 20:30 Avraham Serour wrote: > 1 - built in > 2 - buit in > 3 - I like all-auth > 4 - pypi > 5 - go for python 3, unless you

Re: RoR dev having trouble with finding best-packages for Django

2015-03-04 Thread Avraham Serour
1 - built in 2 - buit in 3 - I like all-auth 4 - pypi 5 - go for python 3, unless you need some library that only supports python 2 always use the last minor version of django, keep an eye for django 1.8 it should be out soon On Wed, Mar 4, 2015 at 6:10 AM, Jatin Ganhotra

Re: RoR dev having trouble with finding best-packages for Django

2015-03-04 Thread Andreas Kuhne
Hi, I'll give you answers to the questions I know, the others you'll have to wait for others more knowledgable. 1. User authentication, django has django.contrib.auth built in. Checkout https://docs.djangoproject.com/en/1.7/topics/auth/ 2. User authorization, also in the auth package. You can

RoR dev having trouble with finding best-packages for Django

2015-03-04 Thread Jatin Ganhotra
Hi, I have done web development with Ruby on Rails and now I'm learning to use Django for a web application, where I facing some issues finding the best libraries/ packages available. What are the best packages/apps in Django available for the following: 1. User authentication - Rails offers

Django 1.7 tutorial part 4, url

2015-03-04 Thread Daniel Altschuler
I ran into the following problem with the tutorial. When I'm at http://127.0.0.1:8000/polls/1/, I get the expected page: What's up? Not much The sky However when I try to vote I get the error Page not found (404)Request Method:POSTRequest URL: http://127.0.0.1:8000/polls/1/vote/ No

Re: Form In modal

2015-03-04 Thread luis zarate
Fast solution: In Javascritp you can do this: element = document.getElementById("myinput"); window.open("http://127.0.0.1:8000/consulta/?consulta="+element.value, "MsgWindow", "width=200, height=100"); but continue reading Are you use ajax? If the answer is not, then see

File Upload, Download and Search Files

2015-03-04 Thread New@Django
Hi! I am just starting to use Django. I would like to know if anyone could point me in the direction for having the following capability: - File Storage System (Upload, Download, Delete) - File Search Thank you! -- You received this message because you are subscribed to the Google Groups

Re: Using proxy kind of Table in Admin Interface

2015-03-04 Thread luis zarate
Maybe you can use get_queryset in the admin class and replace the query manager ref: https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_queryset https://docs.djangoproject.com/en/1.7/topics/db/managers/ you can do something like this: def

Django(1.7) admin - separate user-profile section

2015-03-04 Thread Flemming Hansen
Hi all, I need to make a `passwordless` token system, and want to have a "Home › Passwordless › User tokens" in the Admin section. For the "User tokens" `list_display` I need all the "Users". (I do _not_ want to display the token information on the regular "User"-admin as just an extended

Re: Populating Django app db with JSON data

2015-03-04 Thread Murthy Sandeep
Hi thanks for the info. The docs also say that RunPython runs “custom Python code in a historical context”. What does that mean exactly? It seems related to the apps and schema_editor arguments passed to the custom method that will be called by RunPython - is this something like a snapshot of

Future for Django, Jobs, Confused :/

2015-03-04 Thread Ismael Ezequiel
I'm confused what "framework" choice for web development, I love Python. as is the future for Django, I spend a lot time studying Django. I see more jobs for Ruby on Rails than Django :/ Sorry my english. Thanks. -- You received this message because you are subscribed to the Google Groups

Can't run django!

2015-03-04 Thread David Zahedi
Hi there, I am using python 2.7 and django 1.75; when I run "manage.py runserver" I get the following error: CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False. An exception has occurred, use %tb to see the full traceback. My DEBUG is True. Thanks -- You received this

[1.7] Django Admin - Secondary, extended user-admin

2015-03-04 Thread Flemming Hansen
Hi all, I need to set up a passwordless login system using tokens, and I need to manage it from the admin backend. Simplified, the tokens need to be set for a user (one user, one authenticate token, many authorize tokens). In the site admin interface I need "User tokens" to be its own

Custom lookup field for text comparison in Django 1.6

2015-03-04 Thread Jorge Arévalo
Hello, I'm trying to emulate a non-spaces-all-lower text comparison filter in Django 1.6.x. In other words, I want the equivalent to this query select * from myapp_mymodel where replace(lower(str), " ", "") = '' Being my model something like this from django.db import models class

Free Django Video Tutorials

2015-03-04 Thread Deep Sukhwani
Thanks Mike, Just starting with introduction tutorials. Very helpful.. -- 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

Re: django doesnt wait for my time.sleep

2015-03-04 Thread Bill Freeman
Sleeping in a web server, which potentially has many users, is considered bad form, even if it works. A better place for such time outs is in JavaScript in the browser. Some designs use a view that the JavaScript (or user) can poll to determine when the resource is available. On Wed, Mar 4,

Re: django doesnt wait for my time.sleep

2015-03-04 Thread Erik Cederstrand
> Den 04/03/2015 kl. 18.03 skrev dk : > > i am using matplotlib to generate a plot/graph, even do that python is > generating the file and saving it so I can use it later on in my web page, > django show the page before the process finish, > so I decided to put a

Test, RunPython, Datamigrations with Django 1.7.5

2015-03-04 Thread sam
Hello, I have an issue trying to run tests. My application use a migration to have default fixtures (created using migrations.RunPython from a migration file). The problem is when I launch manage.py test, the fixtures from the migration are created on the "production" database and not on the

django doesnt wait for my time.sleep

2015-03-04 Thread dk
i am using matplotlib to generate a plot/graph, even do that python is generating the file and saving it so I can use it later on in my web page, django show the page before the process finish, so I decided to put a time.sleep(3) so it wait 3 sec while all this happen, but doesn't respect

Fatal Error in initializing sys standard streams

2015-03-04 Thread sriraag paawan
it.. Thank You in Advance <https://lh3.googleusercontent.com/-AWF1e83nc44/VPcufVnO7FI/AW4/jcPR86p02ZA/s1600/capture-20150304-213134.png> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Fixing a poorly written Django website (no unit tests)

2015-03-04 Thread Dan Gentry
No need to test the Django provided logic, but I like to write a few tests for each view that check the permissions, urls, updates, etc. More of a functional test than a unit test. I find that when these tests fail it is usually something changed somewhere else in the app. For example, a

Re: how to deal with not translated strings in html

2015-03-04 Thread Jaap van Wingerde
Op 2015-03-03T17:41:21 UTC schreef Jaap van Wingerde in the message , mid:20150303174121.024af...@jaap.custard.shrl.nl the following text. > ../locale/en/LC_MESSAGES/django.po: > > ... > #: template.html:4 > msgid "jaar" > msgstr "year" > > #: templates.html:4 >

Re: Fixing a poorly written Django website (no unit tests)

2015-03-04 Thread Avraham Serour
Manual testing takes time and are prone to errors because they are done by humans, automatic testing means that when changing something in the code you can just run the tests, you don't need to run the server, open the browser, click, click and see if something seems out of order, then open the js

Fixing a poorly written Django website (no unit tests)

2015-03-04 Thread Some Developer
Hi, I've been working on a Django website for about 2 months on and off and am nearing the end of development work where I can start thinking about making it look pretty and the after that deploy to production. I've been doing lots of manual testing and I'm sure that the website works

Re: icons let the template or resolve in the view?

2015-03-04 Thread aRkadeFR
If I get your request right, you want to display icons on each row of your table. In my projects, I'm using a font face. It's easy to use, scalable, and you don't need any {% static %} templatetags in your templates. Personnaly using icomoon to manage my icons. https://icomoon.io/app/ Then you