Django has an excellent starter tutorial at
http://www.djangoproject.com/documentation/tutorial01/ that should get
you started with what you're asking and want to know. Do the tutorial,
it's worth it.
-joe
On 9/23/07, mayank bhargava <[EMAIL PROTECTED]> wrote:
>
> How to use html or how to creat
You can certainly access cookies manually and do with them as you
like. That's how we've implemented a "remember who it was that last
logged in from this computer" kind of feature.
There's a set_cookie() method on the request object that can do this
work for you - but it's not thoroughly document
I tried doing it without the url, it returns a 404 error. The doc says
that Each time any Django application raises a 404 error, the
middleware checks the flatpages database for the requested URL as a
last resort. Yes I have added the middleware,
'django.contrib.flatpages.middleware.FlatpageFallba
How to use html or how to create dunamic html pages with django ?
best regards
mayank
--~--~-~--~~~---~--~~
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
Hi...
Can you tell me then what should the url cof be like? It links the
url to the function in the view mod. If there is no function in view
then? I have to give the url i belive Thank you
--~--~-~--~~~---~--~~
You received this message because you are sub
I don't use windows very much, but it sounds like your version of
python does not have the sqlite2 module installed, see
http://cheeseshop.python.org/pypi/pysqlite/2.3.4
If you are new to python, it might be useful for you to use
easy_install to download packages and resolve dependencies. You
http://www.360Elite4free.com/index.php?ref=3979324
Go and join this site complete one level a offer and reffer friends to
get a free xbox 360 elite...I'm paying $10 to the first 10 people who
join and get credited for completing an offer!
http://www.360Elite4free.com/index.php?ref=3979324
--~
This same issue is taking up a lot of my time too. Same symptoms. I
haven't been able to come up with a solution yet, so I'm hoping
someone can shed some light on the subject.
On Sep 5, 9:59 pm, Greg <[EMAIL PROTECTED]> wrote:
> Here is my modelfilethat contains a save method - When I do a assert
This same issue is taking up a lot of my time too. Same symptoms. I
haven't been able to come up with a solution yet, so I'm hoping
someone can shed some light on the subject.
On Sep 10, 12:18 pm, Greg <[EMAIL PROTECTED]> wrote:
> Anybody??
>
> On Sep 5, 11:59 pm, Greg <[EMAIL PROTECTED]> wrote:
On Sun, 2007-09-23 at 18:13 +0100, Chris Hoeppner wrote:
[...]
> Seems pretty silly to me. I know that any request "having some kind of
> impact on future requests" should be done via POST, but this is still
> pretty silly.
You may not like that we choose to follow standards, but you do have to
l
On 9/23/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> I wonder what others have been doing? I might as well copy & hack the
> setlang function and make it accept GET requests, but that's not
> something I want to make a habit.
>
>
You can just do a middleware that manage get requests.
benoit
Hi there!
As I see, there has been a little change to the setlang view: It only
accepts POST requests. This wasn't the case when I last did a localized
site. Now, either my html knowledge needs an update, or this makes it
impossible to make a simple "menu" showing flags for each language,
without
Hi list,
I would like to have sessions normally timeout after
8 hours, that is easily achieved by setting
SESSION_COOKIE_AGE in settings.py.
But additionally I'd like to provide a checkbox to "stay logged
in on this computer until i log out" which shall make the
session immortal (remove expiry).
Thanks for the pointer.
This does indeed change the default value to 'Male'
but the select-box still offers the dashes...
I want to eliminate the dashes-option completely,
why give the user a choice that will never be accepted?
-mark
On Mon, 2007-09-10 at 06:47 +, Ryan wrote:
> Use initial
I figured out what was going wrong. I had the Sites Framework
enabled, but I wasn't using it. Apparently, having anything but
example.com in that database table was was what was screwing it up.
Once I put example.com back in there, it started working. Removing
the framework from the INSTALLED_A
but Country class doesn't have such field 'tour' ! ;/
Alex Koshelev пишет:
> class Country(models.Model):
> #...
> class Meta:
> ordering = ('name','tour',)
>
> On 23 сент, 03:47, Oleg Korsak <[EMAIL PROTECTED]>
> wrote:
>> Hello. I have such models:
>>
>> class C
Newbie question:
I'm trying to use a sqlite3 database on a windows machine, I get this
error when I run "manage.py syncdb" :
django.core.exceptions.ImproperlyConfigured: Error loading pysqlite2
module: No module named pysqlite2._sqlite
how can I get django to find my database?
--~--~-
Hi Michael,
It's an interesting solution which I didn't think of.
The strong point of this solution is that it avoids changing the inner
structure of the decorated function. On the other hand, in the
decorated function, type checking is thus needed because the passed
parameters may have been chan
http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py#L266
In the function that Alex linked to, the answer to your question
is on line 266:
backend.ops.last_insert_id(...)
This varies from backend to backend, but is abstracted enough to
know what the most recent insert ID
Hi there!
I'm working on a project where users can upload videos to a service.
The project is written in Django, but the videos and transcoding of
these is handled by a remote server in our media corporation.
The API for uploading to this server only accepts HTTP POST, and this
is where I'm a bi
Thanks everyone,
Once again, I do not expect to know the record's ID before having
saved it. But once I save it, that object DOES HAVE an id. I am
assuming it was a simple insert command underneath, but do not know
how this DB assigned is has become visible to Django. The django code
representing
After the object is saved, the id is set.
It is not set by django, it is set by your backend database.
"There's no way to tell what the value of an ID will be before you
call save(), because that value is calculated by your database, not
by Django." again from the db-api documentation.
-ric
http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py#L239
On 23 сент, 19:08, Siah <[EMAIL PROTECTED]> wrote:
> My examples was faulty. Sorry. I meant after you save the object for
> the first time, that is:
>
> obj = Product(name='Apple')
> obj.save()
>
> At this point obj
I´m not 100% sure about Django, but in PHP there´s a function called
mysql_insert_id() in the DB-API (http://se.php.net/mysql_insert_id) - maybe
Django is using something similiar.
/Nianbig
On 9/23/07, Siah <[EMAIL PROTECTED]> wrote:
> >
> >
> > My examples was faulty. Sorry. I meant after you s
My examples was faulty. Sorry. I meant after you save the object for
the first time, that is:
obj = Product(name='Apple')
obj.save()
At this point obj has an ID in it. How does it know that ID?
A SQL statement similar to the following must be generated:
insert into product_table (id, name) valu
Actually,
from the db-api documentation.
"To create an object, instantiate it using keyword arguments to the
model class, then call save() to save it to the database. ...
... Django doesn't hit the database until you explicitly call save()."
The code:
obj = Product(name='Apple')
obj.id will
Good idea and I have rechecked them; they all do return strings.
Paul Hide
On Sep 23, 3:42 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Check that your __str__/__unicode__ model's methods return strings
>
> On 23 сент, 17:41, paulh <[EMAIL PROTECTED]> wrote:
>
> > I select a model in the initi
Slug is very good when you want to create "fine" urls. You can convert
(using prepopulate_from param) your title field of entry to slug and
use it for entry's permalink.
But of course you can use entry's id(integer value) for url mapping
On 23 сент, 17:12, Florian Lindner <[EMAIL PROTECTED]> wrot
Check that your __str__/__unicode__ model's methods return strings
On 23 сент, 17:41, paulh <[EMAIL PROTECTED]> wrote:
> I select a model in the initial admin page and am offered a choice of
> the available instances/rows to change. If I either select one of
> these, or press the add button I get
If you want use django templates standalone read this:
http://www.djangoproject.com/documentation/templates_python/#configuring-the-template-system-in-standalone-mode
P.S. Why "query"?
On 23 сент, 17:26, mayank bhargava <[EMAIL PROTECTED]> wrote:
> when i type : >>>from django.template import Tem
I think that when you create Product object django inserts new row
into database and retrieves with SELECT new id.
On 23 сент, 16:00, Siah <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When in a model you run something like this:
>
> >> obj = Product(name='Apple')
> >> obj.id
>
> 4
>
> I realize the first
I select a model in the initial admin page and am offered a choice of
the available instances/rows to change. If I either select one of
these, or press the add button I get the following error:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py"
when i type : >>>from django.template import Template
on command prompt
it is showing :
Traceback (most recent call last):
File "", line 1, in
File "c:\python25\Lib\site-packages\django\template\__init__.py",
line 918, in
add_to_builtins('django.template.defaultfilters')
File "c:\py
Hello,
I am about to develop a blogging application for my site (it's also a learning
Django app, so please don't point me to existing projects ;-)
Since I do want to omit to change my entire app due to mistakes I had made
while designing the model I would like to discuss my concept here before
Hi,
When in a model you run something like this:
>> obj = Product(name='Apple')
>> obj.id
4
I realize the first statement will turn into an insert table. But, how
does django know of its newly assigned primary key(ID).
I have a legacy database whose ID is assigned with an after trigger,
and am
thanks, we´ll check that.
On 23 Sep., 12:03, tonemcd <[EMAIL PROTECTED]> wrote:
> Check your ~/.subversion/servers file. Any proxy requirements (such as
> would be in the environment variable 'http_proxy') need to be
> replicated there.
>
> ie
> ...
> ...
> [global]
> # http-proxy-exceptions = *.
Nope, i'm using select_related().
On 23 сент, 04:32, "Michael Elsdoerfer" <[EMAIL PROTECTED]> wrote:
> > {% ifequal newsitem.user.id 12 %}
>
> Just a guess, but is it possible that this requires a separate query for the
> user for each item in object_list?
>
> Michael
>
> > -Original Message-
JOIN THE HOTTEST GROUP ON THE NET OVER 10,000 JOIN WEEKLY FREE
SIGN UP!
http://www.blpurl.com/al42
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Check your ~/.subversion/servers file. Any proxy requirements (such as
would be in the environment variable 'http_proxy') need to be
replicated there.
ie
...
...
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = yourcache.yoursite.com
http-proxy-port = 80
we have a server with about 15 customers (vhosts) - every setup is
exactly the same and usually django-updates work fine.
but, when I don´t do an update for about 6 months, it doesn´t work
anymore (it´s the third this happens now).
our system-administrator didn´t find anything.
thanks,
patrick
Alexandre Forget wrote:
> I wonder what people are using *right now* to evolve their data ?
>
> I'm using this:
>
> # create a fixture with all data in the current db
> python manage.py dumpdata --indent=4 > initial_data.json
>
> # delete de database
> rm db.sqlite
>
> # edit the model
>
> #
http://apps.facebook.com/megapokey
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email
On 9/23/07, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> There is limited functionality for ALTER in sqlite
Which is why I only use PostgreSQL.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~-~--~~~---~--~~
You received thi
43 matches
Mail list logo