On Monday 27 Feb 2006 5:27 am, Mary Adel wrote:
> I am using Django and now and i published my website but the
> problem is that admin is not that good and sometimes he damages
> somethings so i need to take a backup from the database of my
> project every night but i don't know how to do this if
Reading the source code of the "slice" filter in Django it looks to me
like it should work on strings as well as lists. If you only need to
truncate and discard the extra characters, that would be the way to go.
--~--~-~--~~~---~--~~
You received this message beca
Siah wrote:
>Please let me know if this feature is available, or else I'll find out
>how to implement it as a filter myself.
>
>
A filter would look simple:
def truncate(value,arg):
return value[0:arg]
However it won't work for international characters. This will:
from djang
I think the 'core=true' option is used when you're defining a lookup
field that is to be edited on another object's page.
In the model api docs it says that 'blank = True' is the option you
want to use to make entry optional, otherwise field is required to be
entered, i.e., non-blank:
http://www.
It seem that all the fields defined in a model turn up as required in
the Admin. I would like to make a field optional in the admin. I
tried "... (core=False)" ,but this does not seem to work.
I also created a super user via the admin GUI and this is not working
-- the super user cannot log in!
Got this resolved.
The sql folks changed the mysql user password and did not tell me!
--~--~-~--~~~---~--~~
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@googlegr
Have you taken a look at the Many-to-many relationships example? Looks
like you're trying to manually create the links between tables, whereas
you're supposed to use the Model API's built-in 'set_x' method.
http://www.djangoproject.com/documentation/models/many_to_many/
Also, are you sure t
On Feb 26, 2006, at 7:38 PM, tttallis wrote:
>
> Can anyone suggest the best way to implement a model where there are
> many different types of users, all of which have access to different
> fields in the same database item?
Same way as you'd write a model for any other thing. If every record
Can anyone suggest the best way to implement a model where there are
many different types of users, all of which have access to different
fields in the same database item?
We are a pair of Django newbies who are trying to port an in-house
Content Management System across from PHP. The CMS sits be
I'm experimenting with 'inspectdb' so I can use Django on an existing
database. I was curious to see what inspectdb would return for the
tutorial tables (Polls, Choices) and was confused by the output:
class PollsChoice(meta.Model):
id = meta.IntegerField()
poll_id = meta.IntegerField()
I'm trying to figure out how to manually create entries in a database
where one table has multiple fields related to other tables. What I've
tried to do does create the tables ... partially. Because there are
other hidden "relationship" tables, I'm not sure how I'm supposed
to populate those oth
On 2/26/06, Mary Adel <[EMAIL PROTECTED]> wrote:
>
> I am using Django and now and i published my website but the problem is
> that admin is not that good and sometimes he damages somethings so i
> need to take a backup from the database of my project every night but i
> don't know how to do this i
I am using Django and now and i published my website but the problem is
that admin is not that good and sometimes he damages somethings so i
need to take a backup from the database of my project every night but i
don't know how to do this if anyone can help me
I am using postgresql
--~--~-
Thanks a lot;
On Sun, 2006-02-26 at 11:35 -0800, Jan Rademaker wrote:
>
> ('^$', 'django.views.generic.simple.redirect_to', {'url' : '/home/'}),
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
emm.. But wait a sec! How do I call a python function from django
template. I don't think it is allowed, meaning that I'd still have to
write a filter using textwrap:
>>> wrap('siasookhteh', 5)
['siaso', 'okhte', 'h']
Sia -
--~--~-~--~~~---~--~~
You received thi
Thanks David. I did feel there should be a way to do this since it
seems common enough.
I'll read up on textwrap now,
Regards,
Sia
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
Hi Sia. I don't believe you need a filter. Just import textwrap module
and do what you want. See textwrap module on python.org in the docs for
more.
Regards,
David
Siah wrote:
> Hi,
>
> I noticed there is no filter to truncate a string to a given number of
> characters as apposed to just word
Hi,
I noticed there is no filter to truncate a string to a given number of
characters as apposed to just words. It can be useful. For instance I
am trying to show contact list that includes email addresses, and given
that some people have bizarrely long emails, I'd like to limit it to
some value.
No need for Apache, you can put this in your urlpatterns:
('^$', 'django.views.generic.simple.redirect_to', {'url' : '/home/'}),
-janr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
I ma using flatpage and i make my website cairo.demo.com and i have home
page
but i need to redirect the url cairo.demo.com to cairo.demo.com/home/ as
i have flatpage called home
how is this could be made is it appache or what
Thanks for all your help,
--~--~-~--~~~--
20 matches
Mail list logo