Re: To Django or not to Django

2013-11-24 Thread Nick Santos
I'd say the answer depends on your personal capabilities and objectives. "Best" tends to always be relative to what you know and your personal requirements as much as to you specific design requirements. Nothing you've said here sounds like it couldn't be done with a CMS and some plugins, and if yo

Re: How to use modpython in django version 1.5

2013-11-24 Thread Russell Keith-Magee
On Mon, Nov 25, 2013 at 1:39 PM, nobody wrote: > Hi, > > After version 1.5, django has disabled mod_python. Can we still use the > modpython instead of mod_wsgi? If so, how can we install the mod_python, > doesn't seem a package is available in Debian squeeze or wheezy. > No, you can't. The reas

How to use modpython in django version 1.5

2013-11-24 Thread nobody
Hi, After version 1.5, django has disabled mod_python. Can we still use the modpython instead of mod_wsgi? If so, how can we install the mod_python, doesn't seem a package is available in Debian squeeze or wheezy. Thank you. -- You received this message because you are subscribed to the Goog

Re: Render User Selected Communities (as Checkboxes) in Multiple Choice Form

2013-11-24 Thread JJ Zolper

Render User Selected Communities (as Checkboxes) in Multiple Choice Form

2013-11-24 Thread JJ Zolper
Hello, Hopefully it becomes clear as well from my code but, here is what is going on. There is an Athlete registration form which has a long list of choices or communities in the form of a multiple choices that the user can select to then become a part of the communities they select. Then what

Re: Editing html templates from front end

2013-11-24 Thread Mario Gudelj
In this case you need to store templates in db which means you need to have a custom loader for your templates. I think that this app does what you need https://pypi.python.org/pypi/django-dbtemplates Cheers, M On 25/11/2013 1:39 AM, "Harjot Mann" wrote: > In django Is there any way through whi

To Django or not to Django

2013-11-24 Thread zaptor999
Hi, I'm looking to build a contest website where there would be a challenge every so often where people need to post a video or a picture. Then all users can vote on them, and I can announce a winner. I would prefer maybe if people not actually upload to my site, but provide a link to youtube

Re: how to get at the manytomany fields in for

2013-11-24 Thread Daniel Roseman
No, that is incorrect. `dir_list` is a queryset of AdviceLevel objects, and `specialism` is a field defined directly on that model. You only need to add `_set` for a reverse relationship, which this isn't. -- DR. -- You received this message because you are subscribed to the Google Groups "Dj

Re: Form cleaned_data

2013-11-24 Thread Timothy W. Cook
On Sun, Nov 24, 2013 at 4:38 PM, Daniel Roseman wrote: > Hmm, I tried to post an answer to your original question earlier but it never > appeared. > Thanks Daniel. Your help is very much appreciated. > The reason why adding the values to `cleaned_data` doesn't work is that those > fields aren

Re: Form cleaned_data

2013-11-24 Thread Daniel Roseman
Hmm, I tried to post an answer to your original question earlier but it never appeared. The reason why adding the values to `cleaned_data` doesn't work is that those fields aren't in the `fields` list for the form in the first place, so it doesn't know to do anything with them. Adding them to t

Re: Form cleaned_data

2013-11-24 Thread Timothy W. Cook
SOLVED: (I think) Though I do not understand the how/why. From an example on StackOverflow I tried changing the post method to this: def post(self, request, *args, **kwargs): form = self.form_class(request.POST) if form.is_valid(): # paper = get_obj

Re: Translation from templates doesn't work.

2013-11-24 Thread Ramiro Morales
On Sun, Nov 24, 2013 at 4:21 AM, Shahar Or wrote: > String in my template don't translate. They stay English even though they do > pop up in the po files using `makemessages`. Do you comvert these -po files to .mo files using the compilemessages Django command or the msgfmt GNU gettext utility?

Re: Generate a random directory for files to be uploaded

2013-11-24 Thread Michael Manfre
There are two things that you'll need to do. Set the random directory name on the UpFile instance in the view and define a function to use with upload_to that uses the random directory name on the instance to define the file's target path. https://docs.djangoproject.com/en/dev/ref/models/fields

Editing html templates from front end

2013-11-24 Thread Harjot Mann
In django Is there any way through which we can edit the html templates from front end and those changes should also be updated in database like an edit button on the page? -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy: http://harjotmann.wordpress.com/daily-diary/ -- You

Re: Translation from templates doesn't work.

2013-11-24 Thread gilberto dos santos alves
please could you post url or some more details! Em domingo, 24 de novembro de 2013 07h21min12s UTC, Shahar Or escreveu: > > String in my template don't translate. They stay English even though they > do pop up in the po files using `makemessages`. > > To make sure that the current `lang` is indee

Form cleaned_data

2013-11-24 Thread Timothy W. Cook
I have an issue with save data from a form. The actual form has one required and two optional fields. The model has three additional fields that I want to assign based on the context, two of those are ForeignKey related. The post method in the view: def post(self, request, *args, **kwargs):

Re: How to fix URL link redirecting from login?

2013-11-24 Thread Vibhu Rishi
Its the @login_required decorator. https://docs.djangoproject.com/en/1.2/topics/auth/#the-login-required-decorator V. On Sun, Nov 24, 2013 at 3:46 PM, Timothy W. Cook wrote: > Check in the docs for the instructions on decorating your views to > restrict to authenticated users. This also talks

Re: How do I use mathematical calculations on my forloop Article/Publication list?

2013-11-24 Thread Pepsodent Cola
Thanks airstrike I will check out your suggestions and study it. Also, is there a reason why you're not using class based views? Well as a newbie programmer I started out following the Django polls tutorial writing my views using CBVs. But then when I had trouble doing things with my database

Re: How to fix URL link redirecting from login?

2013-11-24 Thread Timothy W. Cook
Check in the docs for the instructions on decorating your views to restrict to authenticated users. This also talks about redirecting to a page instructing them to login. Sorry, I don't have the link available right now. On Sat, Nov 23, 2013 at 10:40 PM, nobody wrote: > Hi, > > I made an URL l