On Jan 24, 12:57 pm, Malcolm Tredinnick
wrote:
> On Fri, 2009-01-23 at 12:15 -0800, Julien Phalip wrote:
> > On Jan 24, 2:45 am, varikin wrote:
> > > The UploadedFile[1] object has a field called content_type. So if you
> > > have this in a form:
>
> > > myfile = request.FILES['some_file']
> > >
It would appear there is method called get_internal_type() that maybe
what I am looking for.
The method is in django.db.models.Field. But I am unable to find
anything that would tell
me how to use the function to return the data type for a field in a
model.
m=Org()
for field in m._meta.fields[1:
Hi --
This will probably be of most interest to Django developers in the San
Francisco Bay Area,
but the company is open to hearing from anyone who might be interested.
This is a new product already getting great press, and a fun development
team.
Feel free to contact me if you have any question
def test_showAccountWithZeroTrackers(self):
self.client.login(username='user', password='test123')
How can I get the user model when I use the client to login in to the
application?
--~--~-~--~~~---~--~~
You received this message because you are subscri
I've got an odd-looking error when I try to use a related model's
field in the ORM. Here's the traceback:
Traceback (most recent call last):
File "", line 1, in
File "/home/dwillis/lib/python2.5/django/db/models/query.py", line
519, in filter
return self._filter_or_exclude(False, *args,
Hello All,
I am a Django novice, and I recently discovered the _meta methods for
use with models.
Using _meta.fields to return the field names in a model instance, the
current value of an instance (getattr()) and set the value (setattr
()).
I was wondering if anyone knows how to use _meta.fields
On Fri, Jan 23, 2009 at 8:37 AM, joti chand wrote:
> File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py",
> line 205, in _get_url_patterns
>patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
>
> File "C:\Python25\Lib\site-packages\django\core\urlresolve
Malcolm Tredinnick wrote:
> So the next thing is to narrow down which commit. You know a good commit
> and you know a bad one. Now pick something halfway in between and try
> that. Continue with binary searching. It won't take many repetitions to
> get to the precise commit.
>
> Regards,
> Malcol
On Fri, 2009-01-23 at 16:26 -0800, Brian Neal wrote:
> I have an object that I display on multiple pages. Initially I created
> a little template .html file for it, and I simply
>
> {% include 'my_object.hml' %}
>
> every where I need it.
>
> I have since discovered inclusion tags. Would it be
On Fri, Jan 23, 2009 at 5:39 PM, Nathaniel Whiteinge wrote:
>
> Requesting a sanity check before I file a ticket.
>
> The API for directly accessing a database cursor() changes depending
> on if DEBUG is True or False. (Excepting execute() and executemany().)
>
> This shell session spells it out m
On Fri, 2009-01-23 at 15:47 -0800, Foxpl wrote:
> Hi, i have errors while i am trying to upload image by an admin panel.
>
> Here is my image model:
>
> class Photo(models.Model):
> Title = models.CharField(max_length=256)
> Description = models.TextField(max_length=1024, blank=True)
>
On Fri, 2009-01-23 at 14:39 -0800, Nathaniel Whiteinge wrote:
> Requesting a sanity check before I file a ticket.
>
> The API for directly accessing a database cursor() changes depending
> on if DEBUG is True or False. (Excepting execute() and executemany().)
>
> This shell session spells it out
On Fri, 2009-01-23 at 15:19 -0800, Andrew Ingram wrote:
> I reverted Django to revision 9756 (just after aggregation was merged
> in) and everyone works fine, so evidently a commit made in the last
> few days has caused this issue.
So the next thing is to narrow down which commit. You know a good
On Fri, 2009-01-23 at 22:44 +0200, Oleg Oltar wrote:
> Hi!
>
>
> I am trying to add password reset function to my application.
> But when I am trying to process the email with confirmation link:
>
>
> code:
> # Password resend group
>
>
On Fri, 2009-01-23 at 12:15 -0800, Julien Phalip wrote:
> On Jan 24, 2:45 am, varikin wrote:
> > The UploadedFile[1] object has a field called content_type. So if you
> > have this in a form:
> >
> > myfile = request.FILES['some_file']
> > if myfile.content_type != 'application/zip':
> > #ra
On Fri, 2009-01-23 at 23:37 +1300, joti chand wrote:
> Hi Guys, I was doing to the tutorials from the book: Teach yourself
> django in 24 hours and Part1 hour 3 ...to view the admin site it is
> giving the following error.
That book was published before Django 1.0 was released and, in
particular,
I have an object that I display on multiple pages. Initially I created
a little template .html file for it, and I simply
{% include 'my_object.hml' %}
every where I need it.
I have since discovered inclusion tags. Would it be better, worse, or
just different to do this instead?
{% load my_tags
Hi, i have errors while i am trying to upload image by an admin panel.
Here is my image model:
class Photo(models.Model):
Title = models.CharField(max_length=256)
Description = models.TextField(max_length=1024, blank=True)
User = models.ForeignKey(User)
File = models.ImageField(u
I reverted Django to revision 9756 (just after aggregation was merged
in) and everyone works fine, so evidently a commit made in the last
few days has caused this issue.
Regards,
Andrew Ingram
On Jan 23, 6:40 pm, Andrew Ingram wrote:
> I've just tried saving the model using the approach followe
Requesting a sanity check before I file a ticket.
The API for directly accessing a database cursor() changes depending
on if DEBUG is True or False. (Excepting execute() and executemany().)
This shell session spells it out more clearly:
http://dpaste.com/hold/112331/
Is this intentional?
Thank
Hello,
I have an application with two model classes that inherit from a base
"Store" class, "Restaurant" and "Petshop". The Store class implements
the basic information that is common to stores, like an owner, name
and address. The children implement their own fields (ex:
sells_kittens).
I want
On Jan 23, 2:43 pm, oboedude wrote:
[...]
> How do I create a custom widget and what do I have to do to use my
> custom widget in a form?
Read the documentation on forms, then checkout the section on form
media:
http://docs.djangoproject.com/en/dev/topics/forms/media/#topics-forms-media
I've i
> How do I create a custom widget and what do I have to do to use my
> custom widget in a form?
It's possible I don't understand what you're trying to do, but I think
you just need to call the hook into the id of the textfield. If
multiple, set a class attribute in your form setup and hook onto t
Hello,
I changed the URL from this:
(r'^admin/(.*)', admin.site.root) (this works, but no CSS)
to this:
(r'^admin/', include('django.contrib.admin.urls')),
I received this error:
No module named urls
May
On Jan 23, 12:15 pm, Austin Gabel wrote:
> What do you have for MEDIA_ROOT, MED
I was able to fix this by modifying the settings.py file INSTALLED_APPS
section by removing django_bookmarks from 'django_bookmarks.bookmarks'.
Tonu
Tonu wrote:
> I am trying to write a small program that imports delicious bookmarks
> into the Django project's database. When I try the commands
I'm new to Django, so please be patient and bear with me. I am looking
to create a form in Django with several text inputs and an analog
slider. I know how to make the text inputs, but I'm having trouble
with the slider. I have some JavaScript code that creates analog
sliders and I'd like to make
I'm wonding if anyone had any advise or suggestions to a problem that
I am having...
I'm fairly new to django. I am transferring a django website from one
server to another so I have set it up on the new server using a
different domain name. Now I am trying to transfer the old domain
name to th
> I think what you want to do is:
>
> user_activated.connect(create_site_user)
Thanks. But where, after the send(), or in the signal?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
I think what you want to do is:
user_activated.connect(create_site_user)
--~--~-~--~~~---~--~~
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 un
Hi!
I am trying to add password reset function to my application.
But when I am trying to process the email with confirmation link:
code:
# Password resend group
(r'^reset/(?P[0-9A-Za-z]+)-(?P.+)/$',
'django.contrib.auth.views.p
Hello,
I tried all kinds of directory paths in these and nothing worked, so I
returned them to blank.
MEDIA_ROOT = ''
MEDIA_URL = ''
ADMIN_MEDIA_PREFIX = ''
This is my http.conf file, but the third section on media also doesn't
seem to have any effect. The server restarts fine, the admin comes
I'm trying to update from my very old version of django-registration
to .7 in hopes of sorting out some registration issues I'm having.
In my old version, I use the profile_callback to create my site user
profile:
from site_users.views import create_site_user
...
url(r'^$',
What do you have for MEDIA_ROOT, MEDIA_URL, and ADMIN_MEDIA_PREFIX in your
settings file?
On Fri, Jan 23, 2009 at 12:50 PM, May wrote:
>
> Hello,
>
> I have windows, python 2.5, mod python and apache 2.2 working.
> However, when accessing the admin pages the admin CSS does not
> appear. I tr
On Jan 24, 2:45 am, varikin wrote:
> The UploadedFile[1] object has a field called content_type. So if you
> have this in a form:
>
> myfile = request.FILES['some_file']
> if myfile.content_type != 'application/zip':
> #raise error
>
> I don't know if this will help you in your test. I hope
On Jan 23, 7:19 am, bruno desthuilliers
wrote:
> On 23 jan, 06:29, waltbrad wrote:
>
> > Hi folks. PersonForm is a modelform. I'm trying to validate data by
> > calling an instance of PersonForm. (This is from Sam's 24 hour, and
> > I've modified the example to accommodate the 1.0 changes.)
Adonis:
>geometria = GEOSGeometry('POLYGON(('%s))' % coords)
Have you tried this?
Ariel.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djang
Hello,
I have windows, python 2.5, mod python and apache 2.2 working.
However, when accessing the admin pages the admin CSS does not
appear. I tried creating a subdir admin under my templates folder and
copied the base_site.html to it, but I still can't get the css to
work.
My settings file:
T
Hello,
This is my first inquery and i am very happy that this user community
exists.
This is the code fragment:
if request.method == 'POST':
#code ommited...
poly_coords = request.POST['polygcoords']
if poly_coords != 0:
coords = poly_coords.replace(", "
I've just tried saving the model using the approach followed in Django's
unit test and the database gets populated correctly, this reinforces the
likelihood of it being an admin-related issue.
Regards,
Andrew Ingram,
Karen Tracey wrote:
> http://code.djangoproject.com/ticket/9545
>
> also rep
On Fri, Jan 23, 2009 at 7:17 AM, Alessandro Ronchi <
alessandro.ron...@soasi.com> wrote:
> 2009/1/23 Ned Batchelder
>
>> You don't need to create new tables like this. These database systems
>> are very good at handling large amounts of data. Add a field plant to your
>> model, make sure it is
Thanks for your response Karen,
I've tried the workaround in the ticket and I get this error:
Exception Type: AttributeError
Exception Value: 'InMemoryUploadedFile' object has no attribute
'width'
I have a vague recollection that this was actually working before I did
the lat
On Fri, Jan 23, 2009 at 6:55 AM, Andrew Ingram wrote:
>
> Hi
>
> I am trying to use the height_field and width_field arguments for
> ImageField to auto-populate the dimension of images to other fields, but
> it doesn't seem to be working.
>
> I've duplicated the usage that's in Django's test suite
following you're link they discussed client side form validation just
like you mentioned, not sure it's complete or what you need but
http://eikke.com/tag/django-validation/ might have some useful
information
On Fri, Jan 23, 2009 at 12:52, Chris wrote:
>
> Is anyone aware of a simple way to auto
>
> class Tag(models.Model):
> name = models.CharField(max_length=100)
> related = models.ManyToManyField('self', symmetrical=False,
> through='TagCorrelation', blank=True)
>
> class TagCorrelation(models.Model):
> from_tag = models.ForeignKey(Tag, related_name='related_source')
>
Is anyone aware of a simple way to automatically generate non-Ajax
form validation? I've seen some useful posts about Ajax-form
validation (e.g. http://eikke.com/django-generic-ajax-form-validation/),
but I'd rather not waste bandwidth on validating integers/dates/phone-
numbers/required-fields/et
Hi,
Is it possible to order a queryset by a calculated field, such as
multiplication of 2 attributes?
With the fantastic aggregate functions introduced, I think something
like this would be cool:
Book.objects.annotate(total=Arithmetic('price * tax')).order_by
('total')
Thanks,
oMat
--~--~---
On Jan 23, 1:39 am, Julien Phalip wrote:
> I have a view which processes a multi-part form and whose behaviour
> varies depending on the content types of the uploaded files. I've
> written some tests for that view as follows:
>
> post_data = {
> 'name1': 'blah',
>
Thanks! it works!
On Jan 23, 5:42 pm, Raffaele Salmaso
wrote:
> gderazon wrote:
> >> tests/
> >> +- __init__.py
> >> +- test1.py
> >> +- test2.py
> >> \- test3.py
>
> if you are using unittest in __init__.py:
>
> from test1.py import *
> from test2.py import *
> from test3.py import *
>
> if you
Thank you Malcolm! Fixing the typo worked! It has been such a
struggle to find the right syntax for windows and mod python that I
had lost all confidence to think a typo could be the problem, so I
wasn't careful enough to check.
Thanks, again,
May
On Jan 22, 4:46 pm, Malcolm Tredinnick
wrote
gderazon wrote:
>> tests/
>> +- __init__.py
>> +- test1.py
>> +- test2.py
>> \- test3.py
if you are using unittest in __init__.py:
from test1.py import *
from test2.py import *
from test3.py import *
if you are using doctest in __init__.py:
from test1 import MY_TEST1
from test2 import MY_TEST2
Thanks Raffaele,
I tried it, and it seems to ignore the tests files.
(I get "Ran 0 tests in 0.000s")
Is there anything that I should write in the __init__.py file?
On Jan 23, 4:27 pm, Raffaele Salmaso
wrote:
> gderazon wrote:
> > My tests.py has become too big, I want to split it to several test
The position below is an entry level web developer who’s familiar with
a modern scripting language framework (like Ruby or Python, not Java
or PHP) and some front-end/UI work using JavaScript/AJAX/etc. Slight
emphasis on the front-end stuff
FULL TIME / PERM POSITION
The company is located in Cen
Thanks for the reply. I will try it later.
just one thing: I have a view function called photos also, can that
cause a conflict?
The path is in (r'^', include('server.music.urls')), :
from django.conf.urls.defaults import *
from server.music.models import Artist,Album
logout={'template_name':'
Hi,
I have these two simple models defined (using today's trunk)
class Tag(models.Model):
name = models.CharField(max_length=100)
related = models.ManyToManyField('self', symmetrical=False,
through='TagCorrelation', blank=True)
class TagCorrelation(models.Model):
from_tag = models.
gderazon wrote:
> My tests.py has become too big, I want to split it to several test
> files and still be able to run the tests with manage.py tests ...
> How can I do that?
> I'm working with django 1.0 stable release.
tests/
+- __init__.py
+- test1.py
+- test2.py
\- test3.py
--
()_() | That sa
i think u have to add this code
urls.py
DIRNAME = os.path.dirname(__file__)
(r'^photos/(.*)$', 'django.views.static.serve', {'document_root':
os.path.join(DIRNAME, "photos")}),
pls answer me if your code will ok
2009/1/23 nmr
2009/1/23 nmr
>
> Hi.
>
> I'm having problem to view my th
My tests.py has become too big, I want to split it to several test
files and still be able to run the tests with manage.py tests ...
How can I do that?
I'm working with django 1.0 stable release.
--~--~-~--~~~---~--~~
You received this message because you are subscr
My hero - that worked for time!
Many many thanks.
On Jan 23, 12:37 pm, Alex Koshelev wrote:
> Your query executes in module import time and it happens only one time. So
> you cannot reevaluate it using choices field param like that.
>
> Solution - redefine form `__init__` and manually reassign
Yes, you can do that.
You can create tests package with some test modules and in `__init__.py`
import needed test cases into package namespace.
On Fri, Jan 23, 2009 at 12:29 PM, gderazon wrote:
>
> My tests.py has become too big, I want to split it to several test
> files
> and still be able to
Hi.
I'm having problem to view my thumbnails. I'm using sorl for thumbnail
creation and uploading:
model.py:
class Photo(models.Model):
text=models.TextField(max_length=50)
photo=ImageWithThumbnailsField(upload_to='photos/',thumbnail=
{'size': (50, 50)})
def __unicode__(self):
My tests.py has become too big, I want to split it to several test
files
and still be able to run the tests with manage.py tests ...
How can I do that?
I'm working with django 1.0 stable release.
--~--~-~--~~~---~--~~
You received this message because you are subsc
On 22 ene, 16:17, Thomas Guettler wrote:
> Tim Daniel schrieb:> I read something that it would be more
> > efficient to store only the query and doing pickle?? I don't know how
> > to do that, I've been looking in the docs and other posts but no clear
> > explanation. So what I really want to k
Your query executes in module import time and it happens only one time. So
you cannot reevaluate it using choices field param like that.
Solution - redefine form `__init__` and manually reassign choices to given
field every time form is created.
def __init__(self, *args, **kwargs):
super(MyFor
Have been reluctant to post on this one as have come across many many
discussion during the 3 days of lack of success on resolving this
issue, but none has left me with a solution.
I have a form with a dropdown generated from a query.
This is in the form:
carmake = forms.ChoiceField(choices=
On 23 jan, 06:29, waltbrad wrote:
> Hi folks. PersonForm is a modelform. I'm trying to validate data by
> calling an instance of PersonForm. (This is from Sam's 24 hour, and
> I've modified the example to accommodate the 1.0 changes.) So,
NB : Alex already gave you the practical solution, but
2009/1/23 Ned Batchelder
> You don't need to create new tables like this. These database systems are
> very good at handling large amounts of data. Add a field plant to your
> model, make sure it is indexed, and use it to query for the data you want.
> The entire system from the database up th
Hi
I am trying to use the height_field and width_field arguments for
ImageField to auto-populate the dimension of images to other fields, but
it doesn't seem to be working.
I've duplicated the usage that's in Django's test suite (which
incidentally is the only mention I can find that you have
check your urls.py
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
import os,sys
urlpatterns = patterns('',
(r'^admin/(.*)', admin.site.root),
)
add it if u use django.1.0.2
2009/1/23 joti chand
>
> Hi Guys, I was doing to the tutorials from
You don't need to create new tables like this. These database systems
are very good at handling large amounts of data. Add a field plant to
your model, make sure it is indexed, and use it to query for the data
you want. The entire system from the database up through the ORM and
the rest of D
Hi Guys, I was doing to the tutorials from the book: Teach yourself
django in 24 hours and Part1 hour 3 ...to view the admin site it is
giving the following error.
Any help:
Traceback (most recent call last):
File "C:\Python25\lib\site-packages\django\core\servers\basehttp.py",
line 278, in run
Hi all,
I have subclassed User in order to create my own Profile objects. User's can
upload an image for their profile.
The question is how I can include this on their comments?
There is an interesting post on
http://thejaswi.info/blog/2008/11/20/part-2-django-comments-authenticated-users/where
t
I think that django-tables is the solution
https://launchpad.net/django-tables
On 23 ene, 09:41, Kless wrote:
> I need show a table with several rows, where the user can search any
> data (as admin interface).
>
> But when the user clicks about the data chosen I chosen store that
> option to sh
On Fri, Jan 23, 2009 at 4:19 PM, Piotr Husiatyński
wrote:
>
> On 18 Sty, 12:06, Malcolm Tredinnick wrote:
>> Wait a few days until ticket #7210 is resolved and you'll be able to use
>> references to other fields as rhs values in filters. The work for that
>> is nearly complete, so it's pretty cl
I need to start a project with thousand of tuples every day for N solar
plants.
*I think I need multiple databse tables for a single model,* because I can
divide every plant's tuples.
So I need something to create a (#1 table) GenericPlantModel and (#n tables)
GenericPlantData and when I create a n
I need show a table with several rows, where the user can search any
data (as admin interface).
But when the user clicks about the data chosen I chosen store that
option to show another table according that first election.
Any idea or advise about how to get it?
--~--~-~--~~-
What the should be look like? Is there any example?
Is it at all possible to send email from local working machine?
On Fri, Jan 23, 2009 at 8:45 AM, Alex Koshelev wrote:
> Try to check your EMAIL_ settings.
>
>
>
> On Fri, Jan 23, 2009 at 8:55 AM, Oleg Oltar wrote:
>
>> Hi! I am getting a stra
SEE ALSO : a core method in django get_profile()
django/contrib/auth/models.py
and as used in profiles/views.py
profile_obj = request.user.get_profile()
--~--~-~--~~~---~--~~
You received this message because you are subscrib
77 matches
Mail list logo