Hi!
I have this model with two `DateTimeField`s that aren't showing up in
the Admin page. According to the documentation, the default value for
`editable` is "True". I can't figure out what I'm missing...
(I'm using version 1.0.)
Here's the relevant admin.py code:
class PostAdmin(admin.ModelA
I was using the "auto_now" and "auto_now_add" options. That seems to
be the cause and to my knowledge there's no way to override this.
Regards,
Guillermo
On Sep 6, 10:17 am, Guillermo <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have this model with two `D
y of doing this elegantly.
Cheers,
Guillermo
On Sep 7, 2:07 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Since the whole point of those options is to ensure that the datetime
> values are inserted automatically it would seem a little perverse to
> want to make manual entries in t
tirely reliably (the Powershell script might stop another random
Python process).
Should I be seeing only one process instead of two when I start the
dev server?
I'm on Windows XP Home, Django svn trunk.
Cheers,
Guillermo
--~--~-~--~~~---~--~~
You received thi
ows.html#executing-scripts
> My Computer\HKEY_CLASSES_ROOT\.py registry entry contains "C:
> \Python26\python.exe" "%1" %* with the double quotes.
I have this value here instead, with the same OS and Python version
(ActiveState):
HKEY_CLASSES_ROOT\Applicatio
ll script because I had this
problem. I need to investigate this further.
> To disable this, see the `--noreload`
> option:http://docs.djangoproject.com/en/dev/ref/django-admin/#noreload
Good. This should do the trick for me.
Thanks!
Guillermo
--~--~-~--~~~---~-
Hi all,
I have one app with a Project model and another app with a TodoItem
model. How can I declare Project to be the foreign key of TodoItem?
Or, rather, how can I make TodoItem accept an arbitrary model as
foreign key?
Regards,
Guillermo
Hi,
After installing the comments framework, I get the following error:
The included urlconf django.contrib.comments.urls doesn't have any
patterns in it
I can't find any information about it. What could be causing it?
I'm developing on Windows XP, Django trunk.
Rega
Hi,
Specifically, I don't want to require users to enter their email
addresses or an url.
Regards,
Guillermo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
to make a sencond Thing master by mistake through the admin site.
As far as I can tell, I have to override my model's save() method, but
I'm not sure how well that will play with the automatic admin site...
Regards,
Guillermo
--~--~-~--~~~---~--~~
You r
Hi all,
I want my records to be unique for field A and B together, so that no
two records can share the same values for those particular fields. How
can this be declared in the model?
Regards,
Guillermo
--~--~-~--~~~---~--~~
You received this message because you
admin interface so that
I know what's happened?
Regards,
Guillermo
On Oct 18, 8:04 pm, Guillermo wrote:
> Hi all,
>
> I want my records to be unique for field A and B together, so that no
> two records can share the same values for those particular fields. How
> can this be declared
ing!
>
> 2009/10/18 Guillermo
>
>
>
>
>
>
>
> > Ok I've done the following:
>
> > def save(self):
> > r = TargetMessage.objects.filter(src_fk=self.src_fk,
> > lang_fk=self.lang_fk)
> >
Hi,
If you've ever missed it on Windows and you can use Powershell, you
might want to take a look at this port of virtualenvwrapper:
http://bitbucket.org/guillermooo/virtualenvwrapper/wiki/Home
Regards,
Guillermo
--
You received this message because you are subscribed to the Google G
same settings
during development?
Cheers,
Guillermo
--
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...@goog
27;s out of the question for me now --can't use
Subversion.
I've gone through the tutorial twice step by step, so I don't think I
forgot any instructions explained there.
Does anyone know how to fix this? I'm dying to start developing
website
code.
Regards,
Guillermo
On Jan 16, 1:37 am, 1234 <[EMAIL PROTECTED]> wrote:
> settings.py
>
> TEMPLATE_DIRS = (
> # Put strings here, like "/home/html/django_templates" or
> "C:/www/django/templates".
> # Always use forward slashes, even on Windows
ur
> site-packages directory.
I thought of that as soon as I saw J. Cliff Dyer's post. I'll give it
a try and post back with the results.
Thanks,
Guillermo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
Now it worked! :-)
These two folders were missing in my install:
python/libs/site_packges/django/contrib/admin/templates
python/libs/site_packges/django/contrib/admin/media
Copying them from the downloaded django installation files does the
trick.
Cheers,
Guillermo
Hakan,
Assuming you are using Django 0.96.1, make sure you're installing from
a top folder in your drive.
E.g.: d:\django
Not something like: d:\django\django\
That worked for me.
Regards,
Guillermo
--~--~-~--~~~---~--~~
You received this message becaus
Hi.
- Scaffolding: I prefer it over django admin in many situations. I
mean, when you're doing something complex you'll need to drop out the
django admin and write your own code, so it's cool to have the basic
CRUD code and develop from that.
- Database ORM: Both orm (rail's ActiveRecord and Djan
Hey Adi your answer saved me lots of work, but i want to elaborate on it, i
had this use case but i didnt have to subclass the field all i did was
defined a new label_from_instance
def Option_with_specie(self):
return mark_safe(" %s
"%(self.species.name, self.pk, self.name))
And then on t
Hi guys!
I'm involved in a big Django project and I'm trying to propose a way to
organize the big amount of jinja templates that we have in our project. The
way I'm proposing to oganize them is following a BEM methodology, where all
the pages used by a DjangoView being in a *pages* folder, an
Hi,
As far as I know, you can not do it.
You are better using the generic views and crafting an add/update view
of your own.
Hope it helps,
G
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
>
> Please any help will be appreciated i have a very soon deadline :(
>
> Thank you in advance;
> Mary Ade
Hi,
> urlpatterns = patterns('probob.app1.views',
> (r'^$', 'index'),
> (r'^test/', 'XXX'),
> )
> where XXX I want to refer to 'probob.app2.views.foo'; however django is
> going to make it refer to 'probob.app.views.probob.app2.views.foo'. Is
> there a way to get around this?
Yes
Hi,
This might help:
http://simon.incutio.com/archive/2005/08/15/request
Enjoy,
G
On 10/3/06, Tim Chase <[EMAIL PROTECTED]> wrote:
>
> >> Jay, I did read the documentation before jumping in - but
> >> it's not all necessarily clear for someone who hasn't alot
> >> of experience in Python of D
Hi,
Some examples here:
http://groups.google.com/group/django-users/browse_thread/thread/5615ffe5707d9b92/de7eb2cd4060bad5?lnk=gst&q=code+examples&rnum=5#de7eb2cd4060bad5
Enjoy,
G
On 10/7/06, Marco Amato <[EMAIL PROTECTED]> wrote:
>
> Hi !
>
> I am not a big programmer , and I will found usefu
> * Filter out __init__.py files and any other files not needed.
But take care.
Some __init__.py files have actually code inside (like the
/django/contrib/auth/__init__.py one)
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
Hi,
I am trying to keep a birthday field in the database. But i am only
interested in the day and month. Is there a way of using a DateField
but only with day and month fields? Or should I use another solution?
Thanks,
G
--~--~-~--~~~---~--~~
You received this m
<[EMAIL PROTECTED]> wrote:
>
> On 13 Oct 2006, at 0:24, Guillermo Fernandez Castellanos wrote:
> > I am trying to keep a birthday field in the database. But i am only
> > interested in the day and month. Is there a way of using a DateField
> > but only with day and month f
Hi,
This might help you get going (see at the end). I modified a bit the
function that sends the mail in Django. It is probably very far from
as good as it could be.
I am actually surprised as well that there's no function for that.
Hope it helps,
G
# Use this module for e-mailing.
from djan
I had a similar problem. I havent found any definitive solution, but
there is some solutions that might help:
Create a new model:
class Image(models):
image = models.ImageField(...)
Add to your post model:
images = models.ForeignKey(Image)
Then, create a special view to create posts, wh
Hi,
I remember seing in the Django website, in the examples section, a
nice TODO application, developped with Django 0.91, with nice images
(cartoon faces in different colors) and a nice model. There was a
sandbox in the homepage to play with it.
I was looking for it recently and it seems to hav
That's it, thanks!
G
On 10/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Here is a link to the Django Powered Sites:
>
>
> http://code.djangoproject.com/wiki/DjangoPoweredSites#Variousapplications
>
> Look for WorkStyle. The project page is still up, but the sandbox was
> broken last
Indeed... I made a mistake.
I was thinking of:
class Image(models):
image = models.ImageField(...)
post = models.ForeignKey(Post)
That way you can have all images of a post like p.image_set.all() and
you can construct the copy-and-paste URL.
Sorry for the confusion,
G
On 10/19/06, berto
Hi,
I've written a tutorial (well... actually two in one) about how to use
the Comment (not FreeComment) and Karma parts of Django:
http://www.guindilla.eu/blog/2006/10/21/comment-and-karma-functions-django-framework/
It involves some changes to the code, as I've found what seems to be a
bug. Th
Sorry, back from a trip.
Happy to see that some people tried it and that it works. Thanks!
> I've been looking at this as well. It appears that the ratings and
> comments are tied together and must be submitted together. Is this
> true? I'd like a user to submit a comment along OR rate it OR
Cheers,
have a look at the Meta options order_with_respect_to and ordering:
http://www.djangoproject.com/documentation/model_api/#order-with-respect-to
Hope it helps,
G
On 10/24/06, John Lenton <[EMAIL PROTECTED]> wrote:
>
> Hi all.
> I've got an app where I have a table of nodes, and a table
Hi,
Looking at the model, you can see that:
class KarmaScore(models.Model):
user = models.ForeignKey(User)
comment = models.ForeignKey(Comment)
[...]
So I would think that, if there's a comment of a given user, you can
know if he voted or not by doing a template tag that takes a comm
Cheers,
The nice thing is, you can import your models to any application.
For instance, you have app1/gallery with models.py inside that defines
Photo and Gallery, and you have app2/photorating with models.py
inside. You need for your Rating model in app2 to use the Photo model
of app1.
No worr
You can find the actual code here. For the template tag:
http://svn.guindilla.eu:8000/guindilla/trunk/guindilla/polls/templatetags/guindilla_polls.py
Fo the html:
http://svn.guindilla.eu:8000/www_guindilla_eu/templates/guindilla/polls/open_polls.html
And for how to use it:
http://svn.guindilla.e
to this
object (self.karmascore_set.all()) and calculate the total karma by
iterating over those.
Hope it helps,
G
On 10/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> With help from Malcolm, Guillermo and others, I thought I had this
> karma thing working. Apparently I do not.
/
and is sometimes difficult to answer such questions without the whole
code and some testing.
Hope it helps,
G
On 10/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Guillermo Fernandez Castellanos wrote:
> > Hi,
> >
> > Just guessing, but if I understood we
It's something I've often though about.
I've used databases in many projects, both web and not-web based. And
I am now sure that Django would have been a great help in those
non-web applications as well.
The problem would then be to strip Django of all those web-specific
libraries it's bundled w
e ago that there's a function that allows to
automagically do this by adding it at the beginning of a program.
Hope it helps,
G
On 10/31/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> I think the tricky part is what Guillermo is saying. All views take a
> request object a
Hi,
I've a model with a DateTimeField in it, and I'm creating a form to add objects.
So, I create the form for the DateTimeField. Up to here, everything
ok, it works.
Now I would like to add the js helpers we can find when we use the
admin to create an object (the little calendar and watch with
Hi,
I have a system with 3 levels of permissions in an app at work, and it
has been relatively easy to do.
You have three things that will help you:
- The ability of creating "groups" with different permissions.
- The @login_required and @permission_required, that will allow you a
per-view restr
It seems to me that you might have created the user but you did not
give him the privileges to enter the admin interface.
Enter the admin with your... admin user :-)
Go to Users, select the user and check the 'Is staff' option to allow
him to enter the admin site. Then, logout and try to enter wi
Hi,
I use the include tag:
{% for object in object_list %}
{% include "myapp/object.html" %}
{% endfor %}
The nice things is that include renders the template with the current
context, that is automagically passed to the myapp/object.html
template:
http://www.djangoproject.com/documentation/
Check this:
http://brehaut.net/blog/2006/08/21/django-user-logins/
If you want a complete and working example, tell me and I'll send you one.
Hope it helps,
G
On 11/1/06, MerMer <[EMAIL PROTECTED]> wrote:
>
> I am thinking about creating a small login form as an inclusion tag, to
> display wit
Hi,
I had the same problem in Spanish.
You must save your templates as UTF-8. For example, in Windows Notepad
you can do a save-as and choose UTF- as encoding, instead of ASCII.
Hope it helps,
G
On 11/1/06, Italo Maia <[EMAIL PROTECTED]> wrote:
>
> Well, here's the problem, in portuguese(my id
Hi,
Try adding the option allow_empty=True in your urls:
http://www.djangoproject.com/documentation/generic_views/#django-views-generic-date-based-archive-index
It is false by default, and when there's nothing to show, it throws a
404 error :-)
Hope it helps,
G
On 11/6/06, [EMAIL PROTECTED] <
Hi,
Sorry... I might have written too fast, it does not seem to be your answer...
x
Please, send the models.py and the urls.py and we'll try to have a look.
G
On 11/6/06, Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Try adding the option allow_emp
Got it!!
I tried the code at home, and it did not work for me neither.
I then tried object_list instead of archive_index and it worked well.
So i tried archive_index again with the allow_future=True option and it worked.
My guess:
You are not on the America/Seattle time zone, and for the syste
Hi,
Maybe this will help you:
http://www.djangoproject.com/documentation/sites/
G
On 11/10/06, sandro.dentella <[EMAIL PROTECTED]> wrote:
>
> hi all,
>
> how should I organize my configuration so that it's easy to have
> several django applications in the same apache (not as virtual
> domains
..
G
On 11/10/06, Sandro Dentella <[EMAIL PROTECTED]> wrote:
>
> On Fri, Nov 10, 2006 at 05:43:28PM +0100, Guillermo Fernandez Castellanos
> wrote:
> >
> > Hi,
> >
> > Maybe this will help you:
> > http://www.djangoproject.com/documentation/sites/
>
Hi,
You have the UserFlag option in the django.contrib.comments code as an
example of flagging applied to Comments. It might be easier to take
the code and make it general with Generic relations:
http://www.djangoproject.com/documentation/models/generic_relations/
or take it as an example for you
Check this:
http://www.djangoproject.com/documentation/forms/#c1576
I had the same error a few weeks ago :-)
Hope it helps,
G
On 11/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I have "models.DateTimeField defined in my model as "date_today".
>
> date_today
There is a few examples if you look in the mailing list:
http://code.djangoproject.com/browser/djangoproject.com/django_website/apps/blog
http://www.fallingbullets.com/blog/2006/nov/02/falling-bullets-source-code-you-ninnies/
http://www.rossp.org/blog/2006/may/15/django-magic-removal-upgrade/
http
I've just implemented this for a web page:
http://svn.guindilla.eu:8000/guindilla/trunk/guindilla/events/
It's probably not the most optimized solution, but it works for me.
I use a context processor to pass all the information I need to create
the calendar to all my views. I keep my events in t
> One question though: Could you explain what GUINDILLA_CALENDAR_BASE
> refers to?
When you put an app somewhere it always comes with an urls.py that you
include in your main urls.py.
When you include that urls.py, you can include it under whatever name you want:
(r'^events/', include('g
aner'.
Another option would be to extract automatically my
GUINDILLA_CALENDAR_BASE from the views with a urlresolvers, but it's
even messier.
Thanks,
G
On 11/18/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Guillermo Fernandez Castellanos wrote:
> > In that case, pe
And what about the admin "view on site" and the feeds? They both
depend on the get_absolute_url. How could this be 'integrated' as well
into your solution?
G
On 11/18/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Guillermo Fernandez Castellanos wrote:
> &g
I use:
return HttpResponseRedirect(request.META['HTTP_REFERER'])
But maybe is this considered as bad practice? I am not familiar with
such things and I've to improvise more often than not on such
problems. it works perfectly for me in any case.
Hope it helps,
G
On 11/19/06, ringemup <
Did you put the Stock model before the OrderItem model? Sometimes this
makes problems.
If you did, what about this as an alternate solution?
class Stock(models.Model):
price = models.FloatField(max_digits=10, decimal_places=2)
class OrderItem(models.Model):
quantity = models.SmallIntegerF
> The problem is that if I'm putting polls on every page of the blog,
> then I have to change each URL in the urlconf to optionally include a
> has_voted variable, right (since I'm returning people to their
> originating page via a redirect, not via the POST request itself)?
In this case, you can
Hi,
> > I suspect you hit one small Django controversy. The generic view
> > object_list would give you 404 error when the list it tries to show is
> > empty. The view is there, it works, finds the list -- all is Ok. It just
> > has this strange behavior by default. To overcome it you can add
> >
This might help you:
http://code.djangoproject.com/ticket/2070
G
On 12/1/06, Paul Childs <[EMAIL PROTECTED]> wrote:
>
>
> Paul Childs wrote:
>
>
> > 1. Is there an upper limit to the size of files that one can upload to
> > Django? I am able to upload files of about 5 MB or less with no
> > prob
Cheers,
I would do it in a single table.
Maybe i would add a field to the Post like:
MINISTRY_CHOICES = (
('MUS', 'music'),
('SIN', 'singles'),
('STU', 'students'),
)
ministry = models.CharField(ma
Ok... blind try.
If your my_project is in /path/to/my_project, and you have your
manage.py in that directory, tr adding those lines:
import sys
sys.path.append('/path/to)
I have to manually add the parent directory to the sys.path in order
to use my applications.
G
On 12/1/06, [EMAIL PROTECTE
> Thank you. That is what I was thinking but I wanted to get others
> opinions first. This will also help stay with the DRY ideals. I guess
> the real difficult part would be if a new ministry is added to the
> list. If I understand how it works I would have to make changes in the
> model and then
; and using nesh.thumbnail with no problem, it's just that manage.py
> isn't recognizing it.
>
> I'm pretty sure I have a pythonpath and/or sys.path issue, but don't
> know how to resolve it. When I output sys.path (as above), I don't see
> any django stuff in th
ok...
Try to do a ln -s (or simply move) of your django directory to the
/usr/local/lib/python2.4/site-packages directory, so you have:
/usr/local/lib/python2.4/site-packages/django/
Usually it's the place to put it. Maybe it's that...
G
On 12/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> It almost seems that I could do away with the MINISTRY_CHOICES piece
> and just use the tags because if a tag name does not already exist the
> admin interface will allow one to be created from the Entries page. If
> that is the case then if I want a page to only display the posts for
> music (a
Hi,
For every page login form, check:
http://brehaut.net/blog/2006/08/21/django-user-logins/
No need to use the login view. Use the authenticate function instead.
Hope it helps,
G
On 12/4/06, Milan Andric <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm having the same problem as this thread:
>
Maybe middleware is what you are thinking of:
http://www.djangoproject.com/documentation/middleware/
G
On 12/11/06, Sigurdur Einarsson <[EMAIL PROTECTED]> wrote:
>
> Hello group,
>
> How can a call variables, objects, attributes within the skeleton
> template.
>
> For example if I would like a d
If you want only registered people to use comments use Comments
instead of FreeComments.
G
On 12/15/06, Milan Andric <[EMAIL PROTECTED]> wrote:
>
> In my urls.py, following the wiki docs on FreeComment, I'm using
> (r'^comments/', include('django.contrib.comments.urls.comments')),
>
> But th
Hi,
Another option that has been considered by more and more people is Nginx.
This page it's in polish, but the configuration files are pretty understandable:
http://www.python.rk.edu.pl/w/p/django-pod-serwerem-nginx/
A podcast is here:
http://mx.bw.rulez-forever.com/Django-Nginx-FastCGI-screenca
must be started
#in a very specific way with manage.py. This must be done
#for each DJango web server that has to run.
### END INIT INFO
#
# Author: Guillermo Fernandez Castellanos
# <[EMAIL PROTECTED]>.
#
# Version: @(#)fastcgi 0.1 11-Jan-2007 [EMAIL PROT
Hi,
I've done something very similar myself and I've found the python
module 'calendar' very useful, specially the monthcalendar function.
If you're using the 2.5 version, they have the HTMLCalendar class,
that looks also very promising :-)
If you are interested in the specific code, send me a
Hi,
I added it to the wiki, in a page linked to:
http://code.djangoproject.com/wiki/ServerArrangements
in a new index called "FastCGI init scripts" as you proposed.
Thanks,
G
On 1/12/07, Michael Radziej <[EMAIL PROTECTED]> wrote:
Hi,
could you put this into the wiki? This type of stuff is
Hi,
I use SQlite with Apache mod_python for my (low traffic) web sites. I
find it really easy to manage, and it works just great up to now. It
has never crashed in 3 months, can accept several users concurrently,
is fast and has minimum configuration. I would recommend it for
development and lim
I place my templates inside the "app_name/templates/app_name"
directory. It seems template search path look for the template on this
directory first. So, to decouple the app, templates should be inside it
I think.
But what would happen in this case if two sites use very different
templates for
Mmm... it's a bit confusing. If I get you, you have 2 projects.
Project1 has 2 apps that you would like to reuse in Project 2.
And you have 2 different DB, one for each. And you are wondering how
the projects will differenciate them?
There is right now a thread about project and application
dif
Hi,
You are simply supposed to run Apache (/etc/init.d/apache2 start) and,
if well configured, mod_python will take care of everything. With
Apache, you're not supposed to use manage.py in any way.
The thing you must think about is to add a web server to, well...
serve the /media files. For tha
In that case, the problem seems to be in your urls.py file.
The fact is, the name of yur app does not have to be the name of the
url to access your app.
I mean, you can have an app called 'fun' and access it as /fun/,
/now/, /whatever/,... this will be defined in urls.py.
Now, did you try to a
Maybe you need the allow_empty=True option in your urls.py.
G
On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote:
>
> I'm using Django 0.95 release.
>
> I've got a simple blog, which I wanna move to generic views.
>
> in settings.py:
> TEMPLATE_DIRS = (
> '/home/panos/projects/panos/templ
Hi,
I have some web sites where some identification is needed. In those,
when I log in and do not explicitelly log out, I keep logged for days
and days, and when I go back to the page I'm still logged in.
i guess (and it's only a guess) that, because the authentification
work with sessions, you'
Hi,
> This has been asked several times, but I am not clear on how people
> are solving it. From what I understand so far, a setting called
> "TEMPLATE_CONTEXT_PROCESSORS" can be tweaked to make this possible.
> However, I'm not seeing a clear way to do that.
A context processor is nothing more
Hi,
Try this (http://code.djangoproject.com/wiki/NewbieMistakes):
Django says "Unable to Open Database File" when using SQLite3 ¶
Problem ¶
You're using SQLite3, your DATABASE_NAME is set to the database file's
full path, the database file is writeable by Apache, but you still get
the above erro
Hi,
I'm very new to Django, and I'm a bit overhelmed with doc, so I might
have missed something. Thanks for redirecting me then :-)
I've this model (simplified):
class Department(models.Model):
name = models.CharField(maxlength=10,primary_key=True)
class Admin:
pass
class Job(m
> > My problem is that 'department' in list_display works just great,
> > while in list_filter in makes an error:
> > Request Method: GET
> > Request URL: http://127.0.0.1:8000/admin/unitmanager/unit/
> > Exception Type: FieldDoesNotExist
> > Exception Value: name=branch
> > Exce
Hi,
I've been reading the documentation about order_by(). They say, amont
others, that:
"""
To order by a field in a different table, add the other table's name
and a dot, like so:
Entry.objects.order_by('blogs_blog.name', 'headline')
"""
Unfortunately, I do not quite get the example, and I've n
Hi,
I've been following the discussion with interest. I've seen that many
of you have concentrated on the actual code. But something I would
find also helpful/interesting is a "standard" model of blog. Or, to
push the idea further, a djangoforge of models.
Often, the model is one of the parts th
I'm a beginner, but I would do like this:
class Reservation(models.Model):
properties=model.CharField(maxlength=7,primary_key=True)
class Restaurant(models.Model):
name=models.CharField(maxlength=30,primary_key=True)
reservations=models.ForeignKey(Reservation)
class Theater(models.M
ady happen with other commands as the get() or the filter(). In
deed, you can find in those commands arguments like
table1__table2__name__exact.
I'll follow this thread with interest anyway.
Thanks again for your answers.
G
On 6/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
Hi,
I'm developping an (several?) applications with Django, and I use the
development webserver.
It works great, besides a tiny problem: the django dev webserver
doesn't seem to serve static files (i.e. js, images, css etc..),
except for urls in the built-in admin server. Is it the intended way
Oh!
Actually, I had read some about the static files, but had not made the
relation between that and serving css and images in development
server. How silly of me!
Thanks for the (boring and not so boring ;-) explanation, both were as useful.
G
On 6/10/06, Frankie Robertson <[EMAIL PROTECTED]>
Hi,
I've been developping a link model (see at the end of the post, kind
of personal delicious) , and when I try to use the admin interface to
add a url, I obtain the following error:
Request Method: GET
Request URL:http://127.0.0.1:8000/admin/links/link/
Exception Type: Opera
Hi,
Thanks for the answer.
> > It is really curious because the table seems to exist.
> Does the column exist too?
Mmm... I'm afraid I do not really get the difference between the two...
Let's say that I've checked the tables with sqlite3 (.table and
.schema) and that I'm able to enter data into
1 - 100 of 148 matches
Mail list logo