Re: Can't make ManyToMany form fields hidden

2015-03-06 Thread Eric Abrahamsen
Collin Anderson writes: > https://code.djangoproject.com/ticket/24453 For posterity: I should have been using a forms.MultipleHiddenInput widget for the ManyToManyField, rather than a plain old forms.HiddenInput. > On Wednesday, March 4, 2015 at 12:40:40 AM UTC-5, Eric

Re: Django OperationalError

2015-03-06 Thread Petar Pilipovic
Hello Collin, No the problem is, i have tried to drop mine migrations whit python manage sqlflush, then I have recreate the db whit python manage.py migrate. Here this is the all operation whit python manage sqlflush, syncdb, migrate . I have notice that there was no migration

Re: Django Admin Page

2015-03-06 Thread Collin Anderson
Hi, That's odd. Maybe try updating django? It looks like you're using 1.8 pre-alpha from 3 months ago. Collin On Friday, February 20, 2015 at 1:40:03 AM UTC-5, Tim Co wrote: > > Hello, > > We are trying to run a local development server for our django python app. > We are able to connect to

Re: how pass get parameter django bootstrap pagination

2015-03-06 Thread Collin Anderson
Hi, If you have the request context processor installed, you can do this: {% bootstrap_paginate object_list range=request.GET.range %} Collin On Thursday, March 5, 2015 at 4:35:33 AM UTC-5, SHINTO PETER wrote: > > {% load bootstrap_pagination %} > {% bootstrap_paginate object_list range=10

Re: getting tuples from http request.GET

2015-03-06 Thread Collin Anderson
Hi, Normally query arguments are separated by &. If you're able to send the data like this: https://mydesktop.com/validator?hostname1=host1.example.com=ca=2.2.2.2=host2.example.com=wa=3.3.3.3 Then you could do something like: data = [] i = 0 while True: i += 1 try:

Re: what do you think about django FORM system?

2015-03-06 Thread younger.shen
Hello everyone: you may have your own opinions, i read the letters all above , the point of why i think the form of django is hard to use is that the form do 2 kinds of things , first is to build html , secnod is to validate , i never build html in backend it is not good practice , and i really

Re: Rolling back to practice on old bugs

2015-03-06 Thread Collin Anderson
Hi, I always type: PYTHONPATH=.. ./runtests.py Collin On Wednesday, March 4, 2015 at 4:30:54 PM UTC-5, Javis Sullivan wrote: > > I am following this tutorial here > "Writing your > first Django patch" and while it directs me to

Re: Populating Django app db with JSON data

2015-03-06 Thread Collin Anderson
Hi Sandeep, A snapshot (or at least a diff from the previous one) is stored when you run makemigrations. Collin On Wednesday, March 4, 2015 at 2:15:41 PM UTC-5, Murthy Sandeep wrote: > > Hi > > thanks for the info. > > The docs also say that RunPython runs “custom Python code > in a

Re: Django(1.7) admin - separate user-profile section

2015-03-06 Thread Collin Anderson
Hi, If you just add a custom __str__ (or __unicode__ on py2) it might do what you want. def __str__(self): return str(user) Otherwise, in UserTokenAdmin, set list_display = ['user'] Collin On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Flemming Hansen wrote: > > Hi all, > > I need to

Re: Fatal Error in initializing sys standard streams

2015-03-06 Thread Vijay Khemlani
Your first command (wget ...) failed because wget does not exist on Windows I think weakrefset is available in pip, why not try to install it that way? On Fri, Mar 6, 2015 at 9:36 PM, Collin Anderson wrote: > Hi, > > That doesn't look good :) > > Maybe try reinstalling

Re: Django 1.7 tutorial part 4, url

2015-03-06 Thread Collin Anderson
Hi, That seems strange. The error says that there's no question with id=1. Are you sure there's a question with id=1? The ending slash seems important to me. I don't know why it would work without it. Collin On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Daniel Altschuler wrote: > > I ran

Re: Fatal Error in initializing sys standard streams

2015-03-06 Thread Collin Anderson
Hi, That doesn't look good :) Maybe try reinstalling python. Collin On Wednesday, March 4, 2015 at 11:11:12 AM UTC-5, sriraag paawan wrote: > > > Hello Guys, > > I am new to Django.. i am using Django 1.7.4 and Python 3.4 > > I was about to complete Django tutorial part-5 about tests but a

Re: Can't make ManyToMany form fields hidden

2015-03-06 Thread Collin Anderson
https://code.djangoproject.com/ticket/24453 On Wednesday, March 4, 2015 at 12:40:40 AM UTC-5, Eric Abrahamsen wrote: > > Hi, > > I'm making some heavily customized model formsets, to encourage my users > to input data. Mostly that involves cutting down the number of huge > drop-down menus they

Re: Existing database - new project

2015-03-06 Thread john
I'm not sure this is of help but I took was the easy way out. In my models.py for each of my models.Model I added Class Meta: managed = False That worked for me - the existing database tables were not touched. Johnf On 03/06/2015 01:18 PM, Robert Daniels wrote: I understand it is

Re: what do you think about django FORM system?

2015-03-06 Thread john
On 03/06/2015 12:28 PM, felix wrote: I'm using Django 1.9 and Bootstrap v3.3.1 I did know there was a Django 1.9 I tried several ways but whatever I was doing the form field size did not change for me. But I started using crispy-forms and using their layout stuff allowed everything I

Re: Django OperationalError

2015-03-06 Thread Collin Anderson
Hi, The problem is that django_session doesn't exist in your database. Either it was never created or it was created and then later deleted. Does running manage.py migrate re-create it? Collin On Monday, March 2, 2015 at 11:36:51 PM UTC-5, Petar Pilipovic wrote: > > Hello James, sorry for not

Re: django Search page

2015-03-06 Thread Collin Anderson
Hi, You'll need to use javascript for that. Collin On Monday, March 2, 2015 at 2:27:35 AM UTC-5, Sabeen Sha wrote: > > which is the best way to implement the following:: > i will be having a text box and a Add button > > Along with a table below it containing headers class >

Re: [1.8] MultiHost with template dir per Host

2015-03-06 Thread Collin Anderson
Hi, You might need to modify the template engine directly. Collin On Sunday, March 1, 2015 at 6:31:57 PM UTC-5, Neyoui wrote: > > Hi, > > I had create a middleware, that is able to change the template directory > per host on the fly. > But it stopped working since I upgraed to Django 1.8 and I

Existing database - new project

2015-03-06 Thread Robert Daniels
I understand it is possible to use an existing database on a new Django project. As I see it, I have 2 choices. 1 - Use the existing database and deal with it in that fashion. or 2 - Create a new project to store the same type of data as if there were no existing database, Then write a

Re: what do you think about django FORM system?

2015-03-06 Thread felix
El 06/03/15 11:22, john escribió: I saws that to in the Doc's - it did not work for me with bootstrap. I did not find the cause - if there wasn't some sort of bug. I'm using Django 1.7.5 so I'll guess and say it had something to do with the interaction of the two. I have moved on to

Re: Future for Django, Jobs, Confused :/

2015-03-06 Thread Alan Ávalos Hernández
Also, it's important to always understand the core concepts of what you're doing. Programming languages and frameworks are tools to get the job done. Those come and go. But if you really have a good grasp of the theory behind those, only certain details are going to have a relevant role in your

Re: Sharing templates across multiple projects

2015-03-06 Thread Ilya Kazakevich
I like Simon's ideas about shared location and separate app (Django encourages us to use apps to share anything), but you also may share them on VCS level. SVN supports "external" checkout, in git you may add one repository to another. \project1\templates\shared_temps

Re: Sharing templates across multiple projects

2015-03-06 Thread Simon Charette
Hi John, I suggest you put the templates you want to share in a location accessible by your multiple projects and add this directory to your TEMPLATE_DIRS setting. Make sure you have

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

2015-03-06 Thread Carl Meyer
On 03/06/2015 11:23 AM, Ilya Kazakevich wrote: > You may start from highest level testing: > 1) create "usage scenarios" for your website. Like "customer opens page > 'foo', and should see 'bar'". You use such scenarios for manual testing, > right? > 2) code such scenarios against Django project.

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

2015-03-06 Thread Ilya Kazakevich
You may start from highest level testing: 1) create "usage scenarios" for your website. Like "customer opens page 'foo', and should see 'bar'". You use such scenarios for manual testing, right? 2) code such scenarios against Django project. You may use BDD testing tools (like lettuce or

Re: how to deal with not translated strings in html

2015-03-06 Thread Ilya Kazakevich
What is the point of NOT translating "month" to English? There are several solutions: 1) Create custom templates / custom tags and include them based on language. For example you may have "foo.nl.html" and "foo.en.html" and include "foo..html". But I believe using different HTMLs for

Re: Future for Django, Jobs, Confused :/

2015-03-06 Thread Ilya Kazakevich
You never know what would be popular in next several years. In late 90th Perl was the main web development language. In 2000th it was PHP. Now it is Ruby and Python. If you love Python, use Django but study Ruby/RoR in background. Ruby is not rocket science and you should not have any serious

Sharing templates across multiple projects

2015-03-06 Thread JHeasly
Hello — I'm looking for any blogposts/best practices for deploying a common set of templates across multiple Django projects. My initial impulse is to just make a master Github repo of the template and pull it into each of the projects. Are there better approaches? TIA, John -- You received

Re: Python / Django slow ? Deciding my next technological stack

2015-03-06 Thread Ilya Kazakevich
In modern world any heavy loaded site should have HORIZONTAL SCALING. That means it should support scale by adding new servers to cluster. With horizontal scaling you should not care about how python is slow on each node, until you have traffic like Facebook or Guthub have. I believe 99%

Re: How to save user to foreignKey field for new records in modelFormset case?

2015-03-06 Thread Collin Anderson
Hi, The form doesn't have access to the current user. I'd attach it using the view. Thanks, Collin On Wednesday, February 25, 2015 at 3:53:40 AM UTC-5, Mike wrote: > > Hi, > I have created modelFormset using SchoolHistory model and SchoolForm form. > > "SchoolFormSet =

Re: what do you think about django FORM system?

2015-03-06 Thread john
I saws that to in the Doc's - it did not work for me with bootstrap. I did not find the cause - if there wasn't some sort of bug. I'm using Django 1.7.5 so I'll guess and say it had something to do with the interaction of the two. I have moved on to crispy-forms and all seems to work. But

Re: what do you think about django FORM system?

2015-03-06 Thread felix
El 06/03/15 10:20, john escribió: OK I realize you are saying I should read the doc's. So I will provide exactly what I'm saying from the doc's. Django handles three distinct parts of the work involved in forms: * preparing and restructuring data ready for rendering * creating HTML forms

Re: what do you think about django FORM system?

2015-03-06 Thread john
OK I realize you are saying I should read the doc's. So I will provide exactly what I'm saying from the doc's. Django handles three distinct parts of the work involved in forms: * preparing and restructuring data ready for rendering * creating HTML forms for the data * receiving and

Re: what do you think about django FORM system?

2015-03-06 Thread john
OK for example how can I set the size of "widget"? What I really want is some doc that provides an example - I've searched with no results. I ended up with using a real HTML on the template along with the rest of the django objects. Johnf On 03/06/2015 07:03 AM, aRkadeFR wrote: So you're

Re: what do you think about django FORM system?

