New app crashes the project on server

2012-02-24 Thread shartha
Hi, Is there any reason whenever I add an app to my application using "python manage.py startapp", add the app name to my INSTALLED_APP, sync my database, and restart my application, I get the 502 Bad Gateaway Error? I didn't have this problem locally. The debugger returns this for an app

Re: Saving Django User in Form

2012-02-24 Thread DF
I tried that before your answer arrived and it worked like a charm. I just excluded the author field from the form and kept everything else the same. It works perfectly, as the user was already passed to the author field in the view. A logged in user can now automatically post a story now through

Re: Saving Django User in Form

2012-02-24 Thread Shawn Milochik
Read the Django docs about ModelForms, then use the 'exclude' kwarg to exclude the author from your ModelForm. Then, use request.user to get the appropriate user in your view and pass that to the form save(), which you must override to accept the extra argument, and use that user in the save()

Re: Setup a webserver that handles user input

2012-02-24 Thread Shawn Milochik
Certainly. People do it all the time. https://github.com/ask/django-celery Celery is probably the main way to go, and django-celery makes it super-simple to set up. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

column "cms_pagemoderatorstate.id" must appear in the GROUP BY clause

2012-02-24 Thread Dmitrijs Ledkovs
Hello, I've upgraded from Django 1.0.1 to 1.3.1 and from django-cms 2.0.2 to 2.2. Everything seems to work. But if I go to: http://localhost:8000/admin/cms/page/ I get traceback that commit was aborted with the following in my postgresql log. Any ideas on how to fix this? 2012-02-25

Setup a webserver that handles user input

2012-02-24 Thread Gianluca
Hi! I was wondering whether Django can be used to setup a webserver that can handle a user request and send a job to a backend queue. Specifically, I want to setup a frontend website through which a user enters the coordinates of protein atoms (a text based PDB file). This input is then used to

Saving Django User in Form

2012-02-24 Thread DF
I'm currently working on my first Django app, which allows registered users to submit content through a basic form. It works thus far with one caveat: when the form is displayed, the user ("Author") is presented with a drop-down list of all users instead of automatically populating that field

Re: Is GeoDjango Too Much For This?

2012-02-24 Thread Alex Mandel
On 02/23/2012 09:54 PM, kenneth gonsalves wrote: On Thu, 2012-02-23 at 17:13 -0800, DF wrote: I've been reading a bit about GeoDjango and it sounds intriguing. A colleague, though, suggested everything that can be done using GeoDjango is equally efficient utilizing the Google Maps API with

Re: problem with conditional form

2012-02-24 Thread Len De Groot
Thanks. I'll give that a shot... On Feb 24, 12:17 pm, Michael Elkins wrote: > On Fri, Feb 24, 2012 at 10:21:23AM -0800, Len De Groot wrote: > >I added a model to set the form-type to "0" or "1" which corresponds > >to "Long form" and "Short form" > > >When I create a new long

Re: problem with conditional form

2012-02-24 Thread Michael Elkins
On Fri, Feb 24, 2012 at 10:21:23AM -0800, Len De Groot wrote: I added a model to set the form-type to "0" or "1" which corresponds to "Long form" and "Short form" When I create a new long form and add the following to the form page template I get the expected answer:

Issue with relational /absolute {{url}} call

2012-02-24 Thread Eli_West
Ive ran into an issue calling: {{ modelxx.objectyy.url }} Before some recent edits, that call gave a relative path and I used: /site_media/{{ modelxx.objectyy.url }} to get a full file path. After some site changes the .url gives a full path and a double prefix of :

problem with conditional form

2012-02-24 Thread Len De Groot
Hi all, I find myself struggling to make a shorter version of a form. I am a newb so I apologize in advance for my ignorance. Our web master left for greener pastures and since I'm the only one with any programming experience, I have been forced to take over until we hire a replacement. So… I

Re: default folder structure in 1.4 beta

2012-02-24 Thread Dominic Montreuil
I hadn't performed a clean install. After downloading the beta, I had extracted it and I was running it from the from folder (~/Downloads/ Django-1.4b1/django/bin/django-admin.py). So, after reading your reply I uninstalled django from my dist- packages and performed a clean install as suggested.

