Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Python

Python Discussion forum for Python, a high-level language with simple syntax, but yet powerful.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-25-2008, 09:11 AM
gaffaro's Avatar   
gaffaro gaffaro is offline
Newbie
 
Join Date: Jul 2008
Posts: 9
Rep Power: 0
gaffaro is on a distinguished road
Default Python - Django

hi gals

have u ever carried out any project in Python using Django's Templates

i want to use many of languages' support..
so i managed it
my templates can support many of languages

Code:
~$ django-admin.py makemessages -l MyLanguage
~$ django-admin.py compilemessages
after compiling messages in django.po file

there is no problem..

but my problem is that :
in my models class i have variables named in english
In my templates, how do i use MyLanguage in FORM templates
i can not use another language in form ! all but english

ex. in *.py i use
Code:
form = threadForm()
and in my template i use
Code:
{{form}}
language support very easy in python-django
but how can i use this in my form ??
is there anyone to help me about ?


Gaffar Durmaz
visit me : Only Gaffar Overcomes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 08-27-2008, 04:33 AM
gaffaro's Avatar   
gaffaro gaffaro is offline
Newbie
 
Join Date: Jul 2008
Posts: 9
Rep Power: 0
gaffaro is on a distinguished road
Default Re: Python - Django

my code was
Code:
class Student:
    username = models.CharField( maxlength=30)
    ....
    ....
instead of this lets use

Code:
class Student:
    username = models.CharField( _('username'), maxlength=30)
    ....
    ....
or


Code:
class Student:
    username = models.CharField( maxlength=30, verbose_name=_('username'))
    ....
    ....
if u compile message as like this
Code:
~$ django-admin.py makemessages -l MyLanguage
~$ django-admin.py compilemessages
"username" will automaticly insert into the django.po file
so u can add other language support
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-27-2008, 08:06 AM
MeTh0Dz|Reb0rn's Avatar   
MeTh0Dz|Reb0rn MeTh0Dz|Reb0rn is online now
My Posts Are Moderated
 
Join Date: Jul 2008
Posts: 15
Rep Power: 0
MeTh0Dz|Reb0rn is an unknown quantity at this point
Default Re: Python - Django

What are you talking about? There are no 'gals' on the net.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-27-2008, 08:09 AM
gaffaro's Avatar   
gaffaro gaffaro is offline
Newbie
 
Join Date: Jul 2008
Posts: 9
Rep Power: 0
gaffaro is on a distinguished road
Default Re: Python - Django

it was a joke dude :

eek:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-12-2008, 06:00 AM
Random Random is offline
Newbie
 
Join Date: Sep 2008
Posts: 7
Rep Power: 0
Random is on a distinguished road
Default Re: Python - Django

is django even worth it to look over?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 09-13-2008, 08:09 AM
gaffaro's Avatar   
gaffaro gaffaro is offline
Newbie
 
Join Date: Jul 2008
Posts: 9
Rep Power: 0
gaffaro is on a distinguished road
Default Re: Python - Django

Quote:
Originally Posted by Random View Post
is django even worth it to look over?
i had to develop several web applications, and i don't want to start from scratch, i wanted to use a framework. As I am working in a firm specialized in Java,Python, and some of my mates are Java developers, we first consider using a Java framework: Cocoon, Srping and others had their chance. Due to framework complexity and lack of time for learning the framework, we had to resign. Moreover, interactions with system were not easy. I could add that Sun JDK was not free, and more complicated to setup.

Then we were in the “Rails boom”. We gave RoR a try! We had a script language, free with lot of library. Rails looks great, develop really fast, quite easy to learn, BUT, how difficult it is to deploy in a production environment. I ever made a post about that, I will not add anything to my old post.

Due to my Ubuntu love, and love from Ubuntu guys to Python, we give python framework a try. We tried Django. It was easy to learn, easy to deploy, and we things we enjoyed:

--> instead of generating the web site like RoR (you never use because it is too generic), Django have an administration website. This “super” phpMyAdmin can edit entities
-->templates: in Django we have templates, you can define a generic one (for header and footer for example) and get it included in other parts of your website. For us, this was THE concept.
-->we had a lot of python module available in Ubuntu, for all sort of interactions

Sure, the fact that we all use Ubuntu and that python is something very well maintained in Ubuntu biased our choice. We now have several projects that are going on, and we have no regrets regarding choosing Django

Ohh and now
The choice is yours

Gaffar Durmaz
visit me : Only Gaffar Overcomes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python resources v0id Python 3 11-12-2008 07:38 AM
Python frequently asked questions v0id Python 1 08-06-2008 11:05 AM
embedding python in C BlueDream Python 0 05-04-2008 11:42 AM
Using python in C BlueDream C and C++ 2 05-04-2008 10:02 AM
Python Collection reachpradeep Python 1 03-03-2007 03:50 PM


All times are GMT -5. The time now is 12:41 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads