On May 23, 3:16 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> In order for Python to be able to use some bit of code -- in this
> case, Django -- that bit of code has to be in a directory that's on
> the "Python path"; that's a list of directories Python looks into
> whenever you have an
Yea, I'm not sure why I used choice as the field name. I probably
should of used style. Anyway, here are all my models
class Size(models.Model):
name = models.CharField(maxlength=100)
def __str__(self,):
return self.name
class Admin:
Malcolm Tredinnick wrote:
> > I am trying to serialize some model data with the output going to a
> > file. I am doing it the way its suggested in the documentation.
> >
> > XMLSerializer = serializers.get_serializer("xml")
> > xml_serializer = XMLSerializer()
> > out = open("file.xml", "w")
> >
On 5/23/07, Thomas Ashelford <[EMAIL PROTECTED]> wrote:
> I'm hoping that setup.py is just a convenience file that does
> something I can do manually (I'm a python newbie, so when I took a
> look inside I was a bit bamboozled. I could probably figure it out
> given a spare hour or two!)
In order
I'm trying to install an instance of Django version 0.96 on a server
where I don't have root access. I'm unable run setup.py using sudo as
described in the documentation, and when I leave out that step I get
"ImportError: No module named django". The development version works
fine, so I'm
Hi all
I have a template and request is being passed to it and so I expected that
{{ perms }} would be availablke as in Chap 12 of the Django book.
I have this:
Permissions:
{% for permission in in request.user.get_all_permissions %}
+ {{ permission }}
{% endfor %}
{% if perms.lab %}
Can you post your manipulator code?
On May 18, 1:35 pm, Mason <[EMAIL PROTECTED]> wrote:
> I'm a Newbie at Django (release ver. 0.96) and I've got a problem with
> saving data from a Django checkbox to MySQL.
>
> The code that I'm running looks like this:
>
>
The dev server operates much differently than an actual production
server. The production server will only evaluate module code once
when the module is initially loaded. It doesn't automatically scan
for file changes and load files as necessary like the dev server
does. If you want file
What does the model code look like for Size,Price?
Also,
choice = models.ForeignKey(Style,
edit_inline=models.TABULAR,num_in_admin=5)
Did you mean for that to be:
style = models.ForeignKey(Style,
edit_inline=models.TABULAR,num_in_admin=5)
Just curious..as then it would be consistent with the
On Wed, 2007-05-23 at 03:51 +, Ramashish Baranwal wrote:
> Hi,
>
> I am trying to serialize some model data with the output going to a
> file. I am doing it the way its suggested in the documentation.
>
> XMLSerializer = serializers.get_serializer("xml")
> xml_serializer = XMLSerializer()
>
You could do this pretty easily using your own forms ( not NewForms
and not Add/Change Manipulators ) along with the Django DB objects.
It's pretty easy to do a CustomChangeManipulator with fields from two
tables if it's just a one to one relationship, but for M2M, I usually
either roll my own
Hi,
I am trying to serialize some model data with the output going to a
file. I am doing it the way its suggested in the documentation.
XMLSerializer = serializers.get_serializer("xml")
xml_serializer = XMLSerializer()
out = open("file.xml", "w")
I think it's reasonable for Django to leave this one up to the
framework user. Thanks!
Beau
On May 21, 10:12 pm, simonbun <[EMAIL PROTECTED]> wrote:
> As far as i know, select_related doesn't work across reverse
> relationships. Sometimes it's possible to just query the base model to
> achieve
Templates can output any textfile we care, right? And django's got
this nifty auto-updating thing going, where changes to a file are
immediately reloaded into the running application. So...
We use forms_for_model to get the fields, put it into a request
context, and call a template which
On May 11, 1:59 am, oliver <[EMAIL PROTECTED]> wrote:
> Thanks, for both comments but still no luck.
> I tried multiple various but it still gives me the same error.
>
> my projects are in c:\django-projects\Project1..
>
> I installed the latest beta ofkomodo, but has the same thing.
>
You may also want to check out http://code.djangoproject.com/ticket/3990.
On May 22, 5:19 am, "Seiji - technics" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there a way to show as specific field in the admin screens but
> without permitting to edit it?
> I want something similar to
Rob Hudson wrote:
> Cool. What's the best way to coordinate the effort? A wiki page to
> start with?
>
Current trends seem to be to use Google Code for projects that aren't
likely to become part of the core django distro. A link from the Django
wiki is probably a good idea though.
> 1)
On Tue, 2007-05-22 at 17:23 -0700, David Priest wrote:
> On 07-May-21, at 5:56 PM, Malcolm Tredinnick wrote:
> > It sounds like you want the django.newforms.formsets capability that
> > isn't on trunk yet.
>
> >
> > A little more patience will be required.
>
> Is this patience measured in days
On 07-May-21, at 5:56 PM, Malcolm Tredinnick wrote:
> It sounds like you want the django.newforms.formsets capability that
> isn't on trunk yet.
>
> A little more patience will be required.
Is this patience measured in days and short weeks, or in long weeks
turning to months? I need to
Cool. What's the best way to coordinate the effort? A wiki page to
start with?
Coming up in the next month or so I'm going to have to dedicate work
time to this but for now I'd like to just lay out the groundwork and
do it in such a way that it benefits the Django community.
1) Cross Platform
Hello,
Thank you for fixing the bug so quickly. But if you'll add
'i18n.multilingual' to the list of installed apps in the settings.py
in the example I've attached to #22, then "manage.py runserver" or
"manage.py syncdb" commands stop working with exception
"AttributeError: 'module' object has no
Breaking CAPTCHAs Without Using OCR
This article details a method I have discovered to bypass CAPTCHA
security, without having to use Optical Character Recognition software.
http://2site.com/ibfaem
Is Mark Warren's Ultimate Wealth Package Worth the Money?
You could go take a college course
On Tue, 2007-05-22 at 06:43 -0700, Fay wrote:
> I'm using MySQL. The primary key field generated by django uses
> integer, not unsigned. I'd like to us unsigned integer instead. I can
> explicitly specify PositiveIntegerField with primary_key option, but
> that doesn't seem to give me auto
On Tue, 2007-05-22 at 08:19 -0300, Seiji - technics wrote:
> Hi all,
>
>
>
> Is there a way to show as specific field in the admin screens but
> without permitting to edit it?
>
> I want something similar to editable=False option but without
> excluding the field from the screen.
Once
On Tue, 2007-05-22 at 18:13 +0200, Bram - Smartelectronix wrote:
> Hey,
>
> Malcolm Tredinnick wrote:
>
> > It works with Python 2.3 as well and I've tested it with every database
> > I have access to on 2.3, 2.4 and 2.5. So hopefully the only bugs should
> > be easy to fix things in edge
Due to some weirdness on google groups I did not see your second
message when replying to the first one. The SQL you posted was enough
to solve the problem.
On May 22, 9:28 pm, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> In addition to this issue, I'm getting SQL errors on attempts to
>
I've implemented sitemaps for my site (www.trenchmice.com), and I've run
into a problem because of my site's size.
TrenchMice has 275K pages, generated from 275K+ database objects. The
sitemap classes return information on every object, which means they try
to return information on 275K+
Hi Eugene,
On May 22, 5:44 pm, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> I'm trying to use django-multilingual for multilingual site, instead
> of reinventing the wheel. But in admin interface I get:
> "Something's wrong with your database installation. Make sure the
> appropriate database
In addition to this issue, I'm getting SQL errors on attempts to save
multilingual objects, because of such invalid constructs:
LEFT JOIN blog_blogtranslation AS blog_blogtranslation_zh-cn ON
((blog_blogtranslation_zh-cn.master_id = blog_blog.id) AND
(blog_blogtranslation_zh-cn.language_id =
On 5/22/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
> I'm curious if there are others who could use this functionality but
> for Django. If so, perhaps we can all collaborate and come up with a
> solution that runs on Mac, Windows, and Linux. Data syncing would be
> nice but can come later.
I'd
I have a need for a way to run Django-based websites offline as an
installable application. I recently read about Joyent Slingshot:
http://developer.joyent.com/
I'm curious if there are others who could use this functionality but
for Django. If so, perhaps we can all collaborate and come up
I've implemented sitemaps for my site (www.trenchmice.com), and I've run
into a problem because of my site's size.
TrenchMice has 275K pages, generated from 275K+ database objects. (These
are "topics" and "scoops".) The sitemap classes return information on
every object, which means try to
Vance,
Ok...that worked. However, I have a new problem. I'm not sure how to
display all the sizes and colors of a particular rug. In my shell
python I do the following
>>> a = Choice.objects.filter(choice=1)
>>> a
[, , ]
>>>
What do I need to type into the shell prompt to get all the sizes
Thanks to all who responded.
On May 20, 2007, at 8:11 AM, jordi.f wrote:
> Any reason for not using Django's built-in fastcgi server?
I did try that. In the end, I built up another server based on Centos
and used mod-python. I plan to revisit the fastcgi approach when I
have more time to
Hello,
I'm trying to use django-multilingual for multilingual site, instead
of reinventing the wheel. But in admin interface I get:
"Something's wrong with your database installation. Make sure the
appropriate database tables have been created, and make sure the
database is readable by the
I've solved the issue. It seems it was a combination of my the tagging
app not being on my PYTHONPATH, and some database issues.
Everything seems to work correctly now.
On May 21, 10:49 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I'm building a blog using Django, and am wanting to
Your request is called a "captcha"
You can find examples in the groups or there :
http://code.google.com/p/django-captcha/
http://www.djangosnippets.org/tags/captcha/
On 22 mai, 09:59, Xin Xic <[EMAIL PROTECTED]> wrote:
> Hello,
>
> First, sorry for my english.
>
> Well, I want out a form for
I am looking for some advise on how to go about creating something with
Django. Any help would be greatly appreciated!
I am created a website that will need to support two different, yet
similar models at the same level. So I have a legacy product model
called XCProduct and a new product
On 5/22/07, jararaca <[EMAIL PROTECTED]> wrote:
>
> A short while ago I had my unit tests up and running, including
> reading some objects from a fixture. Today I've tried to run the tests
> again (calling 'manage.py test' just as I did before). Now the test
> database is created as I can see
I'm using MySQL. The primary key field generated by django uses
integer, not unsigned. I'd like to us unsigned integer instead. I can
explicitly specify PositiveIntegerField with primary_key option, but
that doesn't seem to give me auto increment. Any ideas? Thanks.
And there are no best practices for using something as inherently
inaccessible and annoying as a captcha.
On May 22, 7:16 am, Sam <[EMAIL PROTECTED]> wrote:
> Your request is called a "captcha"
>
> You can find examples in the groups or there :
>
>
On Monday 21 May 2007 14:27:02 dystopia wrote:
> I'm worried that I haven't set this up properly, because in effect the
> application (which is for test purposes) should really run off the
> main domain rather than requiring to be accessed through a folder.
Alternatively, you could set up a
On May 22, 9:38 am, omat <[EMAIL PROTECTED]> wrote:
> Is it a good idea to use a middleware class to detect the browser
> client looking at the HTTP_USER_AGENT so as to serve presentation
> logic accordingly, for mobile devices or older browsers, etc...?
I would advise against this because it
A short while ago I had my unit tests up and running, including
reading some objects from a fixture. Today I've tried to run the tests
again (calling 'manage.py test' just as I did before). Now the test
database is created as I can see using the MySQL Frontend, but the
objects from the fixture
Hi all,
Is there a way to show as specific field in the admin screens but
without permitting to edit it?
I want something similar to "editable=False" option but without
excluding the field from the screen.
Thanks in advance for the help.
Seiji
I agree your comments. My primary concern is to have a reasonably
similar presentation in most popular browsers. I would prefer a one-
css-fits-all solution, but...
In most cases this just doesn't seem possible. The source of wikipedia
discouraged me. Even in their relatively simple layout, they
On 22/05/07, omat <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Is it a good idea to use a middleware class to detect the browser
> client looking at the HTTP_USER_AGENT so as to serve presentation
> logic accordingly, for mobile devices or older browsers, etc...?
>
> I know this is mostly done by
I found the solution.
It is very simple. I need only a directory named 'widget' in my
project-template-directory.
Thats all!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Hi all,
Is it a good idea to use a middleware class to detect the browser
client looking at the HTTP_USER_AGENT so as to serve presentation
logic accordingly, for mobile devices or older browsers, etc...?
I know this is mostly done by
James,
If I get you right the request path is ^mysite/admin/ so ^admin
shouldn't work. You've got to update all your top level urls to
^mysite/module_name as such
(r'^mysite/admin/', include('django.contrib.admin.urls')),
Also the stuff in the virtual host isn't neccesary if you are
Does anybody know if it is possible to set up Dreamweaver CS3 to edit
web pages, dynamically created by Django.Dreamweaver works with PHP
and various other scripting tags - anybody have any experience with it
and Django?
MerMer
--~--~-~--~~~---~--~~
You
Hello,
First, sorry for my english.
Well, I want out a form for a human verification with an image and an
input field. But I don't know how is the best practice for make this.
How do you do it?
I need print:
- An image (different in each case)
- An hidden input with data relationated
I looked at this again this morning and it appears that unit tests
within a test class do run in alphabetical order after all. This is
handled by the sortTestMethodsUsing property of the TestLoader class
of the unittest lib itself. Maybe this has changed in a newer version,
but in mine (2.4.4)
My bet would be that this little bit of code right here:
def __str__(self,):
return self.choice
the return of __str__ needs to be a string not an object.
Vance
On 5/21/07, Greg <[EMAIL PROTECTED]> wrote:
>
> I am trying to display the table in my Choice table. However it's
> error's
On Mon, 2007-05-21 at 22:20 -0700, John M wrote:
> Is it possible to order a queryset by a custom field?
>
> I have several programmatic generated fields and need to sort the
> display by them, is this possible?
The order_by fields are passed to the database and used in the SQL
statement, so
55 matches
Mail list logo