Before going to answer of your question i am really sure that you have
not read the docs of django-registration and django docs any
way
if you want to make it use django-registration(default) then install
it and write in settings.py 'registration'(below of your appname)
in your site
Hi all,
I've released a project on Google Code to create importers for Django
models.
Here is the blog release and the project page:
http://ricobl.wordpress.com/2009/04/21/django-importer-released/
http://code.google.com/p/django-importer/
Any comments are welcome!
Best regards,
Enrico
Ryan,
Thank you so much. The custom auth backend is the perfect solution. I
feel silly now that I didn't think of that :) Very nice work. Hope I
can pay you back someday.
Paul
On Apr 20, 7:26 pm, Ryan Kelly wrote:
> On Mon, 2009-04-20 at 15:17 -0700, Paul McLanahan wrote:
> >
I need to create a multiple page form that upon submit the information
is saved to the database so the user can finish it later.
I want to be able to check the data filled out on the form and
depending on the values entered present different pages to the user.
I know this is possible, I just
On Mon, 2009-04-20 at 15:17 -0700, Paul McLanahan wrote:
> I'm using a proxy model of django.contrib.auth.models.User to override
> __unicode__ and add some extra methods. This also means that I use my
> proxy model class in my ForeignKey and ManyToMany fields. This is all
> find and good until I
Nevermind! I figured it out.
Just for reference for those with a similar problem:
"extends" and "include" aren't part of 'Template' and must be
separately included:
from django.template import Template, Context, loader
from django.http import HttpResponse
def render(request):
Thanks Dougal,
That was really helpful. I was only picking User auth as an example.
But the truth is there are many others models of mine that inherit
from another class.
Thank you very much
On Apr 21, 1:25 am, Dougal Matthews wrote:
> I think its as simple as;
>
> x =
Hey guys, new to Django, and i'm having a little trouble just getting
basic includes working.
I have a basic template "world.html" as follows:
{% include 'hello.html' %}
World
With "hello.html" as follows:
Hello
-
I'm getting the following
I'm using a proxy model of django.contrib.auth.models.User to override
__unicode__ and add some extra methods. This also means that I use my
proxy model class in my ForeignKey and ManyToMany fields. This is all
find and good until I need to use request.user and assign it to an
instance of another
>From the docs:
"A good example is the delete() method on each Django model object.
The template system shouldn't be allowed to do something like this:
I will now delete this valuable data. {{ data.delete }}"
What method should I use for allowing a user to delete an instance of
the model using
On Mon, 2009-04-20 at 11:39 -0700, Vishwajeet wrote:
> Hi All,
>
> This is not to flame any war; I just wanted to know the key features
> to consider among the two web frame works.
>
> What advantage and disadvantages you have when you decide using any
> one of them.
>
> Thanks for your help
>
yes! that works exactly the way i wanted
shouldnt that be part of Django? feels like a very fundamental piece
of logic.
Also yeah you're right about the URL.
On Apr 20, 6:14 am, Tom Evans wrote:
> On Sun, 2009-04-19 at 16:40 -0700, Johan wrote:
> > Hello
> > I have a
Thanks for replying Anatolly,
I'm 0-2 on it crashing on other peoples machines.
I have it doing the identical thing on 2 machines, one of which is
using python 2.5 and django svn. The other is using python 2.6 and
django svn. Both are using the 1.2 series of memcached and I have
tried using
legutierr wrote:
> Thomasz- Have you figured out a solution to this problem? Did you log
> a bug in the defect tracker?
No and no. Never thought it might be connected to Django in any way if
it's already in the docs and everything. Might well be worth a try. I
will file a
Works for me.
What version of python, django, memcached and python memcache bindings
you use?
On 20 апр, 11:41, libwilliam wrote:
> http://dl.getdropbox.com/u/174510/pickle_test.tar.gz
>
> I am having trouble pickling querysets. I don't have any problem when
> using local
On Apr 20, 8:16 pm, bconnors wrote:
> How do I set up a initial_data.json file?
> Athttp://docs.djangoproject.com/en/dev/howto/initial-data/
>
> I came across this “Or, you can write fixtures by hand; fixtures can
> be written as XML, YAML, or JSON documents. The
How do I set up a initial_data.json file? At
http://docs.djangoproject.com/en/dev/howto/initial-data/
I came across this “Or, you can write fixtures by hand; fixtures can
be written as XML, YAML, or JSON documents. The serialization
documentation has more details about each of these supported
Hi All,
This is not to flame any war; I just wanted to know the key features
to consider among the two web frame works.
What advantage and disadvantages you have when you decide using any
one of them.
Thanks for your help
--~--~-~--~~~---~--~~
You received this
Hi all, i'm trying to calling a genric view from a simple custom view
(why? see this
http://groups.google.com/group/django-users/browse_thread/thread/b5692e73f2b52b9)
but i'm running into trouble when feeding the
django.views.generic.date_based.object_detail my slug parameter. I'm
trying this:
cheers again for the response. However the code i used to get the
wrapper working is given below
def searchwrap(request):
error = False
if 'q' in request.GET:
q = request.GET['q']
if not q:
error = True
else:
articles =
Hi guys,
I'm reading django book chapter 5 (www.djangobook.com), and it is
about how to connect with databases and how to use them with django.
I've been having really hard time downloading MySQL and using it!
I rock when it comes to SQL, and i really would love to use mysql,
it's just that the
On Mon, 2009-04-20 at 09:47 -0700, NoviceSortOf wrote:
> By digging around here in this group I found
> an answer in using
>
> {{ book.description|safe }}
>
It's just a minor thing, since you said this content comes from data
entry, but this allows all HTML in book.description to be
I'm trying to manually create an object (from a signal). My problem is
that the object has a 'sites' M2M field:
class News_item(models.Model):
...
sites = models.ManyToManyField(Site)
...
but when I try to create the object:
news = News_item(
On Apr 20, 11:31 am, NoviceSortOf wrote:
[...]
> When attempt to using {{ book.description }} in the template, it
> outputs all the tags onto the screen,
> when what we want is actual line breaks.
>
[...]
>
> Can someone please give me a clue as to how to make this work
By digging around here in this group I found
an answer in using
{{ book.description|safe }}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I've a template that displays descriptions of books.
The descriptions are long text fields usually containing 1-3
paragraphs of text.
Inside the text description during data entry tags are placed to
indicate line breaks.
When attempt to using {{ book.description }} in the template, it
outputs
Tim,
Thanks for the sample code. It was exactly what I was looking for. I'm
still debating my route but it's nice to know what I want to do is possible.
Thanks.
On Mon, Apr 20, 2009 at 3:35 AM, Tim Chase
wrote:
>
> >def
On Apr 20, 2:57 am, x_O wrote:
> Hi
>
> I'm looking for some general solution how to split models.py. Right
> now my models.py reached 1000 lines and that argues some how with good
> programing behaviour that I used use.
>
> I'm thinking about:
> myproject/
>
Good stuff, thanks for the reply all. Roll on 1.0.3!
On Apr 20, 4:19 pm, Karen Tracey wrote:
> On Mon, Apr 20, 2009 at 11:03 AM, Alex Gaynor wrote:
> > On Mon, Apr 20, 2009 at 7:18 AM, chewynougat <
> > peter_i_campb...@hotmail.co.uk> wrote:
>
> >> We
I think its as simple as;
x = Staff()
user_obj = x.user
I found that by just printing out the result of dir(Staff()) ;)
I think however, you want to add to add a subclass for a user that
already exists. I'm not sure how you can do that, or if you can. The
recommended guide to extending/adding
Hi!
I've got 2 admin models like these:
class MyUserServiceAdminForm(forms.ModelForm):
class Meta:
model = UserService
def clean(self):
Get client_id for validation???
return cleaned_data
class UserServiceAdmin(admin.TabularInline):
model = UserService
fields =
On Mon, Apr 20, 2009 at 11:03 AM, Alex Gaynor wrote:
> On Mon, Apr 20, 2009 at 7:18 AM, chewynougat <
> peter_i_campb...@hotmail.co.uk> wrote:
>
>>
>> We have recently upgraded django to 1.0.2 but this has subsequently
>> broken some inlineformsets we have. I'm not sure if
On Mon, Apr 20, 2009 at 7:18 AM, chewynougat wrote:
>
> We have recently upgraded django to 1.0.2 but this has subsequently
> broken some inlineformsets we have. I'm not sure if this is a django
> bug or if it is an error in our code, although the code pretty
Regarding failures 1 and 2 in the error output for the django test suite which
are listed here
http://dpaste.com/34864/ . I recently ran the tests on svn revision 10604.
Failure 1 - The error was referred to in ticket
http://code.djangoproject.com/ticket/6802 .
Should this ticket be
My guess is that your connection string specifies connecting as user
"acacian", specifies no password and that you've been logged in as a
user with the same name to run runserver. The default configuration of
postgresql allows users to connect as a postgresql user of the same
name as them without
Even more. How feeds are different from any other pages?
What if I will simply generate a template of needed structure using django
models + views (as described in tutorials)
Thanks,
Oleg
On Mon, Apr 20, 2009 at 3:14 PM, Oleg Oltar wrote:
> Hi!
>
> I want to create RSS2
On Sun, 2009-04-19 at 16:40 -0700, Johan wrote:
> Hello
> I have a problem I cant get my head around.
> I want to list through a bunch of people and see which one im friends
> with and which ones i can add as a friend. sort of twitter style.
> If it throw in an else it will hit on every step of
Thanks Alex, I didn't know this function, that's what I needed!
Bastien
On Apr 20, 1:40 pm, Alex Koshelev wrote:
> Hi, Bastien.
>
> I think the simple solution with property may be the best aproach if
> you cannot change dependent code:
>
> user = property(lambda self:
Dear all,
I have an inheritance model as such:
class User(models.Model)
class Staff(User)
Now I already have the instance of User inside view:
user = User.objects.create(name="Joe")
now how do I relate this user instance to the staff instance?
I tried looking in the documentation but can
Hi!
I want to create RSS2 feed. I read the doc
http://www.djangoproject.com/documentation/0.96/syndication_feeds/
So created a class
# coding: utf-8
from django.contrib.syndication.feeds import Feed
from articleManager.models import Article as article
class LatestEntries(Feed):
title =
Hi, Bastien.
I think the simple solution with property may be the best aproach if
you cannot change dependent code:
user = property(lambda self: self.author)
On Mon, Apr 20, 2009 at 3:37 PM, Bastien wrote:
>
> You're right Dougal, I *should* do that I have various
You're right Dougal, I *should* do that I have various apps already
working with the whole project trying to access object.user in general
and I was wondering if there was a clean way to alias author. I'm
already using some workarounds but it's dirty...
On Apr 20, 1:26 pm, Dougal Matthews
Thanks for the continued help.
I have written the URLS.py now they are as below:
urlpatterns = patterns('',
# Activation keys get matched by \w+ instead of
the more specific
# [a-fA-F0-9]{40} because a bad activation key
should still get to the
Thanks for the continued help.
I have written the URLS.py now they are as below:
urlpatterns = patterns('',
# Activation keys get matched by \w+ instead of
the more specific
# [a-fA-F0-9]{40} because a bad activation key
should still get to the
why don't you just access entry.author rather than entry.user?
I think perhaps I'm not quite following your question.
Dougal
---
Dougal Matthews - @d0ugal
http://www.dougalmatthews.com/
2009/4/20 Bastien
>
> Hi,
>
> I searched the doc but couldn't find anything
We have recently upgraded django to 1.0.2 but this has subsequently
broken some inlineformsets we have. I'm not sure if this is a django
bug or if it is an error in our code, although the code pretty much
reflects that in the SVN documentation. Any help on this issue would
be much appreciated, in
Hi,
The function authenticate in django/contrib/auth/__init__.py reads:
31def authenticate(**credentials):
32 """
33 If the given credentials are valid, return a User object.
34 """
35 for backend in get_backends():
36 try:
37
http://dl.getdropbox.com/u/174510/pickle_test.tar.gz
I am having trouble pickling querysets. I don't have any problem when
using local memory but I do when using memcached. I have a link to a
test project that shows the problem. The settings file is using
memcached on port 2559. I started
Yes, that's what I suspect.
I've just tested the script through a python interpretor (stripped out
the django only stuff first) and it definitely works.
So I'm wondering if it might be a timing issue, that somehow on a
refresh, perhaps due some kind of cacheing, the queryset is not being
Hi,
I searched the doc but couldn't find anything about this: I have a
model for a blog entry that contains a foreign key to user and is
named author. But that would be really convenient for me if the object
would respond to the keyword 'user' as well: entry.user doesn't exist
in the model but I
So what is your problem?
update_cal_links() doesn't work after page refresh?
On Apr 20, 1:05 pm, Tonne wrote:
> > I didn't see how you return array to template context.
>
> Okay... well, it's actually a string that I finally send to the
> template. It's a long story
>def MustHavePermission(*required_perms):
> def decorate(f):
>def new_f(request, *args, **kwargs):
> perms = UserCompanies.objects.filter(
>user=request.user,
>company=determine_company(request),
>)
> for perm in
The templates are basically your HTML pages. You need to write your
urls.py so that when a user visits a certain page, the view that
corresponds to that url is just a render_to_response with a path to
the HTML page. I can't really be bothered to explain it in detail but
once you get the hang of
Probably best to ask @djangocon or @robertlofthouse on twitter.
Cheers,
Dougal
---
Dougal Matthews - @d0ugal
http://www.dougalmatthews.com/
2009/4/20 Aljosa Mohorovic :
>
> anybody has any information about possible euro djangocon talks?
> or any idea when will
anybody has any information about possible euro djangocon talks?
or any idea when will talks schedule be available?
Aljosa Mohorovic
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Hi
I'm looking for some general solution how to split models.py. Right
now my models.py reached 1000 lines and that argues some how with good
programing behaviour that I used use.
I'm thinking about:
myproject/
settings.py
myapp/
models/
file.py
directory.py
I have a fair understanding of Python, and have been interested in
Django for a while now, I have read the documentation and done some
tutorials.
Now I want to get my teeth stuck into a working project, As I said I
want to set up a working registration application, and I am working
through the
> How should I go about moving the site onto the django platform?
Learn Python, then Django. This implies reading lots of documentation
and being really interested in the whole thing. Also, you should try
to understand your needs before asking questions about how to address
them. Do you need
I am working through the following tutorial :
http://www.mangoorange.com/2008/09/17/django-registration-tutorial/
A sample working document is provided, im just not sure how to get it
working!
I am unsure whether I have to provide the HTML myself to create the
forms for the registration, as its
> I didn't see how you return array to template context.
Okay... well, it's actually a string that I finally send to the
template. It's a long story (sorry), but I use the array to build a
string (i.e values from the array get embedded in HTML source). The
place where the string is return to the
On Apr 20, 9:50 am, soniiic wrote:
> you can't just add django funcationality to an already-made HTML
> site. The whole site has to be moved on the django platform.
Sorry for the lack of detail surrounding my problem.
soniiic, thanks for the help.
How should I go about
you can't just add django funcationality to an already-made HTML
site. The whole site has to be moved on the django platform.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Tonne,
I didn't see how you return array to template context.
On Apr 20, 11:44 am, Tonne wrote:
> Thanks
>
> > Can you show code of your tag and template where it used?
>
> Well, sure, but the tag is quite a big one, 150 lines long due to the
> large array and string
I end up using a custom template tag by 'realmac' found here:
http://www.djangosnippets.org/snippets/557/ that calculate the age
from the birthdate and only returns the years.
On Apr 18, 11:06 pm, Bastien wrote:
> Hi,
>
> I'm using the timesince filter in a template
Thanks
> Can you show code of your tag and template where it used?
Well, sure, but the tag is quite a big one, 150 lines long due to the
large array and string concatenation going on. So I've shown here only
what I assume to be the critical bits.
(btw. the tag discussed here was the solution
What i would like to know is,
Is it possible to import django admin search , outside django admin
something like
django.contrib.admin.search may be
thanks
On Mon, Apr 20, 2009 at 1:01 PM, Anatoliy wrote:
>
> Hi, Silva.
>
> You can use
>
Hi, Silva.
You can use http://docs.djangoproject.com/en/dev/ref/models/querysets/#icontains
for simple search:
Entry.objects.get(headline__icontains=search_query)
For more complex search you need separate search engine like Sphinx
(http://www.sphinxsearch.com/).
On Apr 20, 11:22 am,
Hello, Tonne.
Can you show code of your tag and template where it used?
On Apr 20, 10:50 am, Tonne wrote:
> I have a simple_tag that receives a queryset, then updates an array
> based on the queryset result (using a function), and finally it
> returns the array to the
Hi All,
I'm building simple search for website, i would like to know whether is
possible to use
admin search outside the django admin. If yes how can i do that. Any code
examples or
tutorials.
Thank u,
Waruna de Silva.
--~--~-~--~~~---~--~~
You received this
I have a simple_tag that receives a queryset, then updates an array
based on the queryset result (using a function), and finally it
returns the array to the template context.
It works beautifully the first time it is viewed with a browser.
However, on subsequent "pageviews" the array is not
On 17/04/2009 11:26 PM, Christian Berg wrote:
> Sorry if this sounds harsh, but it is useless to learn how to drive a
> Truck, if you can't drive an car.
Slightly tangential, but not true! My Grandfather learned to drive a
truck in the army before learning to drive a car and failed his civilian
On 17/04/2009 12:53 PM, James wrote:
> What I've done is store the keys of a users favorite videos in a dict,
> and I try to determine if I should be allowing them to add or remove
> this video from their favorites like this (truncated):
>
> {% for video in video_list %}
> {% if
72 matches
Mail list logo