Hi,
I'm creating a website for an organization that is going to need a
complicated web admin interface. The built in one is fine for the site
administrators, but there are different staff positions that need
access to different models, and sometimes individual fields in those
models should be hid
Hi,
One of my pages is going to have a table that I'd like to be sortable,
and I'm wondering the best way to do this. I looked into django-
tables, which seems good, but once the page is loaded, I'd also like
to be able to sort dynamically (using javascript). Before I go and
implement this myself
Awesome! This is INCREDIBLY helpful.
In terms of using it (I'm not too familiar with server stuff), I have
a few questions (which have to do with Apache, not lighttpd, so you
might not know). Basically, once I create that handler file and view,
how do I use them? Do I modify the .fcgi file (from
40 am, MrJogo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using Django on my university webspace. I set it up by following
> (and slightly modifying) the instructions on this
> page:http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/#runnin...
>
> Now I would like
Hi,
I am using Django on my university webspace. I set it up by following
(and slightly modifying) the instructions on this page:
http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache
Now I would like to protect certain static file
Hi,
I want to make a registration form that writes to two models: User and
a custom Preferences. It seems that model formsets would be the best
way to do that, but all the documentation I can find seems to say that
modelformset_factory gets associated with a queryset. If I want to
create a new mo
Erik: I can't use relative URLs because of how my hosting service (my
university) is set up. Each account is at something like
www.university.edu/~studentname/. I could hard code it if I were
leaving it on my space, but I'm making it for a group (which has space
at www.university.edu/group/groupna
What's the best way to use MEDIA_URL in a CSS file. For example, right
now my CSS file has something like:
body {
background: transparent url('/media/images/bg.gif') repeat;
}
I would like to use MEDIA_URL instead of /media/ (in a number of
places), but other than that the file is static. What
H'ok, got this working. First off, I had a brain hiccup: my model was
one-to-many (the actual model is more complicated than my Book
example; I just used the Book to illustrate my point).
What I ended up doing was basically what you suggested to do using
Django's ORM: I ran two queries, one for B
I read that post, and now have a general idea of what to do, but I'm
still confused on the specifics. It doesn't help that my SQL is VERY
rusty.
Am I supposed to use cursor.execute() to do the INITIAL lookup? That
is, instead of calling a filter, or whatnot, on each book entry, I do
a cursor.exec
I guess I saw it as operating on a group of objects: filtering the
group of authors related to my_book by is_living. I also think I got
RelatedManager confused with Manager.
I think I can handle two db hits, although it's not optimal. I wish
there was a way to get a set of data filtered on many l
John M <[EMAIL PROTECTED]> wrote:
> Since my_book.auther_set.all() returns a QS, can't you just say
> something like ...all().filter(author__isalive=True) or something like
> that? I've never tried, but I thought that django would figure it
> out?
>
> J
>
&
How do I create a custom manager for many-to-many traversal? An
example will illustrate what I want to do better. Suppose I have the
following models.py:
class Book(models.Model):
title = models.CharField(max_length=100)
class Author(models.Model):
books = models.ForeignKey(Book)
name = mo
I'm sending a user-submitted form using EmailMultiAlternatives. From
my view, I'm calling a helper function in a different file (but in the
same directory) to actually compose and send the email. When I send
the message from this helper function (using msg.send()), I get a
Server Error page. When,
Never mind, it was an EMAIL_HOST problem.
On Jun 10, 7:25 pm, MrJogo <[EMAIL PROTECTED]> wrote:
> I use a university webservice, and they do not allow scripts to set
> the "from" address when sending mail (for example, php's mail function
> works fine). How
I use a university webservice, and they do not allow scripts to set
the "from" address when sending mail (for example, php's mail function
works fine). How should I send mail from Django?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I am using Django with fastcgi and I cannot get the append slashes
middleware to work (I have CommonMiddleware installed in my settings
folder, and APPEND_SLASH is true). I have come across a number of
posts where append slashes breaks their installating, but for mine it
just does not append the s
I'm trying to create a simple plain text email template that displays
user-submitted, clean form data. Right now, the template is:
email_template.txt
{% for field, value in data.items %}
{{ field }}: {{ value }}
{% endfor %}
The view passes the template {'data': form.cleaned_data}.
Unfortunately
I want to create a web interface where users can create a form (ie,
define the number of fields and what types of fields they are and the
name to display), which will be stored in the Django database, and
then displayed elsewhere on the site as an actual form. Any ideas how
best to do this, specif
I'd like my javascripts to know MEDIA_URL so they can pull pictures
from there (for a slideshow) and I was wondering the best way of doing
this.
I figure the best way would be to create one javascript file that goes
through the Django templating and makes a variable available for the
other script
My urls.py file is (I only used the non-testing part):
from django.conf.urls.defaults import *
urlpatterns = patterns('',
('', url(r'^~mysite/', include('mysite.mysiteurls'))),
)
And my mysiteurls.py file:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^admin/',
I tried doing what you suggested, but now it gives me the error
'RegexURLResolver' object has no attribute 'rindex' when I try to go
to the admin page (or any page that exists, for that matter. Pages
that don't exist get an unhandled exception).
Also, I'm not sure if your solution will fix my pro
I'm trying to set up my site on a university webspace, so the root is
a subdirectory, ie www.university.edu/~mysite/. Because of this, I'm
having trouble logging into the admin pages. I go to
www.university.edu/~mysite/admin/
and get the login page, but when I try to login, it goes to
www.univers
I'm working on a photo tagging app where the admin specifies
categories (such as people, places, etc) and the users can input tags
for different pictures. On the page, each category is rendered as an
input (with some pretty titles and divs) on a single tagging form. For
text inputs, I'd like to ha
If I pass a form into my template as a variable, is there a way to
tell what input type a field is in the template? My template creates
pretty boxes for the form fields, but I don't want them around hidden
inputs. I was hoping for something like {% ifequal field.type "hidden"
%} but I can't seem t
I understand now. Thanks.
On Dec 17, 9:11 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 18-Dec-07, at 10:33 AM, MrJogo wrote:
>
> > What's the practical difference between calling
> > DB.objects.filter(**kwargs) and DB.objects.get(**kwargs) (where
What's the practical difference between calling
DB.objects.filter(**kwargs) and DB.objects.get(**kwargs) (where
**kwargs can be whichever paramenters)? I understand that filter
returns a QuerySet, but I don't really get how that affects me or my
code.
--~--~-~--~~~---~-
I'd like to migrate a currently static website to Django to add some
dynamic features to it and I have some questions about how best to do
that.
The public site has mainly informational pages that can be static, but
a few, like a members list, work better dynamic. The Django docs say
that Django
28 matches
Mail list logo