ValueError: cannot reindex from a duplicate axis

2016-04-23 Thread Chen
http://stackoverflow.com/questions/36809762/valueerror-cannot-reindex-from-a-duplicate-axis-while-using-pivot-table -- 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

New Django User

2016-04-07 Thread Chen
I'm new to Django.. I actually wanted to take inputs from a web user through web page and then using those inputs perform further operations. So does Django helps in connecting HTML, Python and PHP altogether? How do I connect a html and python file? I have a user login page which I can proceed

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

2016-04-13 Thread Chen
def reshape(self, students, questions, scores, q_ratings=None): self.df.reset_index(inplace=True) if q_ratings != None: self.q_ratings = pd.DataFrame(self.df.pivot_table(index=questions, values=q_ratings)) self.q_ratings.columns= ['difficulty rating'] self.df = self.df.pivot_table(index=students,

Data lost by a migration for renaming a field

2018-09-08 Thread chen
Hi, I have a model which contains a BooleanField. I changed its name to a new one and updated help text as well. django generates operations RemoveField and AddField in sequence for those changes. As a result of running this migration, original data is lost. I was confused by this behavior why

Re: Data lost by a migration for renaming a field

2018-09-08 Thread chen
On Sunday, September 9, 2018 at 12:48:52 AM UTC+8, Jason wrote: > > https://docs.djangoproject.com/en/1.11/ref/migration-operations/#alterfield > > There are AlterField and RenameField operations available with migrations, > but you probably have to include them in your custom migrations. Reaso

alert table while updating model automatically

2008-10-31 Thread Xian Chen
Hi All, I want to know whether Django support alerting the tables automatically while I modify the models or not. Suppose the website has run a long time and stored lots of data. In this case, the administrator wants to modify the model to add/remove some properties. Does the corresponding tables

Templaite:display li items alternatively using for

2008-10-31 Thread Xian Chen
Hi, I want to display a list of items by using {% for item in items %}. To make the web pages look better, I want to use two kinds of alternatively. E.G item item My question is how can i use the tags to implement this requirement? Any build-in tags for this? Thanks in advance, --~--

How to rename uploaded files in FileField?

2008-11-03 Thread Chen Yinliu
n 1.0 release. so anyone who know how to do it? thanks very much. -- Chen Yingliu --~--~-~--~~~---~--~~ 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@goog

Re: django template language + greater than? does it exist?

2009-01-13 Thread Mengsong Chen
FYI, http://www.djangosnippets.org/snippets/12/ On Tue, Jan 13, 2009 at 11:03 AM, Matías Costa wrote: > > Fast answer: No > > Better awswer: No, but you can get one on djangosnippets.org > > On Mon, Jan 12, 2009 at 2:44 PM, rabbi wrote: > > > > is there a greater than method in the template lan

temporary user model

2009-01-13 Thread Mengsong Chen
Just wonder if anyone have achieved such a temporary user model to allow unregistered user to use some features,but will clean up the data after the session completed if the user is not going to register. Thanks in advanced. M --~--~-~--~~~---~--~~ You received th

Django 1.0 admin with inline model, IntegrityError when delete

2008-09-03 Thread Arnold Chen
I have upgraded to django 1.0 beta or the latest version for my development machine. And faced IntegrityError when i delete a record with few related records. This problem do not happen before django 1.0 A Product model and a Part model, which is a 1-to-many relationship, (a Product can have mult

How to get the current record id from django admin form?

2008-09-05 Thread Arnold Chen
I am using django version 1.0. I have a admin with a form for custom validation. My validation is done in def clean(self): The problem is that I have a requirement to get the record id to check against database for data validation. But i don't know how to do. My model is: class Category(models.

Apache with home directory Django

2008-09-25 Thread Xian Chen
Hi, I want to run my Django app on a shared web server. As so many people share this server, I install python and Django(1.0) under my home directory. How can I configure the Apache with mod_python to make the django under my directory running? The server administrator refused to install Django

Django v0.95 issue

2008-09-25 Thread Xian Chen
Hi All, I have a problem with Django v0.95 ( I cannot convince the administrator to install 1.0 for me.) I got this feedback:( AttributeError at /xianchen/ 'function' object has no attribute 'rindex' Request Method: GET Request URL: http://ubinet.engr.uconn.edu/xianchen/ Exception Type: Attribu

Apache, Django configuration

2009-02-09 Thread Xian Chen
Hi All, I use mod_python to run Django on Apache. But, I notice all of the urls that Django received are not correct. In deed, the "/" after the domain name is truncated. e.g. http://localhost/admin/ , Django receives "http://localhostadmin"; Why this happen? Thanks, Xian --~--~-~--~-

start new thread in mod_python

2009-02-11 Thread Xian Chen
Is threading in mod_python allowed? I design my project like this: in the views.py, once the user click some buttons, the view function will start new thread to run some background processes. The site runs good by using Django owner server. But when I using mod_python, it seems the thread do not

fastcgi can not send url to my backend server

2009-03-15 Thread Robert Chen
Hi, all: I used Lighttpd + fastcgi to deploy my Django project. My lighttpd configuration is as following: server.modules = ( "mod_rewrite", "mod_redirect", "mod_alias",

Re: fastcgi can not send url to my backend server

2009-03-15 Thread Robert Chen
Yes, that's the reason, thanks very much. I commented out "check-local" because I thought it came with "socket" configuration. That's the mistake. Now it woks. Thanks. Robert. On Sun, Mar 15, 2009 at 7:45 PM, Ramiro Morales wrote: > > On Sun, Mar 15, 2

django.utils.html bug?

2009-03-24 Thread Chen Jie
>>> from django.utils import html >>> html.urlize('炳叔的这句“这不是典型的大蒜瞧不起腊八蒜,妒忌人家好吃不臭嘛。”太逗了。http://blog.donews.com/bingshu/archive/2009/03/25/1479512.aspx') u'\u70b3\u53d4\u7684\u8fd9\u53e5\u201c\u8fd9\u4e0d\u662f\u5178\u578b \u7684\u5927\u849c\u77a7\u4e0d\u8d77\u814a\u516b\u849c\uff0c \u5992\u5fcc\u4e

Re: Working for a startup.

2010-04-22 Thread Jonathan Chen
Just to add my two cents. I think the fight between FOSS vs Proprietary is kind of a faulty argument because there is pros and cons for both sides. Anybody who says FOSS is the best or this Proprietary software is the best really doesn't understand the difference between FOSS and Proprietary softwa

about django model save

2009-12-24 Thread chen gang
/query.py", line 2369, in execute_sql cursor.execute(sql, params) File "/usr/lib/python2.6/site-packages/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) File "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py&quo

Re: about django model save

2009-12-24 Thread chen gang
Hi, thanks for the quick reply. Actually I call "python manage.py syncdb " and I just didn't mention it in previous mail. I can save other type of models defined in my models.py. Is this a bug (my poor guess)? Br. Chen Gang On Fri, 2009-12-25 at 03:17 +0100, ext Xia Kai(

Re: about django model save

2009-12-24 Thread chen gang
Hi, after some discussion with XIa Kai and I tried to delete the .db file and rebuild it. it works now! Br, Chen Gang On Fri, 2009-12-25 at 03:53 +0100, ext Xia Kai(夏恺) wrote: > Hi, > > It seemed that you have run syncdb before your adding the phone_num to the > model. > &g

Django serving static PDF file

2007-07-17 Thread Arnold Chen
Can any one please tell me how to serve a static PDF in django ? The file is located in the server, and do not need to be created on the fly (by using report lab). I have done it in PHP by using header, but i just don't know how to do it with django. Thanks --~--~-~--~~~-

Re: Django serving static PDF file

2007-07-17 Thread Arnold Chen
Django, just make a directory > that won't be handled by Django and stick all your static content in > there. After all, the webserver is usually better at serving static > files than Django is :) > > On 17/07/2007, at 2:26 PM, Arnold Chen wrote: > > > > > Can any

Re: Django serving static PDF file

2007-07-17 Thread Arnold Chen
they run in browsers, and most of the time, they hang the browser, so is there a way to push ? regards, Arnold On Jul 17, 4:03 pm, Arnold Chen <[EMAIL PROTECTED]> wrote: > Thanks Ben, > > Besides, i've found thatwww.lawrence.comandwww.ljworld.com(which > are famous sites tha

Using session variable in models

2007-07-25 Thread Arnold Chen
I am implementing a multi-lingual product catalog website with Django. It is in English (default), Trad. Chinese and Simp. Chinese. I want to let user to choose the language they want, and the system display the corresponding product name (in the selected language). The product class is something

Re: Using session variable in models

2007-07-25 Thread Arnold Chen
t; > @property > > def name(self): > > if translation.get_language()=="en": > > return self.name_en > > else: > > return self.name_de > > > good luck > > > wolfram > > > On 7/25/07, Arnold

php fsockopen equivalent in Django

2007-09-09 Thread Arnold Chen
Dear All, I am writing an application that require "silent" post of data to a specific URL. I know that is a function fsockopen in PHP which can achieve this, and i am looking for function in Django like that. fsockopen is used to Open Internet or Unix domain socket connection. and you can post

Re: php fsockopen equivalent in Django

2007-09-09 Thread Arnold Chen
How come i don't remember using the python socket ? thanks James On Sep 10, 1:13 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/9/07, Arnold Chen <[EMAIL PROTECTED]> wrote: > > > I am writing an application that require "silent" pos

SOMETIMES mod_python error

2007-09-11 Thread Arnold Chen
Dear all, I am experiencing some situation that is very strange. the development site is http://alberta.design97.com This site is django-powered, it is up sometimes, on some computers, you can visit this site for a preview, if you get an error, try reload the page, usually the page will show wit

Re: SOMETIMES mod_python error

2007-09-11 Thread Arnold Chen
Yes, the server has been restarted many times On 9月11日, 下午6時54分, Ryan K <[EMAIL PROTECTED]> wrote: > Have you tried restarting the web server? > > Arnold Chen wrote: > > Dear all, > > > I am experiencing some situation that is very strange. the development > >

i18n/setlang no longer support GET

2007-09-20 Thread Arnold Chen
I used to use /i18n/setlang?language=zh-cn approach to change language. However i found that the latest (as of this writing 20th Sept, 2007) svn version django do not support calling the url using GET, and there is a sentence in the function set_language in the i18n.py file "Since this view chang

Using auth in model

2007-11-07 Thread Arnold Chen
I want to let users to create their own profile in django admin. And when they save any new records, use their logged-in user id (models.ForeignKey(User)) and override the save() function of the model. Is there any statement that i can use? i believe it should be something like auth.user thanks

Re: Using auth in model

2007-11-07 Thread Arnold Chen
My question above can be simplified as "how to get logged-in user with request parameter" On Nov 8, 12:32 pm, Arnold Chen <[EMAIL PROTECTED]> wrote: > I want to let users to create their own profile in django admin. And > when they save any new records, use t

Re: Using auth in model

2007-11-09 Thread Arnold Chen
Sorry, there is a typo mistake, my question is "how to get logged-in" user WITHOUT request parameter. Because i want to use it in a function in models.py regards, Arnold On 11月8日, 下午8時18分, Dan Fairs <[EMAIL PROTECTED]> wrote: > > My question above can be simplified as "how to get logged-in user

Re: ImageField Validation Error

2007-11-15 Thread Arnold Chen
I faced this problem as well, but there is a work around. I am using django 0.97 pre (i downloaded from svn 16th Nov, 2007) Go to c:/python2.4/lib/site-packages/django/core/validators.py or /usr/lib/python2.4/site-packages/django/core/validators.py , if you are using Fedora comment the following

Re: Method 'allow_tags' doesn't work?

2007-11-16 Thread Arnold Chen
I also faced this problem, i have a rolled-out site, using the allow_tags method to do a critical mission in a customized admin site. regards, Arnold On Nov 16, 3:34 am, wowar <[EMAIL PROTECTED]> wrote: > Today, after updating django to revision 6678 method 'allow_tags' > doesn't work. Despite i

cannot run django with Apache

2007-12-24 Thread Xian Chen
all of my code works well with the django server, but not for Apache SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE temp.settings PythonDebug On PythonPath "['/home/xian/mycode'] + sys.path" here is t

Re: cannot run django with Apache

2007-12-24 Thread Xian Chen
Great & THX On 12/25/07, Empty <[EMAIL PROTECTED]> wrote: > > > > Add this line in the urls.py > > (r'^$','temp.helloworld.index'), > > > > Your url pattern is not going to match a subfolder. Remember as you > have it setup everything after the http://localhost/ is what will be > sent to be ma

a conflict between django and php4

2006-09-18 Thread zhongke chen
i'm using django with apache2. if i disable php4 module of apache2(using a2dismod php4), my django application runs well. if i enable php4 module and log a user in, my django application gives the following error message: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback

Re: a conflict between django and php4

2006-09-18 Thread zhongke chen
Not the same problem. if i enable php4, and i do not log in under django, my django app works too. if i log in, error occurs. On 9/19/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > On 9/18/06, zhongke chen <[EMAIL PROTECTED]> wrote: > > > > i'm using dja

Re: a conflict between django and php4

2006-09-18 Thread zhongke chen
Thanks! i solve this by removing libmhash package. but it's only a workaround solution. i expect to see a perfect one. On 9/19/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Tue, 2006-09-19 at 12:52 +0800, zhongke chen wrote: > > Not the same problem. > >

Re: DRY in templates

2006-10-03 Thread Slowness Chen
1. refactor the blocks you want into separate templates , do something like {%include 'block1.html'%} , {%include 'block2.html'%}. I guess this is what you want. or 2. "You can use as many levels of inheritance as needed." Luis P. Mendes wrote: > Hi, > > I have several applications running and ea

How to change the representation of newline?

2006-12-09 Thread zhongke chen
representation of newline? -- Yours, Zhongke Chen 陈忠克 --~--~-~--~~~---~--~~ 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

Re: How to change the representation of newline?

2006-12-13 Thread zhongke chen
> self.body_text = self.body_text.replace("\r", "\n"). > super(MyModel, self).save() > > Good luck! > Aidas Bendoraitis [aka Archatas] > > > > On 12/10/06, zhongke chen <[EMAIL PROTECTED]> wrote: > > When I input

Re: How to change the representation of newline?

2006-12-14 Thread zhongke chen
/13/06, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > It might be that it treats new lines as \r\n when you are using some > windows-* encoding for your html pages. Check the source code. I would > rather use UTF-8 in any case. > > Regards > Aidas Bendoraitis [aka Archatas] &

Re: How to change the representation of newline?

2006-12-14 Thread zhongke chen
encoding in your firefox settings is set > wrongly? > > You can always override admin templates copying them into your > custom_templates/admin directory. > > Regards, > Aidas Bendoraitis > > > > On 12/14/06, zhongke chen <[EMAIL PROTECTED]> wrote: > >

Re: Which is better: dreamhost or bluehost?

2006-05-10 Thread Slowness Chen
My site (SeaAboveSkyBelow.org) is running smoothly on Dreamhost. - Original Message - From: "panta" <[EMAIL PROTECTED]> To: "Django users" Sent: Wednesday, May 10, 2006 11:31 PM Subject: Which is better: dreamhost or bluehost? > > Hi all, > I'm going to setup a (small) site using djan

use data model and database api along

2006-07-29 Thread Gennan Chen
Hi!I will like to django's ORM in my standalone app (not web app).  Do I always its admin tool to create tables? Or it can reuse the table structure I create in the db? Gen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

using legacy db system

2006-08-01 Thread Gennan Chen
system spanning across a couple of dbs? It just seems more flexible an elegant. Gen-Nan Chen, PhDChief ScientistResearch and Development GroupCorTechs Labs Inc (www.cortechs.net)1020 Prospect St., #304, La Jolla, CA, 92037Tel: 1-858-459-9700 ext 16Fax: 1-858-459-9705Email: [EMAIL PROTECTED

Re: using legacy db system

2006-08-01 Thread Gennan Chen
I am with you on that.  Gen On Aug 1, 2006, at 8:23 AM, Jacob Kaplan-Moss wrote:On Aug 1, 2006, at 9:16 AM, [EMAIL PROTECTED] wrote: This might be of some help:http://code.djangoproject.com/wiki/MultipleDatabaseSupportIt's a SoC 2006 project, so the branch has yet to be merged into trunkbut he repo

customize admin

2006-08-01 Thread Gennan Chen
do I do that? And if I want to add some buttons on the form to run shutdown and reboot machines (this has nothing to do with db except adding a log), where is the documentation for that??   Gen-Nan Chen, PhDChief ScientistResearch and Development GroupCorTechs Labs Inc (www.cortechs.net)1020 Prospe

put some initial data in the db

2006-08-02 Thread Gennan Chen
Hi!is there any way to put some initial data in the db by using "syncdb" option? Or I need to cook my own?? Gen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: put some initial data in the db

2006-08-02 Thread Gennan Chen
of generating SQL dynamically. However, can I override class's __init__ function? Or I need to create a customized Manager for that?? Gen On Aug 2, 2006, at 3:38 PM, Malcolm Tredinnick wrote:On Wed, 2006-08-02 at 14:52 -0700, Gennan Chen wrote: Hi!is there any way to put some initial data in t

Re: put some initial data in the db

2006-08-02 Thread Gennan Chen
reate your base objects. That's exactly what we did, and have both "initial_data.py" and "example_data.py" as a part of our build & testing process. At the start, we just have the model imports and away we go. It's not build in to the framework, but it's not h

Re: Off Topic: Mac software for database design?

2006-08-05 Thread Gennan Chen
I am using Eclipse with PyDev and Quantum. It is a nice IDE. Gen On Aug 5, 2006, at 3:44 PM, [EMAIL PROTECTED] wrote:& that should have also said that while MySQL Workbench is flaky ( asyou've found out ), I haven't had any problems with MySQL admin.There's also YourSQL which is quite nice (http://

DateTime field milliseconds?

2006-08-08 Thread Gennan Chen
Hi!I am using MySQL as my DB and it seems datetime field did not store milliseconds. Is it the correct behavior? Any chance I can hack that/ I need Milliseconds resolution.  Gen-Nan Chen --~--~-~--~~~---~--~~ You received this message because you are subscribed to

django cannot connect to mysql after upgrade

2006-08-21 Thread zhongke chen
After upgrade mysql from 5.0.22 to 5.0.24, django cannot work with mysql. The error messages as following: Traceback (most recent call last): File "./manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/management.py"

Re: django cannot connect to mysql after upgrade

2006-08-22 Thread zhongke chen
^ekipS <[EMAIL PROTECTED]> wrote: > > Hi, chen. > I got the same problems after updating my system. > Just re-install MySQLdb-python modules. > > > zhongke chen wrote: > > After upgrade mysql from 5.0.22 to 5.0.24, django cannot work with > > mysql. The error mes

Exception Value: no such table: django_admin_log

2006-02-18 Thread Slowness Chen
I changed my model, ran "python manage.py init" , "python manage.py install myapp" , "python manage.py createsuperuser" again, and when I logged in, the "Exception Value: no such table: django_admin_log" error came up. I checked the model's schema, there is no table django_admin_log in it. bef

Re: Exception Value: no such table: django_admin_log

2006-02-18 Thread Slowness Chen
BTW: I am running on magic-removal revision 2330 --~--~-~--~~~---~--~~ 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 from this gro

Re: Exception Value: no such table: django_admin_log

2006-02-18 Thread Slowness Chen
Well, it seems like I should run "python manage.py install admin" again, since admin tables are in the same database. Sorry for the newbie question. in the half day', Django did impress me. great work. --~--~-~--~~~---~--~~ You received this message because you a

Re: ANN: magic-removal branch merged to trunk

2006-05-02 Thread Slowness Chen
great! thanks for all the hard work. --~--~-~--~~~---~--~~ 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 from this group, send emai

Write a DRY URL configuration

2006-05-02 Thread Slowness Chen
a recipe i just added to cookbook. hope it can be a little useful :-) http://code.djangoproject.com/wiki/CookBookMakeURLConfDRY Question: In a url configuration file, we use the first argument to the patterns() function to specify a prefix to apply to each view function , avoiding typing that out

Re: Write a DRY URL configuration

2006-05-02 Thread Slowness Chen
Sorry, there are two typos: urlpatterns = patterns( '' should be urlpatterns = patterns( '' , and urlpatterns = patterns( 'django.views.generic.date_based' should be urlpatterns = patterns( 'django.views.generic.date_based' , --~--~-~--~~--

Custom Unique Registration Number Required

2023-04-05 Thread chen...@gmail.com
Good day all I am new to django and I need assistance where I can make a unique registration number via model with the following format *ch2023ed0213* where *'ch'* stands for abbreviated school name, *'2023'* year of programme, *'ed'* for department and *'0213'* student unique number.. Urls

Multiuser Login and Registration required

2023-05-21 Thread chen...@gmail.com
I need a tutorial from scratch on how new Users can register and login having different forms for HOD, Staff and Student. I need tutorial on Multiusers Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: What Can I use?

2012-02-11 Thread Chen Xu
. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Gr

Re: Use STATIC_URL in templates

2012-09-12 Thread Chao Chen
hi ,in the Django files you can read the docs/howto/static-files.txt On Wed, Sep 12, 2012 at 10:12 PM, Axel Aguilar wrote: > Hello, I'm pretty new with django, exactly the same than with python, and > after reading a few tutorials and make a very simple django site, I have a > django/python que

Re: In unitTest, GET Formset returns 302 instead of 200

2011-09-07 Thread Xinlei CHEN
@Malcolm, Sorry It should be some bad pastes :( Finally, I have solved the problem using the following 2 lines: c = Client() c.login(username='alex...@e.com', password='alex') In fact, I can't login in with the following code self.client.login(username='alex...@e.com', password='alex') I don't

Question about losing port number.

2011-09-26 Thread Chen Xu
90/login, it is missing ":9090". Could anyone please help? -- ⚡ Chen Xu ⚡ -- 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 from this group, send e

Re: Question about losing port number.

2011-09-26 Thread Chen Xu
ERVER['SERVER_PORT'] in > there > Source: http://php.net/manual/en/reserved.variables.server.php > > > On Mon, Sep 26, 2011 at 3:30 PM, Chen Xu wrote: > >> I have a general question about PHP: >> So basically I have a link, and I want the href to be absolute.

a django question about "python manage.py syncdb"

2011-10-14 Thread Chen Xu
ss post(models.Model): body = models.TextField() and then when I run "python manage.py syncdb" , it doesn't create the table "post" for me. Could anyone please help? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- You received this message because you are subscrib

Re: a django question about "python manage.py syncdb"

2011-10-14 Thread Chen Xu
I know that will work, but what I can do to just make "python manage.py syncdb" work? Thanks very much On Fri, Oct 14, 2011 at 2:37 AM, nicolas HERSOG wrote: > You can also type python manage.py sqlall and copy paste sql > instructions in your bd > > On Fri, Oct 14, 201

Re: a django question about "python manage.py syncdb"

2011-10-14 Thread Chen Xu
and when i tried "python manage.py sqlall " it gives empty. I think is it because I am not importing properly or something else is going wrong. Thanks On Fri, Oct 14, 2011 at 2:46 AM, Chen Xu wrote: > I know that will work, but what I can do to just make "python

Re: a django question about "python manage.py syncdb"

2011-10-14 Thread Chen Xu
tried both, neither works. Thanks On Fri, Oct 14, 2011 at 4:31 AM, Phang Mulianto wrote: > maybe you can try remove the models.py coz by default syncdb look for > models.py or anything beneath models folder...but cannot do both of them... > On Oct 14, 2011 5:49 PM, "Chen Xu"

Re: a django question about "python manage.py syncdb"

2011-10-14 Thread Chen Xu
t; > If I recall you'll also want to set > > class Meta: > app_label = "the name of your package" > > Because the models directory will screw up Django's ability to auto figure > it out. > > On Saturday, October 15, 2011 at 12:32 AM, Chen Xu wrote:

does php code works in Django

2011-10-20 Thread Chen Xu
Hi, everyone: I am new to Django, does anyone know whether php code works in Django? Thanks -- ⚡ Chen Xu ⚡ -- 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 u

How to add extra fields to User table

2011-10-23 Thread Chen Xu
ODULE = account.UserProfile", or using Model inheritance? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- 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 from this

question about django-admin.py

2011-12-25 Thread Chen Xu
settings.py urls.py it is like nested and duplicated directory. Thanks -- ⚡ Chen Xu ⚡ -- 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 unsubs

Re: question about django-admin.py

2011-12-25 Thread Chen Xu
to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- ⚡ Chen Xu ⚡ -- You received thi

Since Django has its own database schema, can we still use sqlalchemy instead?

2012-01-07 Thread Chen Xu
Hi, everyone: Since Django has its own database schema, can we still use sqlalchemy instead? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Could someone who has experience on both Django and Bottle please tell me what are the some differences between those two

2012-01-08 Thread Chen Xu
Hi, everyone: Could someone who has experience on both Django and Bottle please tell me what are the some differences between those two? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group.

Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-11 Thread Chen Xu
Hi, everyone: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group. To po

Customize "This field is required" message.

2012-01-16 Thread Chen Xu
Hi, everyone: I created a django form, when I validate it, the empty field that can not be none shows error message "This field is required." Is there a way to tell which filed is required instead of just saying "This field is required." in general? Ex: Username is required.

Could someone please give some suggestions about how to set up email sending settings on production.

2012-01-18 Thread Chen Xu
ls on production. Therefore, could someone please help? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- 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 unsub

Does Django provide a function that can get the base_url. Ex: http://127.0.0.1:8000/ if on local, www.example.com if on prod?

2012-01-21 Thread Chen Xu
Hi, everyone: Does Django provide a function that can get the base_url. Ex: http://127.0.0.1:8000/ if on local, www.example.com if on prod? Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users"

Question mark in Django URL Mapping

2012-01-26 Thread Chen Xu
_key=(?P[0-9a-zA-Z]+)$', 'activate_registration'), It seems like the question mark is causing the url mapping not found issue. Does anyone know why. Thanks very much Best regards -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Gro

how to show the text line number in the left of the textarea

2012-11-21 Thread jianhui chen
Hi all, I was wondering how can I show the text line numbers in the left of the text area. The result is somehow like this: 1 this is first line. 2 this is second line. ; The number is in the outside of the box, and it is automatically displayed when the user change the line.

Re: Error: No module named books

2012-11-29 Thread jianhui chen
I am learning django book too. Do you check the output of error.? Generally, there are hint like ValueError in the output. On Wednesday, November 28, 2012, Chris Recher wrote: > Hi all, > > I'm working through the Django book and I've run into an error that wasn't > predicted. I've got a project

Re: strangle url error in django with google app engine

2013-01-08 Thread jianhui chen
The problem is solved. Thanks. On Mon, Jan 7, 2013 at 10:02 AM, Daniel Roseman wrote: > On Monday, 7 January 2013 13:54:59 UTC, jianhui chen wrote: > >> Hi all. >>I use djangoappengine http://www.allbuttonspressed.** >> com/projects/djangoappen

show an image in django

2013-01-08 Thread jianhui chen
Hi all, I want to show an image in project in which the folder DIR looks like this: images/a.jpg templates/introduction.html In introduction.html I use It can show image correctly when I open the "introduction.html" directly using firefox, but it shows ""GET /images/gauge_example.jpg HTTP/1.1" 4

Re: Can't set static file directory.

2013-01-08 Thread jianhui chen
Hi, I am not to interrupt your question, actually I have the same problems as you. It seems that Django comers suffer this problem so much. I use Manager Static File as a guide, but still has problem. 1, Put your static files somewhere that staticfiles will find them I set following

Re: show an image in django

2013-01-09 Thread jianhui chen
/code/python/djangoBook/django-testapp-develop/static", #this only used for local debug ) and I use STATIC_URL in the html But, it must be something wrong in my setting.py since the project can't find the image. Any suggestions? Thanks. On Tue, Jan 8, 2013 at 4:00 PM, Mario Gudelj wrote:

Django realtime output to browser

2013-01-10 Thread ximin chen
I 'm trying to output something to browser in real-time. I started a subprocess.Popen() by django in server side, and I want to redirect these output from Popen to browser in real-time way. How to do that? Thanks! -- You received this message because you are subscribed to the Google Groups "Dj

Re: show an image in django

2013-01-12 Thread jianhui chen
ur image from your > browser via the following link: > > http://localhost:8000/static/images/gauge_example.jpg > > If that works change your replace {{STATIC_URL}} with '/static/'... > > = "390" height = "225" /> > > > On Tuesday, January 8, 20

database query error:Subqueries are not supported (yet)

2013-01-14 Thread jianhui chen
Hi all, There is an Subqueries are not supported (yet) error when I use "filter" function in databade. First, I create a database based in models.py: class ImageItem(models.Model): name = models.CharField(max_length = 100) depthOffset = models.FloatField() depthResize = mode

Model object save gives Warning: Data truncated for column

2013-01-14 Thread Chen Xu
create an object, and doing a .save() gives me Warning: Data truncated for column ''. However, I checked, the length of my string did not excess the limit. Could anyone help? Thanks -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups &qu

Re: Model object save gives Warning: Data truncated for column

2013-01-15 Thread Chen Xu
ng (e,g.; > PostgreSQL, MySQL, etc. - different people will have insights into > different back ends)? Is a stack trace printed - if so, provide it for > us? At least, what is the exact text of the error message? > > Bill > > On Tue, Jan 15, 2013 at 1:19 AM, Chen Xu wrote: &g

  1   2   3   >