2015-03-06 Thread felix
El 06/03/15 09:38, john escribió: I can tell you what I found to be hard to understand (and I don't think I do understand at the moment) that is how to set the HTML, the types, ID, and any of the special attributes of the object. I understand that I can sub-class but it's also my

Re: what do you think about django FORM system?

2015-03-06 Thread aRkadeFR
So you're problem is not about forms but widgets. The widget are the object that render a field form. You can subclass it to render it in anyway you want. What do you don't like in subclassing a widget/model ? On 03/06/2015 03:38 PM, john wrote: I can tell you what I found to be hard to

Re: Gunicorn sock file is missing?

2015-03-06 Thread aRkadeFR
On 03/06/2015 01:30 PM, Kaloian wrote: Hi Erik, and thanks for the help. Well it appears to be a permission issue after all, but I really cannot understand why. I tried to change the directory for the sock file from /webapps/my-app/run/gunicorn.sock to /sockets/gunicorn.sock and gunicorn

Re: Future for Django, Jobs, Confused :/

2015-03-06 Thread Ismael Ezequiel
thak Em quarta-feira, 4 de março de 2015 16:15:32 UTC-3, Ismael Ezequiel escreveu: > > Estou confuso que escolha "framework" para o desenvolvimento web, eu adoro > Python. como é o futuro para Django, eu passar um tempo estudando muito > Django. Eu vejo mais empregos para Ruby on Rails que

Re: what do you think about django FORM system?

2015-03-06 Thread john
I can tell you what I found to be hard to understand (and I don't think I do understand at the moment) that is how to set the HTML, the types, ID, and any of the special attributes of the object. I understand that I can sub-class but it's also my understanding that I shouldn't have too. For

Re: what do you think about django FORM system?

2015-03-06 Thread felix
El 06/03/15 05:37, younger.shen escribió: Hello everyone: i use django since last year, and now i can not stand the django form any more, hard to use , especially custom error message , i use laravel for php development , and validator of laravel is very easy to use and very clean code , so

Re: Where to post documentation suggestions?

2015-03-06 Thread Sakari Ellonen
https://docs.djangoproject.com/en/dev/internals/contributing/ Here it says that you can report bugs in the ticket tracker, but no mention about docs and tickets. There is a page for improving documentation, but it leads to a guide about how to use Sphinx etc., which feels scary for someone who

Re: Django Admin Page

2015-03-06 Thread ebuild
Check django1.8 compatibility with python2.7 On Friday, February 20, 2015 at 7:40:03 AM UTC+1, Tim Co wrote: > > Hello, > > We are trying to run a local development server for our django python app. > We are able to connect to our localhost index and get the "It Worked!" > Dango page. However

Re: Gunicorn sock file is missing?

2015-03-06 Thread Kaloian
Hi Erik, and thanks for the help. Well it appears to be a permission issue after all, but I really cannot understand why. I tried to change the directory for the sock file from /webapps/my-app/run/gunicorn.sock to /sockets/gunicorn.sock and gunicorn started normally. I tried to give full

Re: what do you think about django FORM system?

2015-03-06 Thread Tom Evans
On Fri, Mar 6, 2015 at 10:37 AM, younger.shen wrote: > Hello everyone: > > i use django since last year, and now i can not stand the django form any > more, hard to use , especially custom error message , i use laravel for php > development , and validator of laravel is

Re: what do you think about django FORM system?

2015-03-06 Thread aRkadeFR
Hello It's pretty easy to use django forms after reading the docs. And django form are well integrated with the whole django framework. You have multiple layers of cleaning the form, from the widget to the model, and I love that. Could you provide us more in-deapth of your feeling using the

what do you think about django FORM system?

2015-03-06 Thread younger.shen
Hello everyone: i use django since last year, and now i can not stand the django form any more, hard to use , especially custom error message , i use laravel for php development , and validator of laravel is very easy to use and very clean code , so i hack a small plugin .

Re: TemplateSyntaxError with {% cycle "Hello, how are you?" "Fine!" %}

2015-03-06 Thread Alasdair Nicol
On 05/03/15 17:23, Carsten Fuchs wrote: If you use single quotes and render the template, it outputs 'Hello', not 'Hello, how are you?' as expected. As expected? Why please? Docs say that with single or double quotes, the values are treated as string literals. Sorry, I wasn't clear. By 'as

Re: attaching an app to site via apphook fails. server crashes only (beginner question)

2015-03-06 Thread inoyon artlover KLANGRAUSCH
Many thanks for the answer. "python manage.py runserver --traceback" dumps: http://pastebin.com/yeC7zkpf and python manage.py cms check gives no errors Am Freitag, 6. März 2015 10:13:37 UTC+1 schrieb Erik Cederstrand: > > > > Start på videresendt besked: > > *Dato: *6. mar. 2015 kl.

Fwd: attaching an app to site via apphook fails. server crashes only (beginner question)

2015-03-06 Thread Erik Cederstrand
> Start på videresendt besked: > > Dato: 6. mar. 2015 kl. 09.49.01 CET > Fra: inoyon artlover KLANGRAUSCH > Til: django-users@googlegroups.com > Emne: attaching an app to site via apphook fails. server crashes only > (beginner question) > > I created a site and

attaching an app to site via apphook fails. server crashes only (beginner question)

2015-03-06 Thread inoyon artlover KLANGRAUSCH
Hi there, regarding the django-cms tutorial I put this file into the 'polls' app: *cms_app.py* rom cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class PollApp(CMSApp): name = 'Poll App' urls = 'polls.urls' apphook_pool.register(PollApp) I created a site and