Hi Fabio,
> I have to create a summary page for one of my models. With "summary
> page" I mean a table where each item of my model is listed along with
> its properties/values.
>
> Some of those properties/values are fields of the db itself, while
> other values are calculated on the fly (maybe w
Hi Paddy,
> I have an Account model:
>
> class Account(models.Model):
>
> accountname = models.CharField(max_length=50, unique=True)
> owner = models.ForeignKey(User)
> admins = models.ManyToManyField(User, related_name='admins',
> blank=True)
> accounts = models.M
On Oct 29, 8:35 am, shabda <[EMAIL PROTECTED]> wrote:
> I need to create a custom filter which displays some data from db
> depending on its data type.
>
> My code is something like,
>
> from django.template.defaultfilters import linebreaks, urlize
>
> def filterxx(data)
> return linebreaks
On Oct 30, 1:30 am, shabda <[EMAIL PROTECTED]> wrote:
> So if these built in filters are marking my strings safe, inspite of
> unsafe data being passed in, should they not handle escaping as well?
The problem seems to be that your filter function doesn't mark itself
with an is_safe attribute (def
>
> > > So if these built in filters are marking my strings safe, inspite of
> > > unsafe data being passed in, should they not handle escaping as well?
>
> > The problem seems to be that your filter function doesn't mark itself
> > with an is_safe attribute (defaulting it to False). So try markin
On Nov 5, 10:08 am, "yuanyun.ken" <[EMAIL PROTECTED]> wrote:
> I see in django.contrib.admin, there are {{ root_path }} and
> {{ app_path }} in its base.html.
> But if I use them in my template, they are always empty.
> What I should do to enable these variables.
Those template variables are very
Hi,
> In the quest to build my web sales inventory system, I want to specify
> that only stock that are available be listed in the dropdown.
>
> So my question is can I use a custom query to feed the choices for my field?
Yes. See ModelChoiceField.queryset here:
http://docs.djangoproject.com/en/
Hi Javi,
> Thanks but I'd already tried it. I don't understand why in the
> production server is not added the preceeding slash to the url. My
> urls.py is as follows:
> urlpatterns = patterns('candidateTool.assessmentSystem.views',
> (r'^$', 'index'),
> (r'^enter/$', 'enter'),
> (r'^
Hi,
> I have an Admin site which I want to filter based on request.user.
>
> My ModelAdmin class is something like this,
>
> class FilterOnUser(admin.ModelAdmin):
> def queryset(self, request):
> return self.model._default_manager.filter(user = request.user)
>
> def get_form(self,
meppum wrote:
> I've run into a funny case and I'm not sure how to best deal with it.
> Basically, I have the following classes.
>
> class Profile(models.Model):
> name = models.CharField()
> foo = models.PositiveIntegerField(blank=True, default=0)
>
> class RegistrationForm(forms.Form):
>
Hi Javi,
> I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
> the same state. I'm running the app in Apache2/mod_python. I've pasted
> the htttp.conf file athttp://rafb.net/p/Ya1VKT55.html
I can't see your conf file there. Perhaps you want to paste again at
http://dpaste.com/
Hi,
> In my application I'm trying to serialize the following model to json:
>
> class Node(models.Model):
> name = models.CharField(db_column="NAME",
> max_length=30,
> db_index=True)
> description = models.CharField(db_column="DESCRIPTION"
Hi Alex,
> I have a news application that I would like some help with.
>
> My view generates a list with objects mixed with dictionaries with two
> objects. Then in my template, I want to loop through this list and
> output each value. However, when it encounters a dictionary in the
> list I want
Hi,
> I'm using django 1.0, and am experiencing the following issue with a
> forms.FileField.
> When I use required=False, I'm able to validate the form, while when
> using the same form with required=True in the forms.FileField, the
> forms does not validate, and returns a *this field is require
> I'm using inlineformset_factory to generate a tabular formset for
> object instances from my database. I would like to add a link to each
> table row to point to another form for each individual instance (the
> instances are mailboxes and I want a password change form for an
> individual mailbox
laspal wrote:
> Hi,
> I am trying to save file using file field but ran into problem.
> Here is my code:
>
> ***model
>
> class CronEmail(models.Model):
> subject = models.CharField( max_length = 200)
> message = models.CharField( max_length = 200)
> sender = mode
> The mulipart/dorm-data encoding type is set, so that shouldnt be it.
> Here's the code I'm using
Your form and template look OK. Can you show your view code too?
Perhaps you are not passing request.FILES to the posted form
instance.
-RD
--~--~-~--~~~---~--~~
> I am thinking about something like {{ (width - 5) *12 }} ?
No. That syntax is not supported in Django templates.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
> I'd like to build one component "Login" or "Navigation" which can be
> places on different templates at different palces. e.g.i'd like to
> have the the login component on the right side by default, but
> sometimes it should be in the content area.
>
> Till now i learend that i can repalce {% bl
Hi Martin,
> I have been trying to use inherited models and back references for
> filter queries, using django 1.0, 'final'. Whilst I am able to use
> back references for the base class, I can not do so for the inherited
> class (see example below). Is there any reasons why I should not be
> ab
kevinski wrote:
> I'm currently going through the "Learning Website Dev with Django"
> book, using Django 1.0.2/Python 2.5/SQLite. There is an issue stumping
> me. The book includes a "friendship" model which includes 2 foreign
> keys set to User model:
>
> class Friendship(models.Model):
> fr
Hi,
> I am trying to send an email to three people as follows:
>
> if request.session['Email'] != '':
> #initialize email variables
> # render both html and text strings from the templates below
> textmessage = render_to_string('email_text.html',
> context_instance=Req
Martin Green wrote:
> Thanks Rajesh,
>
> That should sort out my problem.
>
> As a side note, it seems 'base' and 'base__inherited' appear to do the
> same thing:
Yes, actually that should work too since inherited is an instance of
base. So, it's probably better to use 'base' since it's more ge
> Can I order_by a function within the model? I know you can list them
> in the admin inteface, etc. But can you order_by a model function? Or
> would you have to write a custom piece of code to do that?
In addition to the two solutions that John mentioned, you can do the
following in many cases:
On Nov 20, 3:40 pm, "John.R" <[EMAIL PROTECTED]> wrote:
> I'm working with an Event Model that, when saved (and possibly when
> updated) needs to run some custom Python code to notify some outside
> APIs - Twitter, Pownce, Google Calendar for instance.
>
> I know enough to implement Signals so t
> I am new to Django so please excuse if this has been asked before - I
> could not find anything in my list searches.
>
> I am using the standard admin for a model called Member. I can
> override the save method to perform a small database tweak when a
> member is saved. This will involve access
> I'm trying to make use inlineformset_factory to add several data on an
> object at the sime time. I want to show 5 extra forms but when I view
> it in browser it only shows 1formsets instead of 5.
>
> Here's my view code:
> formset = inlineformset_factory(PackagingReport, PeopleProblem,
Hi Alex,
> Here is the code that I use. Output_list is from CVS and current_projects
> is from the database. Is there a faster way to do this, or a built in
> method in Python? This code works fine now, but I can see it getting slow.
>
> for b in output_list:
> found = False
>
On Nov 26, 9:00 am, Jeff FW <[EMAIL PROTECTED]> wrote:
> If you already have a unique key on the project's name field, then
> you're good to go--no duplicates will ever get inserted. No need to
> do any filtering ahead of time--just put each save() in a try/except
> block that catches the error
On Nov 26, 2:14 pm, ChrisK <[EMAIL PROTECTED]> wrote:
> I'm doing a custom template (probably stupid), and using initial
> values. Here's a precis:
>
> template has
>
>
> {{form.url.field.initial}}
> {{form.auth_id}} {{form.media_id}} {{form.fence_id}}
> Reminder String:
> p>
>
> form type
>
> I want to define a class inherited from a contrib class namely users
> and replace it with the new one .
> Long ago there was a replace_module keyword in the meta class of the
> model , any idea how to achieve
> this ?
First of all, why do you want to replace the contrib User model with
your
>
> 2. Is there any built-in opton in Django (0.97 version) to unzip
> files. I would need to unzip the file to a folder once the upload has
> been done.
Python provides libraries to handle zip files. Here's the starting
point:
http://www.python.org/doc/2.5.2/lib/archiving.html
-Rajesh D
--~--~
> I am using Django v1.0. When I use the "fields" attribute in my model
> to tell the admin interface what fields to display on the change form,
> I find that any fields I leave out get truncated when I use the form
> to update a record.
>
> For instance, say I have a model class called "Users" th
> I did considered , but I could not see how to do it , the model I want
> to inherit is from
> contrib.Users and the model I want to replace is contrib.Users .
> It looks to me like a circular reference ...??
> How can I use the inherited model in the model I inherited from ??
It's still not cle
On Dec 3, 8:47 am, Logan Chow <[EMAIL PROTECTED]> wrote:
> Hi Rajesh,
> That's the way I did.
> But I am wondering how I can hide the Users in admin site?
You can unregister the default User model from the admin:
from django.contrib import admin
from django.contrib.admin.sites import N
On Dec 2, 10:03 pm, borntonetwork <[EMAIL PROTECTED]> wrote:
> Thank you for your reply, Rajesh. The two fields in question are
> actually "pending_referrer_name" and "pending_referrer_email". In the
> admin class code below, I include them in the fields attribute.
> However, initially I did not
On Dec 3, 11:37 am, Logan Chow <[EMAIL PROTECTED]> wrote:
> Thanks a lot, Rajesh.
> Excuse me, but one more question:
> When I edit/add the inherited class (for example: Student),
> everything goes well but the password field. It is not user friendly.
> So I try the following:
>
> from django.
> How can I get Django templates to generate links to anchors that are
> *local* to the document?
> In a static HTML page, I have a table of contents with links to
> internal sections within the same page:
>
> Section1
> Section2
>
> These link to sections that that look like this:
>
> 111
> 2
On Dec 5, 11:20 am, Chris Smith <[EMAIL PROTECTED]>
wrote:
> Found an oddity - possibly in my code. Can't seem to work around it.
>
> Code in question (current multi-tenant middleware implementation):
>
> middleware.py ..
>
> from projectname.models import Tenant, HostEntry
On Dec 5, 2:41 pm, PFL <[EMAIL PROTECTED]> wrote:
> Thanks for your replies --I am still stuck here.
>
> >Have a look in the output from the development server - I very much doubt
> >that the click results in any request being sent.
>
> A request is definitely sent for each of these cases: "/do
>
> The code I pasted (poorly) *is* the model code that causes the
> problem, minus the last couple of field entries.
The code you pasted earlier uses the attribute name 'fields' where it
should use the name 'fieldsets'. The former is used when you are
providing a simple list of field names while
> im a bloody django and python beginner and right now playing arround
> with the code provided
> onhttp://code.djangoproject.com/wiki/CookBookNewformsAdminAndUser
>
> on storing the entry in the admin following error occur:
>
> AttributeError at /admin/news/post/add/
>
> 'CommentFormFormSet' ob
> First, I'm gonna say that I have DEBUG turned off, and it's not Django's
> fault.
>
> My Django sites seem to eat lots of memory. This is fine, and it isn't a
> huge deal except that I am using all of my VPS's memory plus swap. The
> real solution is to upgrade memory on the VPS, but I'm a poor
On Dec 10, 12:51 pm, Berco Beute <[EMAIL PROTECTED]> wrote:
> Thanks. There are no non-field errors though. Outputting the incoming
> request object shows the error:
>
> orderLineForm is invalid: Product:This field
> is required. id="id_Tickety tick-product">
>
> The 'product' is required it says
On Dec 10, 10:47 am, Mikkel Høgh <[EMAIL PROTECTED]> wrote:
> Ok, I've been looking all over the docs for a solution to this, but
> there's a lot of documentation for the FileField, just not on how to
> use it…
>
> I have a model that looks like this:
>
> class Import(models.Model):
> complete
On Dec 11, 1:35 pm, rtelep wrote:
> I have a model Foo with an ImageField. I want to create new Foo
> object from request.FILES and POST from inside a view function.
>
> Ordinarily I would bind a form to request.FILES and request.POST to
> get that data:
>
> form = FooForm(request.FILES, reque
On Dec 12, 8:45 am, Dennis Schmidt wrote:
> Hi,
>
> actually that is how I do it. I'm subclassing from admin.ModelAdmin
> and then set the form-field to the custom form I made. But maybe this
> really only works for forms in applications.
No, it does work in the admin too. Setting the form att
On Dec 12, 8:33 am, pihentagy wrote:
> Hi all!
>
> I started to write a cron job, which sends reminders to users, but run
> into the following:
>
> I do not know how to set the current language in this situation.
> Setting settings.LANGUAGE_CODE has no effect.
>
> Note, that not only the text i
> I'd like to know everything there is to know about using the
> filter_horizontal method when displaying admin backend choices.
>
> I want to re-engineer it.
>
> I was wondering if anyone has done anything like this and could give me a
> couple of pointers to get started.
>
> Any assistance as al
On Dec 16, 2:31 am, 朱穆穆 wrote:
> The extra_context in FormWizard is a class attribute so the new
> request may get the context of the previous request.
> I can prepend below to __call__ method to solved it:
>
> self.extra_context = self.extra_context.copy()
>
> Is this really a bug?
It's most
On Dec 16, 5:09 pm, adrian wrote:
> How could I have some fixed data that is in a Python variable treated
> as a Model?
>
> My app has about 1 MB of data that I need random access to for almost
> every request. I don't want to read it out of MySQL because it would
> be slow.
Why do you think i
朱穆穆 wrote:
> On Dec 17, 7:49 am, Rajesh Dhawan wrote:
> > On Dec 16, 2:31 am, $B wrote:
> >
> > > Theextra_contextinFormWizardis a class attribute so the new
> > > request may get the context of the previous request.
> > > I can pre
�� wrote:
> On Dec 17, 7:49 am, Rajesh Dhawan wrote:
> > On Dec 16, 2:31 am, $B wrote:
> >
> > > Theextra_contextinFormWizardis a class attribute so the new
> > > request may get the context of the previous request.
> > > I can pre
On Dec 19, 2:27 pm, 朱穆穆 wrote:
> self.extra_context is a reference of FormWizard.extra_context.
> It was empty when the class define, but may not empty when
> instantiate.
>
> class TestWizard(forms.FormWizard):
> pass
>
> tw1 = TestWizard()
> tw1(request, extra_context={'test1': 1})
> # tw
>
> Your analysis is correct. It's the self.extra_context.update(*) call
> in the FormWizard that simply updates the class level copy of that
> variable.
>
> If you instead override "parse_params" as suggested by the comments in
> FormWizard, you won't have this problem.
To be clearer, in additio
On Dec 23, 10:38 am, "tom.s.macken...@gmail.com"
wrote:
> Hello,
>
> I am having some trouble serving static files with the development
> server. I have read the docs and various blogs out there and nothing
> seems to work. I am going nuts over this :) I have tried tweaking the
> values in my s
sagi s wrote:
> I really like the concept of generating a form from a model using
> ModelForm but would like to customize the apprearance slightly (e.g.
> size of the TextInput etc.).
>
> Any suggestion as to how to do this?
A standard way to do this is via CSS. When you render your form in
your
On Dec 23, 9:53 am, Alfonso wrote:
> Hi,
>
> Trying to implement a very simple template tag that will output a
> company's age. So idea being if company was established in 1860 then
> it should output '148 years old' if my math is right ;-)
>
> this is what I've got:
>
> from django.template i
Hi,
> I'm using a generic view to redirect from one URL to another:
>
> urlpatterns += patterns('prj.app.views',
>(r'^foo/(?P.*)$', redirect_to, {'url': '/foo/bar/%(tail)s'}),
> )
>
> However, the URLs I want to redirect actually look like this:
>
> http://localhost/foo/?param1=value1¶m2=valu
>
> I have created a set of functions and classes to connect to the db and
> request the data and then display the data rendered as a page, however
> what I'm finding is that when the data is being changed from the main
> set of applications connecting to and using this db and then i refresh
> my
> from django.conf.urls.defaults import *
> from django.views.generic.simple import direct_to_template
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> # Example:
> # (r'^reco/', include('rec
> I'm wondering how fast is the include tag. Currently I have a Message
> model, which takes role of site messaging system with two ways of
> delivering - through a dashboard page and through Jabber. Via Jabber,
> each type of message has dedicated template and that template is then
> parsed by re
On Jan 2, 10:16 am, SG_Muse wrote:
> Thank you very much for your quick answers gentlemen!
>
> I removed the quotes, but that lead into another problem;
> TemplateSyntaxError Could not parse the remainder: ' name' from
> 'project name'
> I copied the traceback:http://dpaste.com/104542/
>
> I ho
>
> Is it syntactically correct to have a views.py which is empty but
> exists? I'm not really sure of the process Django will use to validate
> the view.
Django will look for all view functions that your project's various
urls point to. So those functions need to exist. From that point of
view,
On Jul 14, 5:40 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote:
> On Monday 14 Jul 2008, Rajesh Dhawan wrote:
>
> > The replace method here returns a new instance of a datetime object --
> > it's not an in-place replace. This should work:
>
> > self.datetime = se
On Jul 14, 7:02 pm, EAMiller <[EMAIL PROTECTED]> wrote:
> On Jul 14, 11:57 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
>
> > Drop into a shell (python manage.py shell) and send yourself a test
> > message using:
>
> > from django.core.mail import
On Jul 15, 3:30 pm, Jason <[EMAIL PROTECTED]> wrote:
> ...and it is: if I were to switch my current django project over to
> newforms-admin branch, would it break all of the old admin pages?
Yes.
> Or
> is there legacy support built in?
It isn't. But the following snippet might help create q
On Jul 16, 10:52 am, mbdtsmh <[EMAIL PROTECTED]> wrote:
> Thanks Rajesh - this works perfectly!
>
> I now have another question...
>
> What do I now do about manytomany fields for example look at the
> contributor field in the example below - I want the current
> contributors to be selected in t
Hi,
> In my Web application, every user has to log in. In an additional
> user database table, the prefered language of each user is given.
> But how do I activate it?
>
> I use django.contrib.auth.views.login for the login. However, as
> far as I can see, I have to copy-and-paste this function
On Jul 17, 8:32 am, "Andre Meyer" <[EMAIL PROTECTED]> wrote:
> hi all
>
> imagine you have a first model class and a second model class with a
> ForeignKey referring to the first one. for example, a Post model (taken from
> the tutorial blog app) and a Comment model. of course, a post can have
>
Hi Ian,
> I take an uploaded zip/tarball and bind it to a model form. I then
> extract it to a temporary folder and use this as a resources folder
> when I compile a flash movie. If the contents of the flash movie are
> ok for the user i want to commit to the database and move on to some
> furthe
Hi,
> still, it's not exactly clear to me why the admin does not work the same as
> other templates.
The Admin is not a template. So, I don't know what you mean by that.
>
> in my own template, it is no problem to refer to comments of a post using,
> e.g.
>
> {% for comment in post.comments.all
> > > still, it's not exactly clear to me why the admin does not work the same
> > as
> > > other templates.
>
> > The Admin is not a template. So, I don't know what you mean by that.
>
> admin is not using templates? well, i did not check the implementation.
Sorry, if I wasn't clear. The admin
Hi,
> > Take a look at how Form Preview works. You should be able to adapt
> > that to your above workflow:
> >http://www.djangoproject.com/documentation/form_preview/
>
> Thanks , that looks exactly like what I need!
> I do not think however it is possible to use it with uploads as
> django/cont
Hi Fernando,
> I have the following regexes on my django app urls.py:
>
> urlpatterns = patterns('',
>
># List of all resumes for a given Career
>(r'(?P[-\w]+)/$', career_list),
>
># List of all resumes for a given jss
>
On Aug 18, 7:20 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
> actually I have to do it in views, not template
> I need some pure python code
Django's default filters are written in pure Python ;)
You can just call the django.template.defaultfilters.date() method
directly in your view -- just p
Hi Patrick,
> [code]class Foto(models.Model):
> titolo = models.CharField(_('Titolo'), max_length=20, null=True,
> blank=True)
> autore = models.ForeignKey(User)
> originale = models.ImageField(_('Foto originale'),
> upload_to='media/upload/bisaccia/originali')
> foto = models.Ima
On Aug 20, 8:43 am, patrickk <[EMAIL PROTECTED]> wrote:
> how?
>
You can see the following "blocktrans" fragment in django/contrib/
admin/templates/admin/index.html:
{% blocktrans with app.name as name %}{{ name }}{%
endblocktrans %}
-Rajesh D
--~--~-~--~~~---~--~--
On Aug 20, 9:49 am, patrickk <[EMAIL PROTECTED]> wrote:
> how do I provide the translations ... ???
You will have to put the translations for your app names manually (as
Malcolm confirms above, they won't be automatically extracted for
you). But once you provide the app name translation, it wil
Hi,
> Depending on step 1's selection, I want to set the queryset of one of
> the fields (a ModelChoiceField)
>
> e.g.
> class StepOneForm(forms.Form):
>channelType =
> forms.ModelChoiceField(queryset=ChannelType.objects.all())
> class StepTwoForm(forms.Form):
>channel = forms.ModelChoice
Rajesh Dhawan wrote:
> On Aug 20, 9:49�am, patrickk <[EMAIL PROTECTED]> wrote:
> > how do I provide the translations ... ???
>
> You will have to put the translations for your app names manually (as
> Malcolm confirms above, they won't be automatically extracted for
On Aug 20, 12:57 pm, rr <[EMAIL PROTECTED]> wrote:
> Thanks Rajesh
>
> But...it doesn't work
> It complains about form0 doesn't have cleaned_data. I guess
>
> form0 = super(MyFormWizard, self).get_form(0, data=data)
>
> only gives you a form with no data?!
Can you dpaste what you've so far?
--
On Aug 20, 12:57 pm, rr <[EMAIL PROTECTED]> wrote:
> Thanks Rajesh
>
> But...it doesn't work
> It complains about form0 doesn't have cleaned_data. I guess
>
> form0 = super(MyFormWizard, self).get_form(0, data=data)
>
> only gives you a form with no data?!
I just dpasted something that will hel
On Aug 21, 2:06 am, rr <[EMAIL PROTECTED]> wrote:
> sorry for being annoying
>
> It doesn't work, complains about
> 'ChannelTypeForm' object has no attribute 'cleaned_data'
> when submit on the second step(step1)http://dpaste.com/72840/
Can you also dpaste your URLs.py that shows which form is
On Aug 21, 11:56 am, rr <[EMAIL PROTECTED]> wrote:
> The url is herehttp://dpaste.com/72961/
I don't see anything glaringly wrong. You mentioned that it "complains
about 'ChannelTypeForm' object has no attribute 'cleaned_data'"...can
you dpaste that error trace as well?
--~--~-~--~
On Aug 22, 8:00 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
> how do you put AND, OR in ifequal statement of django?
Use nested if statements that use one operator at a time. There's an
example towards the end of the IF tag documentation here:
http://www.djangoproject.com/documentation/templates
Benjamin Buch wrote:
> Hi,
>
> I have a method in a class that filters related objects
> (get_representative_recording):
>
> class Song(models.Model):
> title = models.CharField(max_length=50)
> description = models.TextField(blank=True)
>
> def get_r
Hi,
> I'm new to both Python and Django, and right now I feel horribly
> unproductive without an efficient way to debug things.
Try http://winpdb.org/ -- although it's called WinPDB, it's a platform
independent Python GUI debugger.
-Rajesh D
--~--~-~--~~~---~--~---
Hi Keith,
> I'm using the form wizard for a project. All the field names in
> models.py coincide with the field names in forms.py. There is ONE
> field that is consistently, yet sporadically, causing problems and I
> cannot see why.
>
> # models.py
> class PurchaseApplication(BasicApplication):
> I just can't find how to do this.
>
> I set up a mysql user on the remote mysql host this way:
>
> GRANT ALL on somedatabase.* TO 'ssluser'@'remote_ip_address'
> IDENTIFIED BY 'some_password' REQUIRE SSL;
>
> from the local mysql client I connect like this:
>
> mysql -u ssluser -p -h remote_ip_a
Hi,
On Aug 26, 2:58 pm, "oso che bol" <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> Anyone know how to control Revisions of Page Content by Subversion?
>
> - Django will save the latest content in DB
> - When someone like to view the old version, Django will create an API to
> view from SVN and comp
Hi Mario,
> I am new in Django. I am implementing a web application using the
> django template support. In this way, i am using a single 2-columns
> template. While the second column changes according to the presented
> content, the first column shows the menu and some statistical
> information
Hi,
> I have an image upload form and I want to INvalidate the form if the
> uploaded image it too big. How can I get an error message in the form
> saying the uploaded image is too big?
>
> ===Model==
> class Image(models.Model):
> image = models.ImageField(upload_to='imageu
Hi Nicola,
On Aug 28, 10:12 am, Nicola Murino <[EMAIL PROTECTED]> wrote:
> I think for european user an intpoint function in contrib.humanize
> would be very useful
>
> here is the code (copied from intcomma)
>
> def intpoint(value):
> """
> Converts an integer to a string containing comm
Hi Sam,
I'm tring to figure out how to use crypt algorithm for user password.
> looking at the code (http://code.djangoproject.com/browser/django/
> trunk/django/contrib/auth/models.py) lin 175 there is no way to use
> other than sha1.
You're right that algo='sha1' is hard coded in User.set_pas
Hi Rob,
On Aug 28, 3:24 pm, Rob Goedman <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Since moving to beta-2 I get:
>
> Robs-Intel:mcp rob$ ./manage.py runserver
> Validating models...
> Unhandled exception in thread started by 0x7a8470>
> Traceback (most recent call last):
> File "/Library/Python/2.5
Hi Mathieu,
On Aug 28, 3:24 pm, mathieu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to use Django with an existing Oracle database, but I'd
> rather not clutter the existing DB with Django tables, so I was
> wondering if I can force them to some other schema that the main
> schema I'm using.
Hi,
> from django.db import models
> from django.contrib.contenttypes import generic
> from django.template.loader import render_to_string
> from django.db.models import signals
> from django.contrib.contenttypes.models import ContentType
> from django.dispatch import dispatcher
> from django.con
Hi Fabio,
> I need to pass a model to my template and then access its
> attributes. Some of them start with an underscore, which turns out to
> be a problem for the template mechanism.
>
> I think there are two major roads to solve this:
>
> - write new template tags
> - add a new method to each
> Seems like I'm headed in the right direction, I made the changes you
> suggested but now I'm getting a warning.
>
>
> Exception Type: Warning at /admin/posts/article/add/
> Exception Value: Incorrect integer value:
> ' 0xfd8d50>' for column 'site_id' at row 1
>
> Not sure what's going on...
I
1 - 100 of 408 matches
Mail list logo