Re: Force date and time formats to ISO

2014-09-29 Thread Mark Caglienzi
On 29 Sep 13:17, Collin Anderson wrote: > If it helps, the ISO format should always at least be _accepted_ as an > input, even it it's not displayed that way. Yes, I agree, but the main point (for what I need) is also the display of the date and times. This will allow to keep the webapp

Problem with accents when filter

2014-09-29 Thread Neto
I want to filter results with and without accents, but Django can not do it. In my database has the word "áéíóú", but when I do: People.objects.filter (name__icontains = 'aeiou') Returns nothing. Django how to return the result with and without accent? (I am using PostgreSQL and Django

Re: Problem with populate script

2014-09-29 Thread Collin Anderson
Is the path to the django source code is on your PYTHONPATH? If it's in the same directory, try: PYTHONPATH=. populate.py -- 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

Re: Force date and time formats to ISO

2014-09-29 Thread Collin Anderson
If it helps, the ISO format should always at least be _accepted_ as an input, even it it's not displayed that way. -- 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

Re: Need example to implement sql (dictionary) translations

2014-09-29 Thread Collin Anderson
does list(your_raw_query) return what you want? -- 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

Re: Django Registration

2014-09-29 Thread Collin Anderson
def get_success_url(request, user): return settings.REGISTRATION_EMAIL_REGISTER_SUCCESS_URL or even more straighforward: def get_success_url(request, user): return '/accounts/register/complete/' -- You received this message because you are subscribed to the Google Groups "Django

Re: Django : Problem with forms

2014-09-29 Thread Collin Anderson
Very interesting. Your code looks correct. Did you restart uwsgi? Does clearing out your .pyc files fix it? -- 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: AppRegistryNotReady error running fastcgi on IIS

2014-09-29 Thread Shawn H
I was, but it turns out that wasn't the issue. I asked the question on the pytools site (here ), thinking it was possible an issue with wfastcgi. It turns out it's not an issue with wfastcgi. It's that At 1.6, the recommended handler was

Re: Change GFK to FK

2014-09-29 Thread carlos
Hi, ok my questions is how to create a data migration, populating the FK data??. my old data no have fk only content_type and object_id for my relations with my class ModelMain, if fk = object_id?? or content_type? thank On Mon, Sep 29, 2014 at 6:23 AM, Tom Christie

Re: arrange date-products data on admin

2014-09-29 Thread Collin Anderson
Django doesn't have a way to group items like that in the admin. Though, checkout out date_hierarchy if you haven't seen it. https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.date_hierarchy -- You received this message because you are subscribed to the

Re: at django login my request.POST.get data are all empty, I struggle with what I missed there

2014-09-29 Thread Collin Anderson
Use a login view like this: @sensitive_post_parameters('password') def login_view(request): form = LoginForm(initial={'email': request.order.email}) if request.POST.get('login'): form = LoginForm(data=request.POST) if form.is_valid(): if user.is_active:

Re: Open Django template in dialog box (not in window)

2014-09-29 Thread Collin Anderson
I have a jsfiddle working with my code. http://jsfiddle.net/mafos5ox/1/ Do any errors show up in the developer tools console? -- 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,

Re: AppRegistryNotReady error running fastcgi on IIS

2014-09-29 Thread Collin Anderson
Are you sure you're calling django.setup() before the first request happens? >From what I can tell, an error happens while processing a request, and then this error happens while trying to generate a pretty error message. -- You received this message because you are subscribed to the Google

Re: Suggestions on autocomplete solutions for non-model forms not in the admin

2014-09-29 Thread Collin Anderson
It might be simplest to write all your own code. It could be easier to debug and you'll have full control of the situation. -- 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

Re: Problem with populate script

2014-09-29 Thread robert brook
This was really not a core function of the application, so I wold not worry about it. Just add the data to a csv page and import it into sql lite to get you going. But I believe that you need to tell Python where the data base is located using the settings file import os

Problem with populate script

2014-09-29 Thread Daniel Grace
I am trying to follow the tutorial at http://www.tangowithdjango.com/ I am stuck in section 5.8 where it shows how to create a script to populate the database. I created a script called "populate.py" as shown (except I added brackets for the Python 3 print statements), and saved it in the root

Force date and time formats to ISO

2014-09-29 Thread Mark Caglienzi
Hello to the list, I am developing a Django website that needs USE_L10N = True, and per-user TZ settings, but I want to force the output of dates and times to ISO everywhere, once and for all (-MM-DD and HH:MM:SS). I understand that Django with USE_L10N = True overrides the output of

Need example to implement sql (dictionary) translations

2014-09-29 Thread robert brook
>From the django project web site, I am trying to implement the following code and have it spit out the dictionary form of the sql. Does anyone have an example of how this is done. The code below is from the project web page https://docs.djangoproject.com/en/1.7/topics/db/sql/ When I execute

Re: templates: if and static tags incompatible?

2014-09-29 Thread Fred Stluka
The problem is that static is not being recognized as a valid Django tag. Add this line to the top of the template file to define it. {% load staticfiles %} --Fred Fred Stluka -- mailto:f...@bristle.com --

templates: if and static tags incompatible?

2014-09-29 Thread chansonsyiddish
Hello, I've got a small problem: here is the code in my template: {% if p.fleches %} %}" > {% endif %} and the django development server tells me: Django Version: 1.4.5 Exception Type: TemplateSyntaxError Exception Value: Invalid block tag: 'static', expected

Re: Config: DB or git?

2014-09-29 Thread Erik Cederstrand
Den 29/09/2014 kl. 16.11 skrev Derek : > > So is it possible to store encrypted database passwords in the Django > settings (or local_settings) file? Yes. A simple solution would be to use a symmetric encryption like simple-crypt to encrypt and decrypt your passwords

Re: Config: DB or git?

2014-09-29 Thread Daniel Rus Morales
On 29 Sep 2014, at 17:13, Javier Guerra Giraldez wrote: > On Mon, Sep 29, 2014 at 8:15 AM, Alejandro Varas G. > wrote: >>> But where does configuration belong? >> >> "To the environment" > > > this is the currently fashionable answer, but I haven't

Re: Config: DB or git?

2014-09-29 Thread Javier Guerra Giraldez
On Mon, Sep 29, 2014 at 8:15 AM, Alejandro Varas G. wrote: >> But where does configuration belong? > > "To the environment" this is the currently fashionable answer, but I haven't seen any justification for it. Unfortunately, the 12factors manifesto tells the how, but

Django Registration

2014-09-29 Thread Tsolmon Narantsogt
Hello folks *I got this error Django Registration 'str' object is not callable* INSTALLED_APPS = ( .. 'registration', ) REGISTRATION_EMAIL_REGISTER_SUCCESS_URL = '/accounts/register/complete/' in urls.py get_success_url=getattr( settings,

Re: Config: DB or git?

2014-09-29 Thread Derek
On Monday, 29 September 2014 15:41:23 UTC+2, Erik Cederstrand wrote: > > Den 29/09/2014 kl. 15.04 skrev Thomas Güttler >: > > > Hi, > > > > of course we separate data from code: > > > > - code belongs into version control (git) > > - data belongs into a database

Re: Config: DB or git?

2014-09-29 Thread Erik Cederstrand
Den 29/09/2014 kl. 15.04 skrev Thomas Güttler : > Hi, > > of course we separate data from code: > > - code belongs into version control (git) > - data belongs into a database (postgres) > > But where does configuration belong? Strictly speaking, configuration belongs in a

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread Daniel Rus Morales
No, that’s not the cause, the lack of it would be. That line shows the content of ‘error_message' when it does exist and has a value other than None. But if you have it in your template the error must be somewhere else in your code. Must be a simple syntax mistake you didn’t notice, either in

Re: Config: DB or git?

2014-09-29 Thread Alejandro Varas G.
Hi Thomas, El 29/09/2014 10:05, "Thomas Güttler" escribió: > > Hi, > > of course we separate data from code: > > - code belongs into version control (git) > - data belongs into a database (postgres) > > But where does configuration belong? "To the environment" A good

Config: DB or git?

2014-09-29 Thread Thomas Güttler
Hi, of course we separate data from code: - code belongs into version control (git) - data belongs into a database (postgres) But where does configuration belong? Since I am a developer I like version control. But the longer I think about this question, I think the perfect configuration

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread zaiks0105
I do. Is that line causing the behavior? On Monday, September 29, 2014 7:15:47 AM UTC-4, Daniel Rus Morales wrote: > > Hi Zaiks0105, > > Do you have the following line in "your polls/templates/polls/detail.html”? > > {% if error_message %}{{ error_message }}{% endif %} > > > On 29 Sep 2014, at

Re: Change GFK to FK

2014-09-29 Thread Tom Christie
You'll probably want to take this approach: * Create a schema migration, adding the FK. * Create a data migration, populating the FK data. * Create a schema migration, removing the GFK. On Sunday, 28 September 2014 23:15:22 UTC+1, sacrac wrote: > > Hi, is posible to change GenericForeingnKey to

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread Daniel Rus Morales
Hi Zaiks0105, Do you have the following line in "your polls/templates/polls/detail.html”? {% if error_message %}{{ error_message }}{% endif %} On 29 Sep 2014, at 12:48, zaiks0105 wrote: > Hi, > > I am following Django official tutorial and have unanswered issue at part 4,

Looking for feedback on this Django news aggregation feed

2014-09-29 Thread kvnflm
I'm working on a prototype for a website that aggregates articles from various blogs around the web and tags them by the terms that are mentioned, so you can create a customized feed with articles related to topics you're interested in. If you'd like to check it out, you can see the Django feed

Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread zaiks0105
Hi, I am following Django official tutorial and have unanswered issue at part 4, https://docs.djangoproject.com/en/1.7/intro/tutorial04/. Here is the exception handling code, except (KeyError, Choice.DoesNotExist): # Redisplay the question voting form. return