in views.py for activating the
> admin interface.
> There is 1 instruction in urls.py (r'^admin/',
> include('django.contrib.admin.urls')), and another in settings.py :
> adding 'django.contrib.admin', in INSTALLED_APPS.
> So, why this exception's message?
> I don't understand
Error is in your code. Read the exception's message.
On 14 янв, 16:06, Rocco Pellegrini <[EMAIL PROTECTED]> wrote:
> Before admin worked well. Now with development version this is the
> result:
> ViewDoesNotExist at /admin/
> Tried home1 in module prog_innov.views. Error was: 'module' object has
Try `status__in` as filter param
On 13 янв, 23:00, Nader <[EMAIL PROTECTED]> wrote:
> Hallo,
>
> I have a Form in which I have define some checkbox input.
>
>
> starting
> waiting
> accepted
> failed
>
> completed
>
>
>
>
> And I want to get the checkbox values in a list, therefor I use
Thanks. My mistake
On 13 янв, 21:39, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Alex Koshelev wrote:
> > When you explicitly write list in choices it evaluates at module
> > import type. To avoid this write function and pass it as 'choices'
> > parameter
>
> &g
What daes it mean "I am unable to login". Error aqcures, exception
raises or something else?
On 13 янв, 18:33, shabda <[EMAIL PROTECTED]> wrote:
> I have a view function I am using for logging in people. When I am
> deploying it to Apache/Mod_python, I am unable to login, but If I am
> running
'templatetags' instead of 'templatetag'
'{% load feed_import %}' instead of '{% load feedimport %}'
On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote:
> I'm trying to create a custom template tag. I've added a feedimport
> app in my project, added it on my installed apps, and inside it I've
When you explicitly write list in choices it evaluates at module
import type. To avoid this write function and pass it as 'choices'
parameter
def get_choices():
[(d.id,d.name) for d in Deck.objects.all()]
#...
deck = forms.ChoiceField(required=True,choices = get_choices )
When this function
You wrote:
P/
APP2/
middlewares.py -> MyMiddleware
And then:
'P.APP2.middlewares.ProfileMiddleware',
MyMiddleware != ProfileMiddleware
Is it right?
On 13 янв, 13:53, Grindizer <[EMAIL PROTECTED]> wrote:
> Hello.
>
> I have one project let say P,
> In this project i define several
file doesn't
> exist if user.get_profile() is called.
>
> Ivan
>
> On Jan 12, 3:24 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > Do you create a profile model and set right value in settings.py
> > file?http://www.djangoproject.com/documentation/authentication/#sto
Do you create a profile model and set right value in settings.py file?
http://www.djangoproject.com/documentation/authentication/#storing-additional-information-about-users
And User.get_pofile() does not require logged in user. Note that
profile instance per user you must create manually.
On 13
Transaction behaviour depends on database backend. What backend do you
use and have you setup transaction support for it?
On 12 янв, 20:45, pength <[EMAIL PROTECTED]> wrote:
> At first, I tried to search in this group, but only got an un-answered
> question similar to
>
You can write your own middleware that will be fit all your
requirements
On 11 янв, 16:45, sector119 <[EMAIL PROTECTED]> wrote:
> Hi All!
>
> In Django docs I read that the cache middleware caches every page that
> _doesn't_ have GET or POST parameters.
> But I want to cache pages which has GET
http://xapian.org/
On 11 янв, 18:46, mamcxyz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Because the issue
> herehttp://www.opensolaris.org/jive/post!reply.jspa?messageID=192094
> I need a working & viable alternative to pyLucene that:
>
> - Work on Solaris & Windows (A must) and maybe linux
> - Open
orm?
>
> On Jan 8, 10:01 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > My mistake, colon needed after "join"
>
> > {{game.platforms.all|join:", "}}
>
> > On 9 янв, 00:49, Darthmahon <[EMAIL PROTECTED]> wrote:
>
> > > Hi Al
There is no way to do it in urls.py. But you may write wrapper view
that will filter queryset and then pass it to generic view.
On 9 янв, 01:19, "Shishir Ramam" <[EMAIL PROTECTED]> wrote:
> I'd like to pass a parameter from a url to a query set of a generic view.
>
> Something like the
t; Thanks for your reply, I've got this semi-working now, only problem is
> it has an error. With DEBUG=True on it gives this:
>
> join requires 1 arguments, 0 provided
>
> Does this mean no results (platforms) are being passed through?
>
> On Jan 8, 9:35 pm, Alex Koshel
What are you want to do? Do you read docs?
The view's code is very strange. So many times appears word "list".
May be you what get all games with platforms, so
def games(request):
games = Game.objects.all()
return render_to_response('games/games.html',
{ 'games':games },
Look at the databrowse application
http://www.djangoproject.com/documentation/databrowse/
On 8 янв, 19:17, Nader <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have looked while for a answer to my problem but unfortunately I
> haven't found a one, maybe I had to spend more time. However I have a
>
Its very strange that so "hard linked" applications can produce clean
and logic architecture:)
1. Try to split your A's models.py into 2 files. A1, A2 in first file.
A3 in second file. In first models file import second with
wildcard(*). In B models.py import only second A file. It's only
sword in the admin
> site, so maybe auth_password_change links to the default template
> file, but why login.htm can be customered with the same url
> stucture.
>
> On 1月8日, 下午9时22分, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > Show code of 'password_change' view
&
Show code of 'password_change' view
On 8 янв, 16:18, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> sorry, this is just the type error.
>
> it is still in strange after i changed to the correct url.
>
> On 1月8日, 下午9时13分, Alex Koshelev <[EMAIL PROTECTED]> w
Your url conf says:
r'^password_change/$',
but you tries to check:
/password/change/
Very strange, really?
On 8 янв, 15:53, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> i have this in one urls.py:
> url(r'^login/$', auth_views.login,{'template_name': 'registration/
>
Simpliest way is to patch model class at applications loading time:
#somewhere in your own models.py file of some app
from django.contrib.auth.models import User
def user_unicode(self):
return '%s: %s %s' % (self.username, self.first_name,
self.last_name)
User.__unicode__ = user_unicode
AIL PROTECTED]>
wrote:
> I did a recent svn checkout. Perhaps I should uninstall and try a
> stable release
>
> On Jan 7, 2:18 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > mysql.base is internal django module that wraps work with MySQL
> > backend. So y
mysql.base is internal django module that wraps work with MySQL
backend. So you have to check your django installation I think.
And that version of django do you use?
On 7 янв, 23:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I think I have MySQL and MySQLdb installed properly. Both of
It depends on concrete design decisions. Form wide initial data have
higher priority then the field's initial data. But if I don't want
init some field every time at form instance creation time I can pass
callable object to field declaration.
On 7 янв, 12:59, Collin Grady <[EMAIL PROTECTED]>
When model method gets 'request' parameter its 99.99% ill-formed
design of application. All request/response handling and most of
business logic have to be in views.py or similar but not in models.py.
On 7 янв, 12:38, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I've just started working on
obj.user_id = request.user.id # this is too
really?
On 7 янв, 12:55, Collin Grady <[EMAIL PROTECTED]> wrote:
> On Jan 6, 1:36 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
>
> > When I used request.user, it outputs the username of the currently
> > logged in user. When I try and use this as part of
I'm realy glad:)
On 7 янв, 03:15, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> you are right ! it works now, thanks
>
> django fresh from svn
>
> On Jan 6, 2008 7:10 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
>
>
> > No
Note you must delete *all* spaces in filter expression
part.forum.thread_set.all|slice:":5"
And what is your django version?
On 7 янв, 02:55, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> I tried with and without... no difference
>
> On Jan 6, 2008 6:32
Have you put a space between "all" and filter mark?
On 7 янв, 02:27, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> update: it doesn't work in the for loop.
>
> --
> TemplateSyntaxError at /parts/8051/
>
> 'for' statements should use the format 'for x in y': for t in
>
First of all, Part.objects.all()[:5] is still lazy. SQL query executes
only when you try to iterate through items.
And you can slice objects in template with "slice" filter
{% for p in part.object.all|slice:":5" %}
On 7 янв, 01:13, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need
User id - request.user.id
On 6 янв, 23:43, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> Been looking to get the current id of the user logged in everywhere
> but can't seem to find how to do this.
>
> Basically in my views.py file I want to insert an entry into a table.
> Part of this
{% if "book_list" %} - what is "book_list" ? It is string literal, so
it is always True.
You must write this:
{% if book %}
And if you want to print books:
{{book|join:", "}}
On 6 янв, 23:38, chiefmoamba <[EMAIL PROTECTED]> wrote:
> I'm sure this will be very easy for most of you...
>
> I am
"Initial" parameter can be a callable object. So you can create "lazy
getter" for your initial data
On 6 янв, 19:27, shabda <[EMAIL PROTECTED]> wrote:
> But I need the initial data to be dynamic, so I can't just do
> text = forms.CharField(widget = forms.Textarea, initial = 'sometext')
>
> I
Select needed image object from base and pass it explicitly to
template context
On 4 янв, 23:43, Emil <[EMAIL PROTECTED]> wrote:
> Greetings, fellow Djangonauts.
>
> Some background to my question:
> I'm building a site where I have Products that each can have one or
> more Images (related via a
From the template you cannot call function with parameters so yoo must
explicitly pass list to the template context.
On 4 янв, 18:35, Paul Childs <[EMAIL PROTECTED]> wrote:
> I am trying to get all the values from 'tail_number' in the form data
> that gets passed to a template...
>
> form.data
No. RequestContext instance used to handle context processors. It
doesn't pass request instance to the context. Request instance passed
to template context only by "django.core.context_processors.request"
if its installed.
On 3 янв, 20:40, "venkata subramanian" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> ./manage.py shell
>>> from django.template.defaultfilters import random
>>> l = [ 1, 2, 3, 4 ]
>>> random( l )
2
>>> random( l )
1
>>> random( l )
4
>>> random( l )
2
>>> random( l )
2
>>> random( l )
3
In template context behaviour is the same.
On 3 янв, 19:09, "jt.wang" <[EMAIL PROTECTED]>
Use the user defined inclusion template tag or {% include %} standard
tag
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags
On 3 янв, 01:52, stryderjzw <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the same situation as a thread (http://groups.google.com/group/
>
The second variant with GET query is the best. One resouce has one uri
but with query you specify it's display properties.
On 3 янв, 01:52, Mordy Ovits <[EMAIL PROTECTED]> wrote:
> I really like Django's policy of readable URLs and one authoritative
> page. My question is how do I do printable
http://www.satchmoproject.com/
On 2 янв, 18:37, [EMAIL PROTECTED] wrote:
> Hi all,
> Is there a good python shopping cart that works well with django?
> Thanks,
>
> Jorge Hugo Murillo
>
>
>
> Be a better
Error is in the way you use it. Please write full model and usage
example.
On 29 дек, 23:54, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> apollo13 pointed this out on the IRC channel:
> If your choices use an integers, get_foo_display returns the integer
> and not the "human readable"
Is there 'django.contrib.auth.middleware.AuthenticationMiddleware' in
your MIDDLEWARE_CLASSES ?
On 29 дек, 18:10, Chris Haynes <[EMAIL PROTECTED]> wrote:
> Thanks a lot, syncdb now works with the admin stuff, and
> I entered the superuser account stuff when requested.
>
> After that I restart
You can try to use 'attrs' parameter of the widget constructor.
http://www.djangoproject.com/documentation/newforms/#customizing-widget-instances
Something like this:
attrs = { "onchange" : "this.form.submit()" }
On 29 дек, 02:46, mamcxyz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wanna autopostback
What version of django do you use? In trunk there is classic password/
confirm schema.
On 29 дек, 01:39, mickey ristroph <[EMAIL PROTECTED]> wrote:
> Does anyone have a good way to have the replace the alg$salt$hexdigest
> input for the Add User admin page with a more traditional password/
>
I use inclusion template tags. It is very easy and following DRY
principle. And tags may be cached independently.
On 28 дек, 10:26, Sam Lai <[EMAIL PROTECTED]> wrote:
> New django user here, so if this has been covered already, I'd
> appreciate a pointer to the right thread.
>
> I've been
Error is in your SMTP parameters in settings.py or something similar.
Look at the traceback:
49. return send_mass_mail([[subject, message, from_email,
> recipient_list]], fail_silently, auth_user, auth_password)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
>
Add "django.contrib.contenttypes" to INSTALLED_APPS an run syncdb
On 26 дек, 23:15, Chris Haynes <[EMAIL PROTECTED]> wrote:
> I add 'django.contrib.auth', to my INSTALLED_APPS. This seems
> necessary to use the admin interface, for I get prompted for the
> superuser login and password when I run
If "continents" is contex variable wich is Continent.objects.all() so:
{% for continent in continents %}
{{continent.name}}
{% for country in continent.country_set.all %}
- {{country.country_name}} ({{country.city_set.count}})
{% endfor %}
{% endfor %}
But this
Execute "./manage.py syncdb" to create django_site table.
Hint: read error message to find solution.
On 25 дек, 20:03, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> While I was following the chapter 12 (Session, Users and Registration)
> of the Django book, I got "ProgrammingError at
It's is "protected" method. You don't have to use it. It used by
django for chaining in query set lazy behavior.
On 24 дек, 19:22, sector119 <[EMAIL PROTECTED]> wrote:
> Hi, All!
>
> When and why I have to use _clone() on queryset? I notice that it
> using in django.views.generic.object_list,
What is UserForm?
On 24 дек, 00:46, l5x <[EMAIL PROTECTED]> wrote:
> Traceback:
> File "/home/user/django_src/django/template/debug.py" in render_node
> 71. result = node.render(context)
> File "/home/user/django_src/django/template/debug.py" in render
> 87. output =
{{tuple.0}}
{{tuple.1}}
On 21 дек, 01:30, Julian <[EMAIL PROTECTED]> wrote:
> hi,
>
> i am passing a tuple (1,2) to a template in a variable like this:
>
> render_to_response("template.html",{"tuple":(1,2)})
>
> how can i access the single-values without a for-loop in the template?
Paginator is lazy. It loads only needed page. It uses slice
syntax( [:] ) of query set
On 18 дек, 16:26, shabda <[EMAIL PROTECTED]> wrote:
> I am using the paginators(django.core.paginator) as describes
> athttp://www.djangoproject.com/documentation/models/pagination/.
> Are paginators lazy,
http://www.djangoproject.com/documentation/cache/
On 17 дек, 23:49, "Rob Hudson" <[EMAIL PROTECTED]> wrote:
> Howdy,
>
> A thought occurred to me today and I'm not 100% sure what Django does
> by default...
>
> Similar to the idea that PHP parses scripts for each request and
> having an opcode
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
On 16 дек, 20:41, shabda <[EMAIL PROTECTED]> wrote:
> Since I need my logged in user to be available to each template, I
> need to go and add context_instance=RequestContext(request) to each
> view.
Your objects aren't ids, so you must get ids explicitly.
On 16 дек, 16:34, Michal Ludvig <[EMAIL PROTECTED]> wrote:
> Tim Chase wrote:
> >> How can I retrieve all objects that are *not* in that list?
>
> >> Something like "Model.objects.filter(id__not_in = processed_ids)".
> >> Unlike
1) May be string is needed
2) Absolute url not uri. So domain name is not needed.
On 15 дек, 01:29, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> I have two question regarding get_absolute_url:
>
> 1) I have the template code:
>
> {% for entry in object_list %}
> {{ entry.title }}
> {%
=signals.pre_save,
> sender=User)
>
> There's a closed ticket for adding a flag to let you know if the
> object was created or not, but I don't think this is included in the
> trunk yet. Does anyone know when it will
> be?http://code.djangoproject.com/ticket/4879
>
> Udi
And where is problem? This is normal behaviour.
On 10 дек, 17:24, DierRe <[EMAIL PROTECTED]> wrote:
> Hello! I have a weird problem.
> This is the model, really simple.
>
> class Tags(models.Model):
> tag_id = models.AutoField(primary_key=True)
> name =
Use django signals infrastructure. Handle post_save and post_delete
signal and add or delete profile. Example of creation:
from django.contrib.auth.models import User
from django.db.models import signals
from django.dispatch import dispatcher
def create_profile_for_user(sender, instance,
No, there is no difference in your case
On 30 нояб, 02:28, Ryan K <[EMAIL PROTECTED]> wrote:
> I have a model called a course that when created needs to insert
> several classes (another model) into the schedule model. Is it best to
> override the course's save method or use the dispatcher? Is
._meta.fields - list of model's fields instances
._meta.get_field - returns field instance with given name
On 22 нояб, 22:07, Ken <[EMAIL PROTECTED]> wrote:
> Does a Model have a fields dict attribute like a Form? I did a dir()
> on a model and don't see one. I see, instead, that the model
You can use this context processor
http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-request
or pass request instance manually to template context in each view;)
On 22 нояб, 00:56, Martin <[EMAIL PROTECTED]> wrote:
> I have an parameter in my querystring
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
On 16 нояб, 20:07, "Dan-Cristian Bogos" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Can anyone tell me if it is possible to access logged user instance
> inside a model method, like save() is?
>
> I need to rewrite save() method, so I
> open in the browser and just shows me lots of (IMHO) garbage
it just binary data of your chm file.
how do you serve static data? through apache or other?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
You must recreate your database tables for this application. See docs
for "manage.py reset"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
1. Related objects are deleted automatically
2. post_delete signal sends when object already is deleted. so it has
no primary key(id=None)
On 11 окт, 17:33, "Young Gyu Park" <[EMAIL PROTECTED]> wrote:
> > def delete_comment_by_entry(sender, instance, signal, *args, **kwargs):
> > entry =
Look at this:
http://code.google.com/p/django-multilingual/
--~--~-~--~~~---~--~~
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
I've use django-multilingual in many projects and happy. It's simple
to integrate and use. No other implementations can do it so
transparent for developer and end user( django-multilingual extends
admin edit page and allows edit entry in all languages very simple).
Use it!
Chris Hoeppner:
> Hi
user = User.objects.filter(email='[EMAIL PROTECTED]')[ 0 ]
On 1 окт, 10:30, cschand <[EMAIL PROTECTED]> wrote:
> Hello all,
> I have a problem with get objects from User
>
> when i give
> user = User.objects.get(email='[EMAIL PROTECTED]')
>
> if only one data is there it is executing ok... but
You may write special admin interface or wait when low-level
permission will be placed in django.
On 27 сент, 16:54, "Lic. Jos M. Rodriguez Bacallao"
<[EMAIL PROTECTED]> wrote:
> hi people, I got a little question, how can I make some users add news
> (model News), modify only news owned by him
http://www.djangosnippets.org/snippets/335/
On 25 сент, 00:52, Leo Shklovskii <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to represent an Active Directory's user guid in Django. In
> AD, its a 128 bit integer that I can pull out with using the ldap
> library. When I access the guid, python
No, you must set unique=True argument manual for slug field
On 24 сент, 23:39, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Am Sonntag, 23. September 2007 schrieb Alex Koshelev:
>
> > Slug is very good when you want to create "fine" urls. You can convert
> > (
>
> > The code:
> > obj = Product(name='Apple')
>
> > obj.id will not be set until you either explicitly set it, or call
> > save(), at which time django will utilize the lack of a pk (among
> > other things) to determine whether or not to do an insert or update.
&
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]>
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
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
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
class Country(models.Model):
#...
class Meta:
ordering = ('name','tour',)
On 23 сент, 03:47, Oleg Korsak <[EMAIL PROTECTED]>
wrote:
> Hello. I have such models:
>
> class Country(models.Model):
> name = models.CharField(_('name'), maxlength=32)
>
>
There is limited functionality for ALTER in sqlite
On 23 сент, 09:19, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 9/22/07, Alexandre Forget <[EMAIL PROTECTED]> wrote:
>
> > I wonder what people are using *right now* to evolve their data ?
>
> ALTER TABLE.
>
> No, really ;)
>
> --
>
Yes. If you had request context processor installed you can access to
variables like so
{{request.POST.foo}}
On 22 сент, 18:47, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> can I access form variables (like request.POST["foo"]) in a template? Without
> writing them in the argument
MyModel._meta.verbose_name
On 18 сент, 20:31, Rob Slotboom <[EMAIL PROTECTED]> wrote:
> For a class method I want to use the value of the
> Model>Meta>verbose_name.
> Can someone tell me how to get this value?
>
> Thanks, Rob
--~--~-~--~~~---~--~~
You received
Thereis no `length` argument in Field constructor. Don't use it.
Your User already has imagefiel_set attribute, so you have to define
another related name for imagefile manager.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hmm... What is `recordset`? QuerySet? QuerySet doesn't have id
attribute.
{% for recod in recodeset %}
{% ifequal record.id selected_id %}
Selected!
{% endifequal %}
{% endfor %}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Where is no way to find host name in settings module. To solve the
problem you can split your settings.py file into host-specified-
settings.py and settings.py
Into settings.py:
from host-specified-settings import *
So you can have one settings.py but many host-specified files at
different
Read the docs:
http://www.djangoproject.com/documentation/db-api/#get-foo-filename
On 10 сент, 11:19, Ronald <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I need a little bit of help here.
>
> I want to let user to import a csv file which will be parsed into the
> database.
> I am thinking of using
Templates just represents data to the client, all calculations must by
in views or model methods
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
http://code.djangoproject.com/wiki/SchemaEvolution
On 6 сент, 14:51, ksuess <[EMAIL PROTECTED]> wrote:
> hi. I had to add a field to an existing model. how do i update the db?
> (of course there is content.)
--~--~-~--~~~---~--~~
You received this message
Show all exception dump
--~--~-~--~~~---~--~~
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 to [EMAIL
Look this:
http://www.djangoproject.com/documentation/django-admin/#inspectdb
Creates django models from the existing db structure
On 4 сент, 11:25, [EMAIL PROTECTED] wrote:
> hello
>
> I am very new to django.
>
> What can I do to reach existing tables ?
>
> in examples I met, new tables have
http://www.djangoproject.com/documentation/models/custom_methods/
On 4 сент, 07:21, shabda <[EMAIL PROTECTED]> wrote:
> I have a python model
>
> class MyModel(models.Model):
> fld1 = models.TextField()
> fld1 = models.TextField()
>
> I want to have a non database item in this
Yes. You have to use RequestContext. If you don't use it django will
not execute context processors and user variable never be passed into
context
On 4 сент, 00:41, Robert <[EMAIL PROTECTED]> wrote:
> I'm not sure that requestContext was what i needed... I need simply to
> be able to get user
Check your TEMPLATE_CONTEXT_PROCESSOR setting. auth TCP must be
installed
http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-auth
On 3 сент, 22:33, Robert <[EMAIL PROTECTED]> wrote:
> Hi all, I'm new to Django and python in general, so please overlook my
Something like this:
from django.db.models import Q
import operator
query_set = Post.objects.all()
users = [ Q( user = user) for user in [ user1, user2, user3 ] ]
query_set = query_set.filter( reduce(operator.or_, users ) )
--~--~-~--~~~---~--~~
You received
Yes you can try to play with custom template tags or with context
processors
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Each field class has to_python() method:
class MyModel( models.Model ):
date = models.DateField()
#
field = MyModel._meta.get_field( "date" )
date_obj = field.to_python( "2007-09-03" )#date_obj is python Date
instance
--~--~-~--~~~---~--~~
You received
Please show your views code or tell what you pass into template
context.
--~--~-~--~~~---~--~~
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
save() is method, so it must get at least one parameter - self.
def save( self ):
...
>
> TypeError at /admin/envwork/environment/12/
> save() takes no arguments (1 given)
>
> Any thoughts?
>
--~--~-~--~~~---~--~~
You received this message because you are
201 - 300 of 311 matches
Mail list logo