Re: Specific models without a database table

2011-08-21 Thread Kristofer Pettijohn
> That is substantially harder, but could be possible. The main problem is that > the Django ORM will want to write SQL queries when there's a link to the > EmailAccount model. > > Your best bet is probably a proxy model that contains a reference to the > relevant API record (e.g. the email

Re: Import problem

2011-08-21 Thread Jim
You are right, SleepyCal. I changed global to something else, and the import issue was solved. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: objects tools redirect to models def

2011-08-21 Thread Mariano DAngelo
screenshot http://professional-fighters.com/images/change-list.png the is shown the object tools of tools admin, I have to put a link into the change list template to add it, but I whant that when the button is pressed it's redirected to a python function, how can I do it? On 21 ago, 23:16, Mike

Re: How to create a sub-app directly

2011-08-21 Thread Jim
Thank you, folks. I am new to django. I read a blog the other day that suggests put all applications under a common directory, such as apps, to make the site directory neat, and I think that seems a good idea. That's why I thought it would be wonderful if manage.py could make an app under a

Re: How to create a sub-app directly

2011-08-21 Thread Mike Dewhirst
On 22/08/2011 1:22am, Jim wrote: I tried ../manage.py startapp someapp under apps/, but that created the someapp under mysite/ rather than under apps/. That's what is expected. mysite should contain settings.py and mysite/apps should contain models.py (among other files). If you want a

Re: Specific models without a database table

2011-08-21 Thread Kristofer Pettijohn
Great, thank to both of you. I'm coming from a world of CakePHP. I did more Python programming back in the day, and am getting back into it, so I'm trying to get more familiar with Django. Thanks for the suggestions, I'll see what I can make happen. - Original Message - From:

Re: objects tools redirect to models def

2011-08-21 Thread Mike Dewhirst
On 22/08/2011 11:56am, Mariano DAngelo wrote: Hi I'm new in django I'm trying to redirect a personalize object tool to a function on a model module how can I do this becouse alll tutorial show how to redirect to a link thanks I'm not sure what you are asking about. Redirection is

objects tools redirect to models def

2011-08-21 Thread Mariano DAngelo
Hi I'm new in django I'm trying to redirect a personalize object tool to a function on a model module how can I do this becouse alll tutorial show how to redirect to a link thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: CSS question

2011-08-21 Thread Joshua Russo
Thanks for the help, CSS is always my gremlin -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/TmoW1R-DflQJ. To post to this group, send email to

Re: CSS question

2011-08-21 Thread Micky Hulse
P.S. There's a great CSS listserv here: -- 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 email to

Re: CSS question

2011-08-21 Thread Micky Hulse
Hello, [ot] One way to do it... You could make all of your elements (label/input) inside of your block container display "inline" and then use something like this: #someContainer * { ... vertical-align: middle !important; ... } The "!important" (what I call "not important") is

Re: extending the User profile - which way to go?

2011-08-21 Thread Axel Bock
Thanks for all your replies, it makes sense to wait until it's a performance problem :) Greetings, Axel. Am 21.08.2011 um 22:14 schrieb Simon Connah: > On 21 Aug 2011, at 19:37, Shawn Milochik wrote: > >> Using a OneToOne field does the same thing as a FK with unique set to true, >> and

CSS question

2011-08-21 Thread Joshua Russo
I know this is a bit off topic but I know this place is full of very helpful intelligent people. :o) Ok so I have an html block (div, p, doesn't matter what kind), and I fill it with a label and an input text field. The input is always larger than the label (rightly so), but the label is

Re: Best approach to handling different types of Users

2011-08-21 Thread Joshua Russo
Things will break in the sense that, if you add another app that accesses the User model they will only see the original implementation. They won't get your subclass. Other than that, other apps that use the User model should "work" just fine. Unless I'm missing something, and in that case

Re: Django beginner question

2011-08-21 Thread Christian Ramsey
Ok I see. I like the idea of this I will try it, aha!! I truly understand, thank you so much and I will post my outcome! Christian On 21 Aug 2011, at 10:17, Gelonida N wrote: > On 08/21/2011 03:25 AM, Christian Ramsey wrote: >> Hi and thank you so much, this provided a ton of clarity,

Re: Djangonaut is looking for a job

2011-08-21 Thread Eugeny Belykh
http://www.donanza.com/jobs/django also going to be checked 2011/8/22 Eugeny Belykh > ok)) > > > 2011/8/19 Andre Terra > >> http://djangogigs.com/ >> https://www.djangoproject.com/rss/community/jobs/ >> >> 2011/8/19 Eugeny Belykh

Re: Django beginner question

2011-08-21 Thread Christian Ramsey
Taking a look at this now! Cheers. On 20 Aug 2011, at 19:14, kenneth gonsalves wrote: > On Sat, 2011-08-20 at 17:03 -0700, Christian Ramsey wrote: >> Thank you for your response, I was trying to explain it in detail, I >> believe I get the greater whole of the project which I've specified by >>

Re: Djangonaut is looking for a job

2011-08-21 Thread Eugeny Belykh
ok)) 2011/8/19 Andre Terra > http://djangogigs.com/ > https://www.djangoproject.com/rss/community/jobs/ > > 2011/8/19 Eugeny Belykh > >> hi)) >> i think yes,we should keep trying >> >> >> 2011/8/17 枯藤天涯 >> >>> hello,I am from

Re: Best approach to handling different types of Users

2011-08-21 Thread dfolland
Like I said use the "Groups" and then like what was suggested "Permissions". That should handle what your are trying to do and not introduce any conflicts. On Aug 18, 9:17 am, dfolland wrote: > Try using "Groups" that is part of the Django user authentication. > >

Re: Admin Stopped Saving Record Changes!

2011-08-21 Thread Yaşar Arabacı
Well, that is because no error occured :) 2011/8/21 Lee > Solved: in the process of fixing indentation errors I accidentally > indented "obj.save()" so that it only fired on inserts not updates. > Interesting that Admin still generated the "Successful" message when > no

Re: Admin Stopped Saving Record Changes!

2011-08-21 Thread Lee
Solved: in the process of fixing indentation errors I accidentally indented "obj.save()" so that it only fired on inserts not updates. Interesting that Admin still generated the "Successful" message when no save occurred. -- You received this message because you are subscribed to the Google

Help installing django-sentry

2011-08-21 Thread tharshan muthulingam
Hi, I have been having alot of trouble trying to install and run django-sentry. My project directory is ~/django_projects/Project Inside there i have the simple polls app from the tutorial, and I have installed sentry using pip. I have added it to the list of installed apps. When I go to the

Re: extending the User profile - which way to go?

2011-08-21 Thread Simon Connah
On 21 Aug 2011, at 19:37, Shawn Milochik wrote: > Using a OneToOne field does the same thing as a FK with unique set to true, > and simplifies queryset syntax. Good point. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Port of Django Template Language to PHP

2011-08-21 Thread Yaşar Arabacı
I am considering writing about it, but I want to test it first. Since I am not on my own computer, that will need to wait a little :) 2011/8/21 Rune Kaagaard > @Yaşar: Thanks a lot, would love to see the post if you really do write it! > > @Kenneth+@Masklinn: You are right,

Admin Stopped Saving Record Changes!

2011-08-21 Thread Lee
I've been happily tuning my Admin app the last few days, and suddenly noticed record changes (UPDATE) are no longer being saved to the database. Adds (INSERT) are working fine. I DO get the 'The ModelName "_unicode_" was changed successfully' message, but the database record is not affected, and

Re: extending the User profile - which way to go?

2011-08-21 Thread Shawn Milochik
Using a OneToOne field does the same thing as a FK with unique set to true, and simplifies queryset syntax. -- 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

Re: extending the User profile - which way to go?

2011-08-21 Thread Simon Connah
My personal preference is to just create a new model class with a ForeignKey field pointing to the User model with unique=True set. That way you can extend the User object in as many different apps as you want. For instance in a forum app you could have a model tracking the number of posts a

Re: Django beginner question

2011-08-21 Thread Gelonida N
On 08/21/2011 03:25 AM, Christian Ramsey wrote: > Hi and thank you so much, this provided a ton of clarity, especially > the modelling of the order table with a foreign key to a user, I was > locked on thinking the user table needed to somehow have the orders > within it. But I see I needed to

Re: How to create a sub-app directly

2011-08-21 Thread Subhranath Chunder
>From what I understood, by "sub-apps" Jim meant creating the application in a sub-directory, or more specifically maybe inside another python package, using the manage.py command for the sake of convenience and creating using a single command. On Sun, Aug 21, 2011 at 10:13 PM, Praveen Krishna R

Re: How to create a sub-app directly

2011-08-21 Thread Praveen Krishna R
*Is there a concept of sub-apps exist in Django !?* *I knew some concepts like independant reusable apps.* *You can easily handle the rest with your urls right ?! correct me? * On Sun, Aug 21, 2011 at 6:27 PM, Subhranath Chunder wrote: > Extend the manage.py functionality,

Re: How to create a sub-app directly

2011-08-21 Thread Subhranath Chunder
Extend the manage.py functionality, by adding your custom command. https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ On Sun, Aug 21, 2011 at 8:52 PM, Jim wrote: > Hello folks, > > Here is the story. I created a site, mysite, with this command

How to create a sub-app directly

