Hi,
This might sound like a strange question. I am switching from
MVC .NET to Django/Linux environment. It makes most sense to go
completely linux (Ubuntu). But there is also the option of leaving PC
completely behind and start using a Mac for development.
As I am not familiar with Mac, is it tr
Hi everyone,
I was wondering which IDE you guys are recommending to use?
Important is ease of use and productivity. Price comes third if its
not free.
I tried already Aptana 3.0, but I get a weird error message upon
creating Django projects:
http://stackoverflow.com/questions/10261037/django-on-a
Hi,
I have a question to the seasoned Django developers, I am relatively
new to Django and have been developing on Aptana Studio 3.0 since one
month. While I think its a great free product, it seems debugging is
only limited to url.py and views.py. Beyond that there is no way to
set a break point
Hey everyone,
I would really appreciate it if somebody could help me with this.
Working on this since this morning and am totally stuck..
I have posted it with proper formatting on stack overflow.
http://stackoverflow.com/questions/10854330/internationalization-in-django-doesnt-get-activated
Th
Jun 1, 8:49 pm, Iván Raskovsky wrote:
> Besides changing the language per request as you've been indicated in
> SO you might want to look at lazy
> translations:https://docs.djangoproject.com/en/dev/topics/i18n/translation/#lazy-t...
>
> Regards,
> Iván
>
>
>
&g
Guys,
I have created a new simple test project to demonstrate the problem.
It is a very simple project and you can switch between German & English at
main page. You see the selected Language code actually changes, which is a
good sign but the translation simply doesn't happen. I wonder if t
>
> Hi Kenneth,
The good news is the problem is solved. A friendly chap in stackoverflow
actually bothered to look into it.
The problem is as simple as the translation files couldn't be found. For
some odd reason the important information about how Django locates them is
at the very last se
Today I have started my first steps into postgresql, since its recommended
by the Django team.
I came across several issues, that I solved patiently one by one.
1) Creating tables under postgresql requires to login as a different OS
login, from which you don't even know the password. Fine, I f
Thanks everybody for the encouragement.
Just to let you know you convinced me not giving up on postgresql.
It is actually quite nice that rules are tighter, to see right away what
might be wrong (e.g. field length etc)
Starting up with postgresql is much harder than MySQL, but then it
should
Oh one more thing:
I have created a new superuser for postgre called django_user
Now when I try to connect to it it says:
FATAL: Peer authentication failed for user "django_user"
But the password is correct, I had no choice than change the settings
in /etc/postgresql/9.1/main/pg_hba.conf
Hi everyone,
class CallsForm(ModelForm):
class Meta:
model = Conversation
widgets = {
'contact_date': forms.DateInput(),
}
With a date input like this, my form shows the date like '2012-07-11',
which seems international to me.
I live in U
Hello everyone,
For some reason the American date format is not accepted in my form. I
wonder if any Django developer from US could help me with this. I suspect
the timezone in the settings also affect the date format, but I am not sure.
*Settings:*
TIME_ZONE = 'Europe/London'
LANGUAGE_CODE
ght. Sure I could use the field format, but isn't
that hardcoded and bad practice?
How do you guys in US do that?
Thanks,
On 13/08/12 10:48, Houmie wrote:
Hello everyone,
For some reason the American date format is not accepted in my form. I
wonder if any Django developer from US
Thanks Melvyn,
I have tried this:
def contact_date_callback(self, field, **kwargs) :
return field.contact_date(localize=True, **kwargs)
But the date still shows as 2012-08-13
note, that Aptana Studio 3.0 complained that I put `self` first.
Nonetheless neither version works.
Any other
hile printing
the value in the localized way (Aug. 31, 2012).
Cheers
On Monday, 13 August 2012 14:47:57 UTC+2, Houmie wrote:
Thanks Melvyn,
I have tried this:
def contact_date_callback(self, field, **kwargs) :
return field.contact_date(localize=True, **kwargs)
Thanks Melvyn for the example.
Interesting you get the same problem with American date output as I. So
its on purpose to pick the first available input-format from formats.py.
Which is very odd if you ask me. I was expecting this to be culture
specific too.
Ok, let see how we can fix this. T
s.py.
Are they stored somewhere else?
On 13/08/12 15:30, Melvyn Sopacua wrote:
On 13-8-2012 16:16, houmie wrote:
But looking at this example, 'en/' is not good enough. British English
is also `en` but the date format is European. You know what I mean?
Again the culture seems to be fo
is way)
I tried to change TIME_FORMAT = 'P' to TIME_FORMAT = '%p', but it breaks.
On 13/08/12 21:52, Melvyn Sopacua wrote:
On 13-8-2012 22:41, Melvyn Sopacua wrote:
On 13-8-2012 17:40, houmie wrote:
Its just a bit odd that templates show 11:15 p.m. Slight difference i
:40, houmie wrote:
Its just a bit odd that templates show 11:15 p.m. Slight difference in
the formatting. Also the dates within templates are defined like Aug
13, 2012. Doesn't confirm with my definition in formats.py.
Are they stored somewhere else?
No, but you need the localize filter o
Hello,
I have created a small demo to show the problem. Please open the demo here:
http://sandbox.chasebot.com/
When you click on British English, you can see how both the date- and Time
format change.
Now if you click on Add, you will see how both date and time are
pre-populated for you. Ho
The question might seem too simplistic, but it seems formsets can only work
with forms that have simple type fields such as charfield.
But has anyone tried to use a form with a dropdown and use that form to
instantiate a formset?
Let me give you an example why this fails:
*Model:*
class SalesI
Hi Xavier,
This wasn't the whole story.
I actually have a DealType class:
|class DealType(models.Model):
deal_name= models.CharField(max_length=40)
sales_item= models.ManyToManyField(SalesItem)
price= models.DecimalField(decimal_places=2)
|
DealType class has a man
Thanks Thomas.
Just trying to apply the DropDownMultiple Widget that you have
suggested. I have followed the instruction:
|class MyForm(forms.ModelForm):
categories = forms.Field(widget=DropDownMultiple)
def __init__(self, *args, **kwargs):
self.base_fields['categories'].widge
Thanks Melvyn,
Yes, I know about overriding a widget. I could override a Charfield with
a TextArea. For simple stuff it makes sense.
Against which widget do I override the existing M2M widget though?
On 17/08/12 01:01, Melvyn Sopacua wrote:
On 17-8-2012 1:05, Houman wrote:
What I am tryin
ve to extend the factory at all.
Many Thanks,
Houman
On 17/08/12 14:24, Melvyn Sopacua wrote:
On 17-8-2012 15:00, houmie wrote:
Yes, I know about overriding a widget. I could override a Charfield with
a TextArea. For simple stuff it makes sense.
Against which widget do I override the existin
deals_formset_factory = modelformset_factory(Deal, form=DealCForm, extra=1,
can_delete=True, max_num=5)
deals_formset = deals_formset_factory(queryset=query)
Is there a way to say the one extra form shall always be the first form no
matter how many more instance forms are within the deals_
Django has an excellent support for internationalization, any English
expression within Models, Forms, View or template can easily be marked for
translation. However I came across an interesting situation I don't know
how to deal with.
I have a Gender lookup (Male, Female). Now even if I tra
Thanks guys. I came across myself across django-modeltranslation and I
must it works very well.
On 03/10/12 16:34, Jair Trejo wrote:
I use django-datatrans for catalog translation, i'ts not perfect but
good enough for me.
El martes, 2 de octubre de 2012 20:09:46 UTC-5, Houmie esc
28 matches
Mail list logo