On Jun 19, 5:21 am, Austin Govella <[EMAIL PROTECTED]> wrote:
> I'm confused on what part of the docs I'm supposed to reference:
> *http://www.djangoproject.com/documentation/db-api/
>
> I'm pulling all events for a city:
>
> events = Event.objects.filter(city=city)
>
> Each event can have a set o
On 6/19/08, AmanKow <[EMAIL PROTECTED]> wrote:
> Absolutely. I am not pointing fingers, but throwing my two cents into
> the answer to "Why PostgresSQL?" I think, given the current state of
> MySQL, the problems I outlined are very strong arguments for using
> postgres instead of mysql when
Chris H. wrote:
> Greetings all,
>
> I'm trying to figure out the best DRY way of doing this. I want to
> have a comments field on several of my models. The idea behind this
> field is that it would not actually be stored in the database,
> instead it would be appended to another field with a t
Also you can try to change character set with MySql Workbench or any
other visual tool, if you prefer visual way. Im not sure about it as
im not using visual tools.
On 19 июн, 14:34, "Ramdas S" <[EMAIL PROTECTED]> wrote:
> Even I am facing the same problem. Any ideas how exactly do you set in MyS
In MySql console client:
ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf-8;
or
ALTER TABLE t MODIFY latin1_text_col TEXT CHARACTER SET utf8;
for each table. or something like it. look to the manual -
http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
http://dev.mysql.com/doc/refman/5.0/en
On Thu, Jun 19, 2008 at 12:01 PM, AmanKow <[EMAIL PROTECTED]> wrote:
>
> On Jun 18, 8:48 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
> wrote:
>
> If I came off sounding accusatory, please forgive me,
> it was not my intent.
No problems. In the spirit of reconciliation, I didn't intend to be
har
Even I am facing the same problem. Any ideas how exactly do you set in MySQL
or does migrating PostGres solve it?
Ramdas S
2008/6/19 Vasiliy Gladkov <[EMAIL PROTECTED]>:
>
> looks like you have to set character set in your database. as i
> remember, i had similar problem with my mysql, wich has n
On Jun 18, 2:53 am, laspal <[EMAIL PROTECTED]> wrote:
> I have a list of employee and i want to sort it.
>
> Employee( this is my header)
> under which i have list of employee.
>
> So now my question is on clicking employee header I want to change the
> list.
> Like it happens for user in dja
On Jun 18, 9:32 pm, mw <[EMAIL PROTECTED]> wrote:
> I was thinking about ways to list some objects that are close to the
> current date. I could do this using datetime and just subtract the
> two dates, but this seems like something that has probably been done
> before. It seems like there would
I'm confused on what part of the docs I'm supposed to reference:
* http://www.djangoproject.com/documentation/db-api/
I'm pulling all events for a city:
events = Event.objects.filter(city=city)
Each event can have a set of attractions like food, dancing, drama,
djs, live music, art, etc.
How
looks like you have to set character set in your database. as i
remember, i had similar problem with my mysql, wich has non-utf-8
character set
On 19 июн, 04:23, "Keith Mallory" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am doing a small web site in django for my friend.
>
> The web site needs to
Hi, Russell!
On Jun 18, 8:48 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> Lets be clear here - the problem you are describing is fundamentally
> MySQL's problem, not Django's. MySQL doesn't interpret the standard
> right, and doesn't provide for an easy workaround. There isn't much
> Dj
I've been using jEdit for years as well.
O. Rutherford has created Django and Djagno+HTML modes available on
his personal site. The status says that they are not committed, and
that he has split the original Django mode.
http://www.rutherfurd.net/jedit/modes/index.html#django
Cheers,
Tai
On
urls.py for my application looks like this:
urlpatterns = patterns('ms.masterstroy.views',
(r'^(?P[^/]+)$', 'page'),
...
)
As i want to allow site editor to edit pages in convenient way without
built-in django admin, i use request.GET parameters like "http://
localhost:8000/somep
Hello,
I was thinking about ways to list some objects that are close to the
current date. I could do this using datetime and just subtract the
two dates, but this seems like something that has probably been done
before. It seems like there would be a more Django way of doing it
than me doing i
On Wed, Jun 18, 2008 at 9:46 PM, redxblade717 <[EMAIL PROTECTED]> wrote:
> I'm running Vista. I have Python 2.5 installed. I tried the method in
> which all you do is extract the official version of Django into C:
> \Python25\Lib\site-packages folder. So far I have yet to actually use
> django. Wh
Extract it, run setup.py and turn on the dev server or configure to work
with apache and you're good to go..
Pretty much like you would on any OS, just different paths and "rules"
sometimes
On Wed, Jun 18, 2008 at 9:46 PM, redxblade717 <[EMAIL PROTECTED]> wrote:
>
> I'm running Vista. I have Pyt
I'm running Vista. I have Python 2.5 installed. I tried the method in
which all you do is extract the official version of Django into C:
\Python25\Lib\site-packages folder. So far I have yet to actually use
django. What do I do? I wanna start learning and developing but
installing this is near imp
> Django Evolution is a slightly different beast - Django Evolution
> isn't part of the core Django project, and if you read the FAQ, I
> don't make the claim that MySQL is equally supported under Django
> Evolution - in fact, I clearly state that MySQL is a work in progress,
> simply due to my pe
On Thu, Jun 19, 2008 at 6:55 AM, Will Larson <[EMAIL PROTECTED]> wrote:
>
> Andrew,
>
> Running 'manage.py test' will create new tables, but not a new
> database. It can't create a new database, since it doesn't know what
> settings to use for that new database. However, your data stored in
> your
On Thu, Jun 19, 2008 at 6:23 AM, AmanKow <[EMAIL PROTECTED]> wrote:
>
> I have to disagree that Django supports these backends equally well.
> I've just been bitten badly by the 'dumpdata ' 'loaddata '
> problems with MySQL and innodb. I originally decided to go with MySQL
> (familiarity, for the
On Wed, Jun 18, 2008 at 4:53 PM, Huuuze <[EMAIL PROTECTED]> wrote:
>
> I have the following model:
>
> class Publishers(models.Model):
> books = models.CharField(maxlength=1, choices=BOOKS)
>
> BOOKS is a tuple:
> BOOKS = ( ('1', 'Book A'), ('2', 'Book B') )
>
> When I use form_for_instance(Publi
Andrew,
Running 'manage.py test' will create new tables, but not a new
database. It can't create a new database, since it doesn't know what
settings to use for that new database. However, your data stored in
your database won't get overwritten since you will be using a
temporary table.
B
Greetings all,
I'm trying to figure out the best DRY way of doing this. I want to
have a comments field on several of my models. The idea behind this
field is that it would not actually be stored in the database,
instead it would be appended to another field with a timestamp and the
user. Thu
I have to disagree that Django supports these backends equally well.
I've just been bitten badly by the 'dumpdata ' 'loaddata '
problems with MySQL and innodb. I originally decided to go with MySQL
(familiarity, for the most part). Using MyIsam tables is not an
option for me, I need the transact
Good afternoon.
I thought that unit tests run by 'manage.py test' create
a test db that is separate from the production database
by default, prepending 'test_' to the database
name specified by settings.DATABASE_NAME or using
settings.TEST_DATABASE_NAME for the name of the
new database.
I'm usin
Brian Rosner wrote:
> Hi Norman,
>
> On Jun 17, 2008, at 3:49 PM, Norman Harman wrote:
>
>> I want to use {% url %} to point into portions of the admin site(and
>> change the default url structure). I hacked this generally
>> unfullfilling but working version with old admin.
>
>
> This is not
I have the following model:
class Publishers(models.Model):
books = models.CharField(maxlength=1, choices=BOOKS)
BOOKS is a tuple:
BOOKS = ( ('1', 'Book A'), ('2', 'Book B') )
When I use form_for_instance(Publishers) to generate my template's
HTML based upon the Publisher model, the books fie
On Jun 18, 4:46 pm, saxon75 <[EMAIL PROTECTED]> wrote:
> Thanks for your response!
>
> I actually do something similar to what you describe when I'm
> displaying a single node and it works great. The problem I'm having
> is when I want to grab many nodes and display all of them on the same
> pa
Thanks for your response!
I actually do something similar to what you describe when I'm
displaying a single node and it works great. The problem I'm having
is when I want to grab many nodes and display all of them on the same
page. So, I suppose what I could do is either iterate over the
QueryS
On Jun 18, 7:00 am, timc3 <[EMAIL PROTECTED]> wrote:
> I am trying to use django-notification in an application but I am
> having some problems with it creating notice types. In fact the
> notification types are for the django-messages application but the
> management.py file looks correct:
>
>
Hi,
I've snipped out parts of your message for brevity...
>
> To make this a bit more concrete, here are the models in question:
>
>
> class Archetype(models.Model):
> classname = models.CharField(max_length=15)
>
> class Admin:
> pass
>
>
> What would be better is if I could call a sep
I'm working on a blog/CMS type application where I use a number of
different models for different content types. Each of the content
types (article, book review, film review, etc.) is sub-classed from a
central "Node" model. What I'd like to be able to do is display a
list of all nodes on a page
I hear that PostgresSQL does a better job of supporting unicode chars. But
no idea whether its true
RS
On Thu, Jun 19, 2008 at 12:24 AM, Michael Wieher <[EMAIL PROTECTED]>
wrote:
>
> Generally speaking, MySQL is ideal for small-to-mid range sites,
> although it will support larger loads.
>
> Pos
Generally speaking, MySQL is ideal for small-to-mid range sites,
although it will support larger loads.
Postgresql is where you'll end up going for performance when you
approach larger sites. It can compete with Oracle in situations MySQL
cannot.
This is off the top of my head, so I don't have a
i was using mysql for about 5y but now postgresql is better for me
because of exclusive locks and full transactions support
xhenxhe pisze:
> Thanks for the info. So I guess I can just stick with MySQL since I
> know it well... unless at some future date I find a compelling reason
> to swtich to P
Hello,
I am doing a small web site in django for my friend.
The web site needs to have couple of dozen pages in chinese.
What should I do in django to display these characters correctly?
Most of them content needs to be updated. We have tools to create the
chinese text in unicode. We want the s
Thanks for the info. So I guess I can just stick with MySQL since I
know it well... unless at some future date I find a compelling reason
to swtich to PostgreSQL
On Jun 18, 10:31 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > This may be a loaded question, but I was reading a blog post
> > that pos
sorry, I can't quite help you.
I'm not able to get ImageField to work at all.
you say save_FOO_field(filename, raw_contents)
it looks like the this method is magically added to the model, right ?
or must we implement this ?it sounds like you were trying to
implement this.
did you ever ge
On Jun 17, 5:43 pm, Anthony Floyd <[EMAIL PROTECTED]> wrote:
> Newbie alert.
Yup, newbie.
Anyway, for the archives: a FileField's exposed datatype is just a
unicode string, so setting it manually to a proper unicode path ...
say u'myproject/files/myfile.ext' ... seems to work just fine.
A>
--~-
Ok, it looks like the comments aren't listing in the admin either, I'm
guessing the admin uses the same function to list them. Is there
something wrong with my database maybe?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Molly,
You are on windows. So $ is not applicable to you. Go to command
prompt and type
python manage.py validate
Anyway, I have sent you a mail that points to one of Django
documentation page. See if you have the admin class defined.
If you are new to programming/python/django, I would recomme
> This may be a loaded question, but I was reading a blog post
> that postgresql is the preferred database for Django. Is this
> true? If so, why?
I think the "preference" comes from "that's what we happen to be
using, so we may be be better equipped to answer questions you
might have" as there
My bad, I mean I have to import all of the errors it gives me when I
got to run the site..
What do you mean "Have you tried $ python manage.py validate?"
I put that into the cmd if that's what you mean, and it gave me an
error for the $ sign, it said
"'$' is not recognized as an internal or ext
Where would you propose i do this?
On Jun 18, 12:15 pm, "Michael Wieher" <[EMAIL PROTECTED]>
wrote:
> did you try fiddling with the backslashes? django is ... clumsy with
> backslashes and urls. the trailing backslash in particular
>
> On Wed, Jun 18, 2008 at 11:09 AM, joshuajonah <[EMAIL PROT
What do you mean with "importing your models"? Do you mean syncing
them with the database? Have you tried $ python manage.py validate?
2008/6/18 Molly <[EMAIL PROTECTED]>:
>
> I am creating an app to be run on the desktop,
>
> I am in the process of importing my models, and I got this error:
>
>
did you try fiddling with the backslashes? django is ... clumsy with
backslashes and urls. the trailing backslash in particular
On Wed, Jun 18, 2008 at 11:09 AM, joshuajonah <[EMAIL PROTECTED]> wrote:
>
> Tried switching it to a normal object_detail generic view, same issue.
> >
>
--~--~--
Tried switching it to a normal object_detail generic view, same issue.
--~--~-~--~~~---~--~~
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
On Tue, Jun 17, 2008 at 5:22 PM, Norman Harman <[EMAIL PROTECTED]> wrote:
>
> Dan wrote:
>> There is a functionality which I am interested in and I wonder what is
>> the cleanest and most foward compatible way of doing things.
>>
>> I want models to sprout a suggest() method which would work like
I think you should map first the form to an object and then access the
name attribute of that object instance. It seems that you are trying
to access a model.CharField() directly.
On 18 jun, 00:43, redmonkey <[EMAIL PROTECTED]> wrote:
> I have two fields in a model, a name (CharField) and a descr
Have you tried this?
for border in country_instance.contries.all():
border.length = new_border
On 18 jun, 10:39, Peter Bulychev <[EMAIL PROTECTED]> wrote:
> Is it possible to insert additional row into table, which corresponds
> to ManyToManyField?
--~--~-~--~~~-
I don't understand what exactly are you trying to do but I think the
dictsort filter could help.
On 18 jun, 09:53, laspal <[EMAIL PROTECTED]> wrote:
> I have a list of employee and i want to sort it.
--~--~-~--~~~---~--~~
You received this message because you are
I am creating an app to be run on the desktop,
I am in the process of importing my models, and I got this error:
AttributeError at /admin/base/incident/add/
'NoneType' object has no attribute 'get_field_sets'
Request Method:
On Wed, Jun 18, 2008 at 9:55 AM, xhenxhe <[EMAIL PROTECTED]> wrote:
> This may be a loaded question, but I was reading a blog post that
> postgresql is the preferred database for Django. Is this true? If so,
> why?
Not exactly. Django works equally well with all the databases we
support -- we wou
I have been using the Django i18n framework with great success for
some time now, but now I'm hitting a wall:
In the same page I want to use three different languages without
regard to the browser language. I'm wishing for something like:
{% trans zh "distribution package"%}
{% trans en "distri
I didn't, but you can bet I will now. Thanks for the lead!
-Adam
On Jun 17, 4:22 pm, Dan <[EMAIL PROTECTED]> wrote:
> Did you take a look at Django Signals? You can intercept pre-save and
> post-save objects with them. You can use that to grab the data you
> want and fill your ProjectModificatio
You can see my original post here:
http://groups.google.com/group/django-users/browse_thread/thread/92eb98b3ea2a8d6b?hl=en
I have since re-installed python, mod_python, mysqldb, and django on
this server, same issue
I have setup an exact replica of the server locally and the exact code
it work
I wasn't really trying to point out a flaw in Django. I was trying to
bring something to light would probably be overlook. I know that it
never occurred to me that writing to self would cause issues. Which
it normally wouldn't outside of a for loop. It's just one of those
things that should b
This may be a loaded question, but I was reading a blog post that
postgresql is the preferred database for Django. Is this true? If so,
why?
I'm just curious because really, I have never used it.
--~--~-~--~~~---~--~~
You received this message because you are subs
Couldn't this also be done via:
Country(models.Model)
name = Char()
borders = ManyToMany(CountryBorders)
CountryBorders(models.Model):
border = models.FK(Country)
length = models.PosIntField()
With this you could have:
Country:
name: Germany
borders: France/1000Km, Austria/400Km,B
On Jun 16, 8:10 pm, Etienne Robillard <[EMAIL PROTECTED]>
wrote:
> On Mon, 16 Jun 2008 11:58:48 -0700 (PDT)
>
>
>
> radioflyer <[EMAIL PROTECTED]> wrote:
>
> > I've spent quite a lot of time reading through information about
> > extending Django's User model. I've read the arguments about
> > in
You'll have to do something like this:
Country(models.Model):
name = models.CharField(max_length = 100)
boders = models.ManyToManyField('self')
Meta:
verbose_name_plural = "countries"
BorderLength(models.Model):
countryA = models.ForeignKey(Country)
countryB = models
Yeah, sure.. I am still having some difficulties so it may take some
time! I have everything working except for the css is messed up when I
create an exe, so I am working on that. Also, I think I want to change
my server to cherrypy like you did.. still have to figure that all out
though. I'll get
Hi, yes it used to work on my production server under mod_python, and
it also works on my local machine (mod_python too).
I also found it weird at first (the double cursor.cursor), but it
worked
On Jun 18, 9:17 pm, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
> On Wed, 2008-06-18 at 03:57 -
Hello.
Is it possible to insert additional row into table, which corresponds
to ManyToManyField?
For instance, I have 'Countries' table, which possesses
ManyToManyField 'borders'. My goal is to store border length for
neighbor countries by inserting additional field 'length' into the
'borders' t
Hmm I would also be interested if anyone knows how to do this.
On Jun 17, 3:05 pm, mbdtsmh <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I have a question for you all that has been discussed before but I
> cannot figure out the best way to go about implementing.
>
> I have the following model:
On Wed, 2008-06-18 at 03:57 -0700, Julien wrote:
> Hi,
>
> I have a simple piece of code that works fine on mod_python and that
> breaks on mod_WSGI. Here's the code:
>
> from django.db import connection
> cursor = connection.cursor()
>
> cursor.execute(self.sql)
>
I am trying to use django-notification in an application but I am
having some problems with it creating notice types. In fact the
notification types are for the django-messages application but the
management.py file looks correct:
from django.dispatch import dispatcher
from django.db.models impor
Hi,
I have a simple piece of code that works fine on mod_python and that
breaks on mod_WSGI. Here's the code:
from django.db import connection
cursor = connection.cursor()
cursor.execute(self.sql)
rows = cursor.fetchall()
field_names = [field[0] for field
On Wed, Jun 18, 2008 at 4:48 AM, Masklinn <[EMAIL PROTECTED]> wrote:
> On 17 Jun 2008, at 18:34 , Daniel Hepper wrote:
>> This is not how a redirect works. If your view returns a
>> HttpResponseRedirect, Django sends a HTTP 302 code back to the browser
>> along with the new URL. The browser of the
On 17 Jun 2008, at 18:34 , Daniel Hepper wrote:
> Hi
> !
>> I must login a user in my site than redirect to another site with 2
>> parameters via post method.
>> It's possible do that in my registration view?
> This is not how a redirect works. If your view returns a
> HttpResponseRedirect, Djang
Hello,
I would see 2 approach to solve the problem you are describing :
* Server side - Order the list of employees in your view before
passing it to the template
* Client side - use a JS to order a Javascript variable
I hope this will help you.
--yml
On 18 juin, 09:53, laspal <[EMAIL PROTECT
On Jun 17, 11:59 pm, Joel Bernstein <[EMAIL PROTECTED]> wrote:
> Generally, Django could not care less where you put most of your
> static media files. There are two main exceptions, though:
>
> 1. Django needs to know the URL to the media files for its admin
> application (ADMIN_MEDIA_PREFIX)
>
On 17 juin, 12:50, Thierry <[EMAIL PROTECTED]> wrote:
> Is there anything built into the cache system to manage the deletion/
> invalidating of cache?
You mean, something like cache.delete(key) ?-)
--~--~-~--~~~---~--~~
You received this message because you are
On 18 juin, 00:14, Eric <[EMAIL PROTECTED]> wrote:
> This isn't a bug but it's something that might need to be documented
> to prevent folks from doing something that may hurt them later:
>
(snip)
>
> repr_node = ReprNode("obj")
>
> for i in range(10):
> repr_node.render(context)
hi,
I have a list of employee and i want to sort it.
Employee( this is my header)
under which i have list of employee.
So now my question is on clicking employee header I want to change the
list.
Like it happens for user in django admin.
Please help me out.
Thannks.
--~--~-~--~---
Ned Batchelder wrote:
> If you wanted to keep the alphabet issue out of the view, you could
> also do this:
>
> {% for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" %}
>
> --Ned.
> http://nedbatchelder.com
>
Super. I was just wondering how to do it.
Thanks Ned
Regards Ganesh
--~--~-~--~~
77 matches
Mail list logo