2011-08-21 Thread Jim
Hello folks, Here is the story. I created a site, mysite, with this command django-admin startproject mysite. Then, under the directory mysite/, I created an app named apps with this command ./manage.py startapp apps. apps is meant to hold all applications for mysite. Now, here comes the

Re: DB based translations?

2011-08-21 Thread Joshua Russo
Ooo that looks like what I'm looking for. Thanks for the tip. Do you have any experience with it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Port of Django Template Language to PHP

2011-08-21 Thread Rune Kaagaard
@Yaşar: Thanks a lot, would love to see the post if you really do write it! @Kenneth+@Masklinn: You are right, there are a lot of template languages already, but this particular wheel is - unlike twig - not a compiled language but implemented in pure PHP as an Iterator, allowing it to blend in as

Re: extending the User profile - which way to go?

2011-08-21 Thread Matt Schinckel
You haven't really provided a reason why to 'do it the django way', rather than inheriting from User. You do make a valid point about the separate data being in a different table: the difference would be that with using UserProfile, you need to either do the .select_related() yourself, of have

Re: Import problem

2011-08-21 Thread Cal Leeming [Simplicity Media Ltd]
I could be wrong but ,i dont think the word 'global' is allowed anywhere in a file name ,import reference, class name etc.. i could be wrong tho. Try with global2 ?? On Aug 21, 2011 2:10 PM, "Jim" wrote: > Hello folks, > > I am new to both Python and Django. And the story

Re: FW: MySQLdb version doesn't match _mysql version

2011-08-21 Thread Ramiro Morales
On Sun, Aug 21, 2011 at 5:08 AM, Hadassa Golovenshitz wrote: > > > Hi everyone, > > Thank you for taking the time to look at my question. > > > > I’m setting up a django project that I got from a code repository, and in > trying to run ./manage.py syncdb I get the following

Re: Newbe DateTimeField Question

2011-08-21 Thread dm03514
you can set default=None, that way you don't have to explicityly save that value as none every time you save an object. On Aug 21, 7:33 am, Torsten wrote: > Hi > > I simply want the DateTime to be set to null. > > payed_at = models.DateTimeField(null=True) > > but

Newbe DateTimeField Question

2011-08-21 Thread Torsten
Hi I simply want the DateTime to be set to null. payed_at = models.DateTimeField(null=True) but always get this as an error: IntegrityError at /admin/invoice/invoice/add/ invoice_invoice.payed_at may not be NULL Thanks for help. Torsten -- You received this message because you are

FW: MySQLdb version doesn't match _mysql version

2011-08-21 Thread Hadassa Golovenshitz
appreciate any suggestions! __ Information from ESET NOD32 Antivirus, version of virus signature database 6397 (20110821) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- You received this message because you are subscribed to the Google Groups "Django

Import problem

2011-08-21 Thread Jim
Hello folks, I am new to both Python and Django. And the story is a little long. So, please bear with me. Recently I created a site named djangoSite to practice the Django framework. The first thing I want to do is to create a SQLite database to hold global data of the site. As simple as it

Re: What I am missing is this Django "logout"?

2011-08-21 Thread Subhranath Chunder
No, it's working is not a mistake by itself. Because now, the regular expression is extracting an absolute path, and not a relative url path. But, you are surely using things "the wrong way". :) On Sun, Aug 21, 2011 at 4:57 PM, Andre Lopes wrote: > Hi, > > Thanks for

Re: What I am missing is this Django "logout"?

2011-08-21 Thread Andre Lopes
Hi, Thanks for the reply. I have discovered that If I use this: [code] Welcome {{ request.user.username }}. Logout [/code] Instead of: [code] Welcome {{ request.user.username }}. Logout [/code] I got the code working as expected. The thing is that I got an URL like this:

Re: DB based translations?

2011-08-21 Thread rebus_
On 21 August 2011 04:41, Joshua Russo wrote: > Ok, I've been looking into the different database based translation > solutions out there and I can't find what I really had in mind. I need to > have non-technical people easily update the translations. So I wanted a >

Re: why i cannot load css from django lib?

2011-08-21 Thread smith jack
Thank you, but i am not using django with apache, but with python manage.py runserver command, i find it confused, if i set the debug mode to be true, then things may go well, what happened? 2011/8/21 zhijun wu : > I've encountered such a problem, so maybe I can help. > I

Re: why i cannot load css from django lib?

2011-08-21 Thread zhijun wu
I've encountered such a problem, so maybe I can help. I solved that like this: First, make sure you have the right permission to the folder 'media'. Then, #setting.py MEDIA_ROOT='' #Use absolute path ADMIN_MEDIA_PAREFIX='' #'/media/', focus on the 2 slashs #httpd.conf Alias