Oh ... by the way, we aren't using Access as a front end to Django.
There is nothing (far as I know) in Django to front-end to!
This app has been successfully making us money for more than 20
years. The data side moved to MySQL a long time ago (can't remember
when) to enhance performance and secu
How can a view tweak the response object so that client sees a
specific anchor instead of the top of the page?
Chris
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubs
Hi,
I had the exact same problem, and I had _not_ installed Weave.
The offending config entry in my case was:
"chrome://global/locale/intl.properties"
and it was at the bottom of the accepted languages list. This is on
Firefox 3.6.6
I can reproduce the problem anytime by visiting about:config and
On Jul 14, 8:56 pm, Rolando Espinoza La Fuente
wrote:
> On Wed, Jul 14, 2010 at 6:55 AM, Pedram wrote:
> > Hello,
> > Sorry if this thread already exists. I've searched but nothing could
> > find.
> > I tried this code:
> > python manage.py graph_models graphdb -o scheme.dot
> > But I got this
Following on the smashing success of PostgreSQL Conference East,
PostgreSQL Conference West, The PostgreSQL Conference for Decision
Makers, End Users and Developers, is being held at the St. Francis,
Westin Hotel in San Francisco from November 2nd through 4th 2010. Please
join us in making this the
On 07/14/2010 02:28 PM, Russell Keith-Magee wrote:
I'm glad we've worked out that Weave is the culprit, but nobody has
answered the question of whether this is an indicator of a problem
with Django itself. What is weave passing as a header (and under what
conditions) that is causing a problem? I
is there a way to have a model class sorted on multiple fields?
in the meta class of my models I set the ordering, but django uses
only the first field for ordering;
a second field is just ignored.
(I am aware that if a users starts to sort using table headers in the
admin interface only one field
One idea that springs to mind is to add a property method to your
model that returns that self.group field as a list. With that list you
could add another property that returned all the actual group items.
Then write a custom admin view for add/change/view of that model which
works with the group i
Using ubernostroms Django Registration app coupled with his Profile
app, both highly recommended, got the default app up and running no
problems at all.
I'm unable to override any default behaviour the proper way, as I
can't seem to pass any extra parameters through the urls.py file. Here
is my url
So, I am using request.sessions in one of my views functions but I
want to add a few more fields to the Session class so it will be
customized for my project. When I tried to go to the Session class
(in django.contrib.sessions.models) and simply adding in an extra
field, and then adding it to my a
You've also got a shortcut method for the common case of raising 404
if the object doesn't exist:
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#get-object-or-404
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
This is kind of an aside to your question, but I think you'll find it
useful...
There are two types of static media that you'll want to have served
separately to your dynamic django application:
* project static media
* uploaded media
I like to keep these two separate. My preferred way to do thi
One slight difference: If you need to deal with the object not being found,
you get a different error using get as opposed to using filter and then
pulling the first element out of the collection. Here's an example, with
Location being the model class:
try:
Location.objects.filter(pk=id)[0]
ex
I am working on debugging a basic template, and after correcting some other
error, I got:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py",
line 280, in run
self.result = application(self.environ, self.start_response)
File "
Hi,
Wonder if someone can help.
I have a piece of code (filtched from elsewhere) that retrieves the
comments for a particular Entry (blog post):
Comment.objects.filter(content_type=ContentType.objects.get_for_model(Entry),
object_pk__in=Entry.objects.filter(title=self.title))
Problem is, that wit
Thank you; the first seemed to work nicely.
On Wed, Jul 14, 2010 at 2:36 PM, ringemup wrote:
> Try:
>
>directory.models.Entity.objects.get(pk=id)
>
> Which does pretty much the same thing as:
>
>directory.models.Entity.objects.filter(id__exact = id)[0]
>
> (note id__exact rather than id_
Try:
directory.models.Entity.objects.get(pk=id)
Which does pretty much the same thing as:
directory.models.Entity.objects.filter(id__exact = id)[0]
(note id__exact rather than id__equals)
On Jul 14, 3:18 pm, Jonathan Hayward
wrote:
> How do I look up a model instance by id (its prim
I'm interested and I doubt I'm the only one.
On Thu, Jul 8, 2010 at 4:34 AM, euan.godd...@googlemail.com <
euan.godd...@gmail.com> wrote:
> I have created a decorator for Django views which handles AJAX
> tracebacks and sends the traceback back to the AJAX application as
> JSON, e.g.
>
> {'status
How do I look up a model instance by id (its primary key)? I have:
entity = directory.models.Entity.objects.filter(id__equals = id)[0]
and am getting:
FieldError at /profile/1
Join on field 'id' not permitted. Did you misspell 'equals' for the lookup type?
Is there another way I should be
I would be quite interested. I use instant django so might work out
for me.
Thanos
On Jul 14, 2010, at 2:48 PM, cjl wrote:
Thanks for the replies.
To be clear, I'm not looking for hosting, I'm looking for someone to
take it completely off my hands. This means doing whatever you want
with i
Thanks for the replies.
To be clear, I'm not looking for hosting, I'm looking for someone to
take it completely off my hands. This means doing whatever you want
with it, but I would hope it would at least mean keeping it up to
date. This only takes and hour or two whenever a new version of Django
Sorry, I reply to this mail two times.
On Jul 14, 7:47 pm, Alexandre González wrote:
> Are you talking about
> this:http://www.djangoproject.com/documentation/models/custom_pk/??
>
> You must declar jono as:
>
> jono = models.PositiveIntergerField(primary_key=True)
>
> On Wed, Jul 14, 2010 at 19
Does anyone know where in the admin changeview the fields in a ModelForm is
populated with the information from the database? I was hoping to override
one of the fields in a subclassed ModelForm.__init__(), e.g.:
self.base_fields[field_name].initial = 'foo'
But the population appears to be happen
Just set primary_key=True on your field:
jono = models.PositiveIntegerField(primary_key=True)
See the django documentation for details:
http://docs.djangoproject.com/en/dev/topics/db/models/#id1
Nuno
On Wed, Jul 14, 2010 at 6:38 PM, Jagdeep Singh Malhi
wrote:
> I try this code to create datab
Are you talking about this:
http://www.djangoproject.com/documentation/models/custom_pk/ ??
You must declar jono as:
jono = models.PositiveIntergerField(primary_key=True)
On Wed, Jul 14, 2010 at 19:38, Jagdeep Singh Malhi
wrote:
> I try this code to create database in using django.
>
> file :m
Are you talking about this:
http://www.djangoproject.com/documentation/models/custom_pk/ ??
You must declar jono as:
jono = models.PositiveIntergerField(primary_key=True)
On Wed, Jul 14, 2010 at 19:38, Jagdeep Singh Malhi
wrote:
> I try this code to create database in using django.
>
> file :m
I'm not exactly sure what you want. So, I'm only assuming that you might be
trying to do something like:
jono = models.AutoField(unique=True)
instead of what you're currently using.
Thanks,
Subhranath Chunder.
On Wed, Jul 14, 2010 at 11:08 PM, Jagdeep Singh Malhi <
singh.malh...@gmail.com> wrot
I try this code to create database in using django.
file :models.py
class amount(models.Model):
jono = models.PositiveIntegerField(unique=True)
name = models.CharField(max_length=750)
receipt = models.CharField(max_length=200)
phno = models.CharField(max_length=25)
type =
This worked:
import datetime
Then, use 'datetime.datetime.now()' instead of 'datetime.now()'
Thanks guys!
On Jul 14, 11:57 am, Subhranath Chunder wrote:
> How did u import the datetime module?
> If you did:
>
> a>
> import datetime
> Then, use 'datetime.datetime.now()' instead of 'datetime.now(
On Wed, Jul 14, 2010 at 6:55 AM, Pedram wrote:
> Hello,
> Sorry if this thread already exists. I've searched but nothing could
> find.
> I tried this code:
> python manage.py graph_models graphdb -o scheme.dot
> But I got this error:
> Unknown command: 'graph_models'
> Type 'manage.py help' for us
Hello!
I have a problem which i can't solve on my own. I have already
searched the web, but without success.
I have the following two models which are related with a many to many
relationship using Django 1.1 with Postgres on Unix:
FIELD_TYPES = ( (u'int',u'int'),
How did u import the datetime module?
If you did:
a>
import datetime
Then, use 'datetime.datetime.now()' instead of 'datetime.now()'
b>
from datetime import datetime
Then 'datetime.now()' should work correctly.
Thanks,
Subhranath Chunder.
On Wed, Jul 14, 2010 at 9:13 PM, Chris McComas wrote:
Hi,
On Wed, Jul 14, 2010 at 7:51 AM, Jon Walsh wrote:
> Hi guys,
>
> This might be best explained by example... for the following model:
>
> class Setting(models.Model):
>data_type = models.CharField()
>value = models.TextField()
>
> I want Django's admin to display a different form widg
Sorry to be so slow in responding. We were able to turn debugging
on... and no one saw a 404 error with debugging on. Of course,
debugging took a toll on the database server so we were not able to
just leave it on.
We have audited our code and we were able to clean up quite a bit but
we do see thi
Hi,
On Tue, Jul 13, 2010 at 8:29 PM, Continuation wrote:
> I have a data submission form that is visible to everyone, but a user
> must be registered & logged in before the data can be submitted
>
> I want to allow users who are not logged in to submit data through
> the form first, and then a
I'm using it in my template...
Basically this http://dpaste.com/218114/
Mainly I want to use it for the {% if %} but I tried to just show it
was well and still nothing...
On Jul 14, 11:49 am, Daniel Roseman wrote:
> On Jul 14, 4:43 pm, Chris McComas wrote:
>
> > This is my model, I'm trying
This code works fine for me:
In [1]: from gallery.models import Gallery
In [2]: g = Gallery.objects.all()[0]
In [3]: g.created_at
Out[3]: datetime.datetime(2010, 4, 1, 7, 11, 51)
In [4]: import datetime
In [5]: n = datetime.datetime.now()
In [6]: g.created_at > n
Out[6]: False
In [7]: [g.created_a
On Jul 14, 4:43 pm, Chris McComas wrote:
> This is my model, I'm trying to set it so that if the game is in the
> future, based on the field date, then to return True, if not return
> False.
>
> http://dpaste.com/218111/
>
> I am importing datetime in my models.py but for some reason it's
> giving
Not sure if I understood the question, but here goes:
Are you using the devserver on production? If you are, stop!
It's perfectly fine to serve the static media via the dev server in a
*DEV* environment.
Here's some information:
http://docs.djangoproject.com/en/dev/howto/static-files/#limiting-u
Sounds like you're quite new to all this. If I was you I'd install
setuptools for windows, it'll make adding packages a lot easier for
you.
http://thinkhole.org/wp/2007/02/01/howto-install-setuptools-in-windows/
The "setup.py install" command, you should have "python" before that
so it actually ex
This is my model, I'm trying to set it so that if the game is in the
future, based on the field date, then to return True, if not return
False.
http://dpaste.com/218111/
I am importing datetime in my models.py but for some reason it's
giving me nothing. I tried displaying future and nothing shows
Tom,
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit t
Hi Heleen,
I think this is because your running the users through an intermediate
model. That changes the way you need to work with the M2M data. You
should be working on the Permission model/objects instead. If you
check out the M2M docs for models via an intermediate:
http://docs.djangoproject.
I typically add a config to apache to ignore my media folder and not
handle it with python so that requests to /media/.* all go straight to
the webserver and don't go via django. I typically have something like
this sitting in my conf's:
SetHandler None
Options -Indexes
I
On Wed, Jul 14, 2010 at 3:50 PM, Nuno Maltez wrote:
> Sorry, I can't reproduce your error with django 1.2.
>
> I copied your models (just removed the intermediaty "Permission"
> because I don't know your User model) into a new app and I have 2
Oops, forgot to add i made the ManyToMany a relation
I solved this issue by making the FileField (or ImageField) save the
files into an Apache (or other web server) served directory. Though
obviously this has security implications so I only do this for the
password protected admin.
Hope that helps
cheers, Jon
On Jul 15, 12:33 am, reduxdj wrote:
>
Hi guys,
This might be best explained by example... for the following model:
class Setting(models.Model):
data_type = models.CharField()
value = models.TextField()
I want Django's admin to display a different form widget for the
"value" field depending on the input of "data_type". For ex
On Wed, Jul 14, 2010 at 1:45 PM, rmschne wrote:
> As I understand, in Django/Python, True is 1 and False=0. And when
> connected to the database, we use a TinyInt for that variable and
> assign it to a NullBooleanField.
True and False are global objects of type bool, not 1 and 0. bool
constructo
Sorry, I can't reproduce your error with django 1.2.
I copied your models (just removed the intermediaty "Permission"
because I don't know your User model) into a new app and I have 2
scenarios Adding an Application in the admin:
a) if I select a User and Folder, the validation runs just fine
b)
I want to use ImageField for users to upload static content and I need
a little advice from a some django pros on how to do this in a dev
enviornment. I notice the disclaimer that django dev server should not
used to serve static content, or it shouldn't be. So...
What's the best practice for thi
Hi all,
I have been working on a number of projects here at u-dox.com, we're a
very heavy django shop and have been mindful to try and keep as much
of the code generic as possible. A few things which I have written
that might be useful to others are two fairly standalone apps - one
for syncing and
Thank you for your reply.
Yes I have selected a user and folder.
I believe ManyToMany fields are always optional (hence many to many).
So my users and company fields are optional, but my folder field
isn't.
When I add a new Application in the Admin I do specify a folder and
users (if I don't I wou
Nick, thank you so much for figuring this out!!
On Jul 8, 11:12 am, Nick Raptis wrote:
> In firefox, check your preffered language settings, in the content tab.
>
> If there is a non-standard value there (perhaps "/etc/locale/prefs.conf"
> or something) instead of a locale like en-US,
> some dja
Great,
Tom I looked a the django book carefully and did the following:
return render_to_response('listing.html', {'form':form,'error': True})
and works...
thanks for responding as well
On Jul 14, 7:37 am, Tom Evans wrote:
> On Tue, Jul 13, 2010 at 4:06 PM, reduxdj wrote:
> > HI,
>
> > Forgiv
I'm trying to install Django on my laptop but it's not wanting to
import through the command line. I pointed to the "setup.py install"
but when I try this notepad comes up with some code and that's it. I
go and check my Python directory and there are no Django files in
there.
Any ideas?
Thanks!
As I understand, in Django/Python, True is 1 and False=0. And when
connected to the database, we use a TinyInt for that variable and
assign it to a NullBooleanField.
Problem is that some people use their PC's with a Microsoft Access
based front end to the database (MySQL). The forms use check-bo
I'm getting an error during makemessages:
Making project level Javascript strings
processing language fr
Error: errors happened while running msgmerge
msgmerge: input file doesn't contain a header entry with a charset
specification
If I look in project/locale/fr/LC_MESSAGES I see a file djan
Alan,
This is simple python string formatting. You may refer to the following for
more details:
http://docs.python.org/library/stdtypes.html#string-formatting
Thanks,
Subhranath Chunder.
On Wed, Jul 14, 2010 at 5:31 PM, alan-l
wrote:
> brilliant, thank you.
>
> is there a python or django page
Wow - I think you just fixed my problem! Awesome.
Thanks!
On Jul 12, 4:57 pm, Jari Pennanen wrote:
> Hi, I know this comes late, but for the future reference:
>
> My problem was that I had "locale" directory in *project* directory,
> "myproject/locale" but I didn't have myproject in INSTALLED_AP
Hi,
Just a guess: have you actually selected a user and a folder when
submitting the form? I think only valid field are present on the
cleaned_data dict, and your users and folder fields are not optional
(blank=True, null=True).
hth,
nuno
On Tue, Jul 13, 2010 at 1:45 PM, Heleen wrote:
> Hello,
brilliant, thank you.
is there a python or django page that layouts all the available
options that can be after the percentage and what they mean?
Thanks,
Alan
On Jul 14, 11:35 am, Subhranath Chunder wrote:
> Try this instead:
>
> def __unicode__(self):
> return u"%d" % (self.mynumber, )
>
Any ideas? This is driving me nuts. I've just hit a problem where I
have strings defined for two apps:
project/app1/locale
project/app2/locale
I added a new project app3 (project/app3/locale) and defined strings,
compiled them but they're not available in the catalog. I'm starting
to think there
On Tue, Jul 13, 2010 at 4:06 PM, reduxdj wrote:
> HI,
>
> Forgive me, here's another n00b doozie. I've created a form, which
> extends form, however, my form is not validating and I can't get the
> form to print errors next to my form fields. What's curious, at the
> form.is_valid()
> in all the e
Hi Guys,
I'm building a django application and i want to set up a class that wiil
the user te reset his password each 2 weeks.
Thanks
--
Nadae Ivar Badio
+221773018068
+221706404845
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post t
On Wed, Jul 14, 2010 at 6:47 PM, George Sakkis wrote:
> On Jul 12, 3:59 pm, Andi wrote:
>
>> On Jul 12, 3:40 pm, Nick Raptis wrote:
>>
>> > Yea, for some reason, my thoughts went to Weave too. Maybe it has
>> > something to do with it, maybe it doesn't. Haven't got any more trouble
>> > since I
Hello,
Sorry if this thread already exists. I've searched but nothing could
find.
I tried this code:
python manage.py graph_models graphdb -o scheme.dot
But I got this error:
Unknown command: 'graph_models'
Type 'manage.py help' for usage.
I installed python-graphviz, graphviz-deb, python-django-e
Try this instead:
def __unicode__(self):
return u"%d" % (self.mynumber, )
On Wed, Jul 14, 2010 at 3:57 PM, Nuno Maltez wrote:
> Hi,
>
> Why not
>
> def __unicode__(self):
>return u"%d" % self.mynumber
>
> ?
>
> Nuno
>
> On Wed, Jul 14, 2010 at 11:15 AM, alan-l
> wrote:
> > Hi,
> >
> >
On Jul 12, 3:59 pm, Andi wrote:
> On Jul 12, 3:40 pm, Nick Raptis wrote:
>
> > Yea, for some reason, my thoughts went to Weave too. Maybe it has
> > something to do with it, maybe it doesn't. Haven't got any more trouble
> > since I fixed it though.
> > Glad I could help :)
>
> I'm using Weave t
Hi,
Why not
def __unicode__(self):
return u"%d" % self.mynumber
?
Nuno
On Wed, Jul 14, 2010 at 11:15 AM, alan-l
wrote:
> Hi,
>
> in the tutorial i see that to return a string or a combination of
> strings, i can do:
> def __unicode__(self):
> return u'%s %s' % (self.firstname, s
Hi,
in the tutorial i see that to return a string or a combination of
strings, i can do:
def __unicode__(self):
return u'%s %s' % (self.firstname, self.surname)
what do i need to do to return a number? or more importantly, what is
the def called to ensure it is read and returned when
On Jul 14, 12:17 am, Micah wrote:
> Example:http://dpaste.com/217886/
>
> Line 6 is what I have a question about. Should I use javascript to
> deal with that? If so, can the javascript access the django boolean?
> Is there a way for Django to make runtime changes like this (filter /
> unfilter c
On Jul 14, 12:22 am, reduxdj wrote:
> HI,
>
> (sorry for this re-post, my original post isn't here??, so I replaced
> it, and I have been checking up all day as I hope to find the
> solution)
>
> Forgive me, here's another n00b doozie. I've created a form, which
> extends form, however, my form
HI friends,
How can we change the database schema ``Public`` to ``MySchema``.
Default syncdb will create tables in public schema. How can i change
it?
Thanks & Regards,
Jayapal D
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
73 matches
Mail list logo