Re: default folder structure in 1.4 beta

2012-02-24 Thread Ramiro Morales
On Fri, Feb 24, 2012 at 1:24 PM, Dominic Montreuil wrote: > Using the 1.4 beta on my workstation to perform a startproject yields > a different result than what I was expecting. > > I end up with: > __init__.py > manage.py > settings.py > urls.py > mysite/ >    

default folder structure in 1.4 beta

2012-02-24 Thread Dominic Montreuil
Using the 1.4 beta on my workstation to perform a startproject yields a different result than what I was expecting. I end up with: __init__.py manage.py settings.py urls.py mysite/ __init__.py settings.py urls.py When according to the documentation @

Re: Django ExtraField

2012-02-24 Thread coded kid
Sorry, How will I set that? is it from the template? On Feb 24, 4:29 pm, Marcos Moyano wrote: > You can set a hidden input widget to the form field. > > Rgds, > Marcos > > > > > > > > > > On Fri, Feb 24, 2012 at 11:26 AM, coded kid wrote: > > Hi

Re: Django ExtraField

2012-02-24 Thread Marcos Moyano
You can set a hidden input widget to the form field. Rgds, Marcos On Fri, Feb 24, 2012 at 11:26 AM, coded kid wrote: > Hi guys, How can I get rid of the field that's beside django comment > textarea? (the field, if users fill the field[honeypot] the users > comment

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread richard
Thanks tom, that worked and now understand what i was doing wrong. much appreciated. On Feb 24, 7:08 am, Tom Evans wrote: > On Fri, Feb 24, 2012 at 2:55 PM, richard wrote: > > Hi Tom, > > > Thanks for your reply. So for clarity i thought i

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread Tom Evans
On Fri, Feb 24, 2012 at 2:55 PM, richard wrote: > Hi Tom, > > Thanks for your reply. So for clarity i thought i was getting the > userprofile to pass into the bound form so that the userprofile_id in > the UserProfilePic would get populated/saved. as if i leave the >

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread richard
Hi Tom, Thanks for your reply. So for clarity i thought i was getting the userprofile to pass into the bound form so that the userprofile_id in the UserProfilePic would get populated/saved. as if i leave the instance as None then i get an error saying that userprofile_id cannot be empty? also, is

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread Tom Evans
On Fri, Feb 24, 2012 at 2:20 PM, richard wrote: > Hi, Am i doing this in the correct way? > […] > > any help would be greatly appreciated. > > […] > > from .models import UserProfilePic > class UserProfilePicForm(ModelForm): >    class Meta: >        model =

Django ExtraField

2012-02-24 Thread coded kid
Hi guys, How can I get rid of the field that's beside django comment textarea? (the field, if users fill the field[honeypot] the users comment will be marked as spam) I hope you get my point? Below is my code: comments/form.html {% if user.is_authenticated %} {% csrf_token %}

help needed with multiple profile images with UserProfile

2012-02-24 Thread richard
Hi, Am i doing this in the correct way? I am trying to accomplish a UserProfile having multiple profile images. IE if a user uploads a profile photo it gets saved as the default profile pic but if they upload another pic then that becomes the default pic but i need to keep records of all the

Is there a orded ModelMultipleChoiceField ?

2012-02-24 Thread fabby bobby
Hello everyone, I was writing a website, and meet a problem. I want users select some instances from a model , and want to print them in order. I integrate it with a jquery plugin( http://code.google.com/p/jquery-asmselect/) ,and users can select some instances and they can change the order

Re: Django and social network

2012-02-24 Thread bobhaugen
Another angle on virtualenvs: if you install http://www.doughellmann.com/projects/virtualenvwrapper/ you will find them much much easier to use. You might even begin to like them, as many others have. Takes a little getting used to, though, like anything else that is different. -- You received

Django Admin base.html error

2012-02-24 Thread Timothy Makobu
I think I just stumbled onto a Django Admin base.html bug. Here is the stack-trace: http://dpaste.org/fYuEw/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe