a regex?
something like re.match("\[http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
https://docs.djangoproject.com/en/1.5/howto/static-files/
On Tue, Jun 11, 2013 at 8:32 AM, wrote:
> I am build my application using Python 2.7 and Django 1.3.7.All it is
> working perfectly and most of the part are over so we planed to move it to
> live.While checking with DEBUG = False in setti
> Trying to learn the platform and work on the project at the same time.
>
> Thanks, Feyzi
first of all, do the tutorial, don't try to go further until you're
somewhat comfortable with the concepts there. You'll get the feel of
the most basic and powerful django tools are: models, forms, and the
a
The docs say this has changed to get_queryset in dev version, 1.5 uses
get_query_set
isn't this a rather.. radical change? Is backwards compatibility
maintained somehow?
On Sun, Jun 2, 2013 at 12:40 PM, Tomas Neme wrote:
> django.db.models.manager, L118
>
> it seems to be "
django.db.models.manager, L118
it seems to be "get_query_set" not "get_queryset"
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@google
Silly, but aren't you missing
class Patient()
save(self):
self.kind = 'p'
super(Patient, self).save()
or some such thing and something similar for Doctor? I guess it might be in
the forms, but since it's nowhere in the code you showed...
--
You received this message beca
> We haven't used SHA-based or MD5-based hashing for some time.
oh, I was convinced sha2 was being used.
I probably just read the code a while ago and didn't notice it in the changelogs
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
as,
>
> now I got it! Still the original usage of "per" and "every" sounds strange to
> me.. it should be more like "per instance within a URL pattern", but I am not
> a native in English, so nevermind.
>
> Thanks!
>
> On Feb 28, 2013, at 8:54 P
> This approach applies the decorator on a per-instance basis. If you want
> every instance of a view to be decorated, you need to take a different
> approach.
This means that with "this approach" you have to apply the decorator
in every instance you want modified, that is, every time you have thi
and here it presses an even stronger case about NOT using bcrypt but
something even slower
http://www.unlimitednovelty.com/2012/03/dont-use-bcrypt.html
On Wed, Feb 27, 2013 at 12:33 PM, Tomas Neme wrote:
> I just ran into this. It presses a pretty strong case...
>
> http://codahale.c
I just ran into this. It presses a pretty strong case...
http://codahale.com/how-to-safely-store-a-password/
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_
There's a way to do what you want to do, but I don't remember out of
the top of my head. I can check it out on the week, but you'll need to
customize some things on the Producer's ModelAdmin, not just set the
list of inlines, because, as it was said, inlines are for "children"
objects (i.e. other o
just to clarify:
somewhere else, not a subdir of any of your projects/
|
---FOOAPP/
|
---templates/
|
---fooapp/
|
--mytemplate.html
projectA/
|
--settings.py
|
--urls.py
|
--templates/
|
> > Use virtualenvs. That's basic for any serious python development
> > you'll want to do.
>
> Totally agree. Setting up virtualenv's are our long term goal.
really, it should be your SHORT term goal.
As for your problem, you can't expect to install FOOAPP in two
different directories on the sam
Use virtualenvs. That's basic for any serious python development
you'll want to do.
Besides that, you might add DjangoProjectA to sys.path on ProjectA
(and add DjangoProjectB to sys.path on ProjectB) in their respective
manage.py files.
On the other hand, why does pip install -e install it under
> I don`t understand that.. in my form, I don't have the request, or I have?
>
> I know I have request in my view, but I need to pass UserProfile to my form,
> but inlineformset_factory doesn't accept to pass vUserProfile as parameter,
> even I modified __init__ to get this parameter.
OK, so you
ger, more complex, and more
> violent. It takes a touch of genius -- and a lot of courage -- to move in
> the opposite direction."*
> Albert Einstein (March 14th 1879 – April 18th 1955)
>
>
> 2013/1/22 Tomas Neme
>
>>
>>
>> what mengu says is good for templa
what mengu says is good for templates, but not so for views.
But lo! your request should have a .user property that points to the
currently logged user, so try
request.user
in your view
On Tue, Jan 22, 2013 at 4:49 PM, Mengu wrote:
> hi fellipe,
>
> if you enable auth context processors and
each template needs to {% load %} every templatetag library it uses, this
is normal behavior
On Mon, Dec 31, 2012 at 8:31 AM, bikeridercz wrote:
> Dears,
>
> strange thing happens to me, {% load l10n %} is not loaded in my base.html
> template, all other things like css works well.
>
> Thus I'm
I *think* it should work OK, data-wise. Try changing the
login/registration forms so chinese characters pass the verification
process. You can start by trying with a simple CharField with no
verification and see if it works.
On Sun, Dec 9, 2012 at 7:49 AM, Scarl wrote:
> I am a chinese user. I wa
> I'm puzzled with this too. Did anyone manage to find a solution to resolving
> spaces in usernames.
>
> Generally a user, these days logs in with their email - that's predominately
> how I've setup all my django projects. People don't remember usernames. It
Well, I can't really agree, but whatev
> Thanks, yup! I just figured it out too. I didn't realize all the "apps" are
> in the path as well.
the apps aren't NECESSARILY in the path. Django has a concept of app
label, which is the name of the directory where the models module
exists.
For example, django-cms has plugins, which in order t
> However, there is also scope for a focussed tutorial about class-based views
> in general. IMHO one of the biggest uptake problems around class-based
This is what I meant. Something that brings in, easy and clearly, the
concept of mixins, the different mixins,something that, for example,
take tw
Now that function-based views are being deprecated, or at least that
class-based views are being favored, there should be a tutorial with
them in the docs, shouldn't it?
I don't mean replacing the current one, because that'd raise the entry
point a lot, but cloning the original tutorial, but imple
>>> How can i create 2 views on one page?
>>> def sql(request): and def portal(request):
You can't. A View *is* a page. Do the tutorial.
You could use class-based views and have a view that inherits from
both, and combines the contexts (this is _not_ in the tuto)
--
"The whole of Japan is pure i
be ANYTHING
On Wed, Oct 24, 2012 at 3:03 PM, Tomas Neme wrote:
> maybe restate the problem, give some more code, show your models, and
> your admin files, and someone may be able to help a little
>
> --
> "The whole of Japan is pure invention. There is no such country, t
maybe restate the problem, give some more code, show your models, and
your admin files, and someone may be able to help a little
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy
>> Thank you for your answer. i have chapter 1-4 of
>> http://www.djangobook.com/en/2.0/index.html done, but not much time to go
>> throught the hole book atm. i will try it with your code. :)
the django book is somewhat outdated, and long.
https://docs.djangoproject.com/en/dev/intro/tutorial01/
>
> how can i implements now these "def sql(request):" into my html code? pls
> help me...
>
you're saying next to nothing, but I *guess* you could do something like
return render_to_response("sql.html", { 'row': row })
at the bottom of your sql view, and write an sql.html template that
shows it
> I want to create a website facebook like, but real simple and I want to have
> a button that I can give to blogger to add them on their blog entries. It
> have nothing to do with facebook.
Ah! so you want your own "facebook button"!
It'll be mostly a javascript task, rather than django-specifi
You should probably start by reading this:
http://developers.facebook.com/docs/reference/plugins/like/
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") t
> Is there some way to have the form label be a href?
you'll have to change the forms templates to something like
{% for field in form %}
{{
field.label }}
{{ field }}
{% endfor %}
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
you probably are using ugettext and should be using ugettext_lazy
On Sat, Sep 22, 2012 at 8:44 PM, Patrick wrote:
> When I change language on my Django-powered site, everything works fine
> except the translation of the field descriptions in the forms. The
> description is still displayed in the
I haven't done this, so I might be wrong, but...
> queryset.extra(
> where=['unaccent("table_name"."column_name"::text) LIKE
> unaccent(%s)'],
> params=['%%%s%%' % value]
> )
first, wouldn't just setting params=[value] work? furthermore, isn't
that the whole point of the p
The admin templates and views themselves are convoluted enough (the
price of having them work with anything), and full of enough magic
that it's not really feasible to build on top of them to add the
required capabilities. Maybe adding new admin views would be a
posibility, but what happens when yo
Since this came up, are there any more-or-less packaged alternatives
to django-admin? More than twice I've had to give up in something as
simple as rendering two-level FK indirections, lest I wanted to
override most of the ModelAdmin classes.
The thing is that I don't trust myself to be throughout
> Anyway, to the question. Once the models, the intermediate models and
> the interactions between all of them start getting sufficiently
> complex, you will need to put new forms on front. Theoretically, you
I've a question about this. I tried to do something like this, but
using the main capabil
I'd like to see some of your management commands' code.
It smells somewhat like you're running a shell subprocess and not
waiting for it to be done before going on to the next thing
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|
> http://www.django-userena.org/
++
I've successfully combined it with django-social-auth to have
facebook/twitter/google/openId login
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny
> But I am confused.
> For example,
> the following code needs to add single quote.
>
> {% block content %}
> Add Todo items
https://docs.djangoproject.com/en/dev/releases/1.3/#changes-to-url-and-ssi
also, that won't work with double quotes either, unless you import
future, and a bunch of other t
either remove the quotes from {% url 'blog.views.add_comment' %} (so it's
{% url blog.views.add_comment %}) or {% load url from future %}
Loading from future is the better option, I think.
and for future reference:
Reverse for ''blog.views.add_comment'' with arguments '(1L,)' and
keyword argume
> For example for this link
>
> {% trans "contacts" %}
>
> I have the msgstr="Contactos". I expect to see "Contactos" in the browser,
> but I still see "contacts". Any suggestion?
1) case-sensitive. Are you sure you haven't translated "Contacts"
instead of "contacts"?
2) fuzzy-mark. I've noticed t
DropDownMultiple widget
http://djangosnippets.org/snippets/747/
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") to help him gain world domination.
--
>>> Well, if you push without pulling, this might happen,
>>
>> *Implicit git usage* :D
>
> Implicit VCS usage, whichever you choose.
>
> If you don't, you shouldn't be doing team work
ah, I see now. CVS wouldn't complain in that scenario...
neither would git/hg when you pull, for that case.. yes
>> Well, if you push without pulling, this might happen,
>
> *Implicit git usage* :D
Implicit VCS usage, whichever you choose.
If you don't, you shouldn't be doing team work
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_
Well, if you push without pulling, this might happen, if you always
pull before pushing, then you'd have to manually merge both migrations
(which would probably mean letting the other migration as 001, and
changing yours so it adds your wanted changes on top of THAT
And as an answer: using south i
> On Tue, Aug 14, 2012 at 8:49 PM, Russell Keith-Magee
> wrote:
I'm just glad I didn't come back with a half-assed response
--
"The whole of Japan is pure invention. There is no such country, there are
no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy an
well, for starters, you won't magically get "on keyup" behavior by
adding something on your backend, you'll need to use ajax for this,
and, depending on your expected number of elements, it might be better
to send everything and do any filtering on the client side (if you're
handling, say, up to a
Well, it depends on what you want to do exactly, you could create something
like this:
class UserProfile(models.Model):
common_data
class ClientProfile(UserProfile):
specific_data
class StudentProfile(UserProfile):
specific_data
class TeacherProfile(UserProfile):
spe
I don't mean to say you shouldn't need to ask questions, I just say
that using or not "proxy" is not a "let's see what happens" choice,
and having the docs read and halfway understood will help you ask *the
right* questions
--
"The whole of Japan is pure invention. There is no such country, there
> There is a class (let's call it Foo) which is a subclass of User.
> Foo has the following line in its Meta:
> proxy = True
if you don't provide full minimal data, it's hard for us to help. If I
had known you were using a proxy model, I'd have proposed something
different.
In general, unless you
But if you subclass the widget, then you'll need to override every
form's widget with
{
forms.DateField: MyDateWidget
}
so overriding and using your own MyDateField would be less verbose and
repetitive
On Sat, Aug 4, 2012 at 6:17 PM, Melvyn Sopacua wrote:
> On 3-8-2012 18:23, Lee Hinde wrote:
Anyone knows of any trick that will let me show a second-level
indirection inline
via a one2one, so ModelA <-FK- ModelB <-one2one- ModelC, and show A,
B-C-B-C-B-C kind of thing?
Maybe I can override the get_formsets in the admin?
--
"The whole of Japan is pure invention. There is no such countr
as Kurtis says, drop the explicit Primary Keys, and drop the hungarian
notation as well (don't declare the variable type on it's name): I
don't need to be reminded that the name of a project will be a string,
it's pretty obvious. Also, python standards talk against using
underscore in class names,
OK, I got it working, I'm not sure what the problem was, but calling the
loop variable 'file' was overriding the python default file object class
now I'm doing this:
response = HttpResponse(File(file(tmp[1])),
mimetype="application/zip")
response['Content-disposition'] = ('attachm
Down here's the code in which I'm creating a zip file with a bunch of pdf
labels, and returning it on the HttpResponse for the user to DL it.
The weird thing is that I'm getting just a pdf file (ok, I'm testing with a
single file, so I don't know if that's the problem) and I can't set the
download
Just to be clear, sandeep, jQuery is not java, javascript is not java.
Get yourself clear on that, because it can become a big confusion.
Besides that, yes, without javascript, the only way you've got to do
that, is having the user submit a form where he selects the options,
and then return anothe
uhm, if you register a listener to the pre_save signal, then you can do
this:
if instance.published:
# the instance about to be saved has the published flag on
dbojb = MyModel.objects.get(id=instance.id)
# did it have it on the database?
if not dbobj.published:
do_stuff()
you probab
maybe this will help?
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup
On Mon, Jul 30, 2012 at 5:06 AM, Alex Strickland wrote:
> On 2012/07/25 12:41 PM, Daniel Roseman wrote:
>
>> You could probably subclass the CheckboxSelectMultiple widget and
>> override the `render` metho
>
> class EditableNode(template.Node):
> def __init__(self, location_name):
> self.location_name = location_name.encode('utf-8').strip("'")
> def render(self, context):
> obj = Placeholder.objects.filter(location=self.location_name)
> if request.user.is_authenticated():
> for x in obj:
> return
I'm very sorry. I got completely out of line.
It's just something that irritates me a lot, and I'm not a native
english speaker, and it may be I don't know the actual "value" of the
word, I felt it was more funny than insulting. And I hadn't read your
first reply.
It won't happen again.
--
"The
While the things on the djangobook are probably still compatible,
they're far of being best practices nowadays, and will lead you down
old and abandoned roads, more times than not.
As it's been said, I'd rather stay by the official docs, they're very
clear and pretty helpful, not purely technical
> class Form(forms.Form):
>
> check = forms.BooleanField(
> required=False,
> )
> # take into account only when 'check' is True
> len = forms.IntegerField(
> min_value=3,
> max_value=5,
> required=True,
> )
>
>
> What I want is to validate the 'le
The ArtworkForm AND the full view code would be helpful, yes
also, maybe you'll want to install django-extensions, werkzeug, and
run your devserver with runserver_plus, that'll give you full
debugging capabilities on your browser, and will be able to see what's
each object (that instace object, sp
> as shown in the picture, this i could do by add a method in the model
> getTienda1 and return the stock and do it for each store, but i want it to
> be created dinamically because the user could create a new store and it
will
> not be there.
>
> so this is my cuestion: can i do that?
Interesting
> The current URL, mediahelp/comphelp/mediaHelpPopup.html, didn't match any of
> these.
>
> The code from the comphelp url view is very basic and looks like this:
> def component_help(request):
> view = "component_help"
> dctnry = {}
> reqGET = request.GET.copy()
> if reqGET.has_key
your error's got nothing to do with AJAX. As the very helpful error
message you're getting, there's no URL that matches your requested
path:
> Request URL:
>
> http://127.0.0.1:8000/mediahelp/mediaHelpPopup.html
>
> Using the URLconf defined in streamingmedia.urls, Django tried these URL
> patter
{% for field in form %}
{{ field.label
}}{{ field }}
{% endfor %}
although I think the custom form class is not such a bad solution
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny.
why do you have your own User model? Are you sure you're logging in
the right user and loading the right user instance?
On Fri, Jul 20, 2012 at 12:37 PM, Sithembewena Lloyd Dube
wrote:
> Hi everyone,
>
> I have a user model in which i have a newsletter boolean field. When the
> user subscribes to
You can still do self.something = foobar even if "something" is not a
database Field.
What I mean is, doing self.vdr_code = get_vdr_code() will save it for
THIS INSTANCE and then you can use it in your template.
If you really need this to be only at .save() (instead of, say, at
__init__, because
> Thanks, the first example is exactly that i want. I try it in the Django
> Shell and it works, but; How I show the results in the template?
>
> Maybe I'm wrong, but I try to pass like { 'empresas':
> Empresa.objects.all().select_related() } ,and only can show the 'Empresa'
> attributes on the lo
> In my models.py I override the save method like this:
>
> def save(self, *args, **kwargs):
> self.directiondb = get_direction_db(self.nod_id1.id,
> self.nod_id2.id)
> get_direction_descr(self.nod_id1.id, self.nod_id2.id)
> get_vrd_code(self.nod_id1.id, self.nod_id2.id)
>
> {Empresa1, Sucursal1, Platillo1, Horario1},
> {Empresa1, Sucursal1, Platillo2, Horario1},
> {Empresa2, Sucursal1, Platillo1, Horario1}...
I'm guessing the Sucursal1 in the first and third lines are not the same? I
mean, each Sucursal points to only one Empresa, so I'm guessing you want
only the
> You could override your ModelForm's save() method to save some data to that
> field. And then modify the same ModelForm to exclude that field. For example,
or maybe, just maybe, he might show us his model, form, and rendered
html so we can actually help him identify and possibly fix his
problem
user = request.user
initial = {}
if user.is_authenticated:
initial.update({ 'name': user.name, 'email_address': user.email_address
})
form = MyContactForm(initial=initial)
On Wed, Jul 18, 2012 at 11:23 AM, Sithembewena Lloyd Dube
wrote:
> Hi everyone,
>
> I have a contact form in my app and w
> Do these just get stuck onto the end of my class Poll(models.Model):? like
> this...
Yes, that's right
perhaps you should start here:
http://docs.python.org/tutorial/classes.html
you should probably at least be comfortable enough with python to know
how to define classes before diving into dj
On Mon, Jul 16, 2012 at 2:56 PM, Dott. Tegagni Alessandro
wrote:
>
> write the urls.py code and var. static in settings.py, please.
do as he says.
Also you could try asking the grapelli user group, if there is one,
this seems to be specific
--
"The whole of Japan is pure invention. There is no
> thanks for sharing, I'll try to understand it.
>
> where should I put this file? inside localsite?
>
> what admin template are you talking about? the admin tools or the plain
> admin?
dashboard's (it's part of admin_tools) admin/index template.
> I thought of using the admin tools templates and
> I thought they extended the templates instead of trying to replace
> everything
they don't replace everything. But the admin site's index template is
called 'admin/index.html', so it's not easy to extend them. They DO
extend admin/base.html.
This is my dashboard.py file, where I create a modul
It's the second time this issue appears in the list in two weeks, maybe
it's time to recheck the tutorial?
There's no "polls" in your results' url, doesn't the tutorial say you
should have two urls file? one in project/urls.py and another one in
polls/urls.py ?
the polls-specific urls shouldn't s
Yes, you'll need to get your hands dirty, and merge the two admin
templates, since both apps redefine templates/admin/index.html and
some other templates.
The best approach, I think, is just use django-admin-tools' templates
and create custom dashboard/modules to duplicate satchmo's templates'
beh
On Sat, Jul 14, 2012 at 2:11 PM, ledzgio wrote:
> If I use the TemplateViews method, should I have to set anything on the
> views.py? and how can I point that file from template?
the TemplateView is a view, it's already been written for you, so you
can use it without adding anything new. If you w
an "html page" can't be located within the templates directory, an
HTML file might, but what is it you want to do, exactly? you want to
render a static file? does it make sense going through django for
this?
URLs point to views, not templates, the views are which decide what
templates to use (the
Well, first of all, you're gonna have to set up quite a big amount of
parallel connections for this to work,
> A new user could be uploading media/music files or something at the same
> time as uploading a video of themselves. I want it to be efficient and fast
> to the point where it all gets upd
"django-admin.py makemessages -l de"
"django-admin.py makemessages -l es"
On Thu, Jul 12, 2012 at 2:59 PM, Phil wrote:
> Hi,
>
> (django version 1.3.1, Python2.7)
>
> (at the end of my settings file)
>
> # translation support
> ugettext = lambda s: s
>
> LANGUAGES = (
>
Have you done the django tutorial, first? it covers named urls
On Thu, Jul 12, 2012 at 11:06 AM, luthur wrote:
> why not post your example? It's too abstract.
>
> --
> luthur
>
> On Thursday, July 12, 2012 at 9:56 PM, jun wrote:
>
>
>
> On Thursday, July 12, 2012 7:40:46 PM UTC+8, lawgon wrote:
>
also this:
http://docs.python.org/tutorial/classes.html
On Wed, Jul 11, 2012 at 12:58 PM, Nikolas Stevenson-Molnar
wrote:
> Change nbi_patch to self.nbi_patch, and you should be set. I.e:
>
>
> class PatchForm1(forms.Form):
> def __init__(self, *args, **kwargs):
> self.nbi_patch = kwa
There's a way, but you'll need to touch the form on the python side
quite a lot, changing the default widgets adding them the css classes
you want.
You can take a look at https://github.com/earle/django-bootstrap and
https://github.com/dyve/django-bootstrap-toolkit/ they provide some
shortcuts for
http://djangosnippets.org/snippets/1376/
this is what you want, I'm using it and it works like a charm
you override in templates/path/to/template.html and do
{% extends "app:path/to/template.html" %}, and this loader searches in
`app`'s template dir by default
On Mon, Jul 9, 2012 at 3:06 AM, tW
> Ah. I think the method is overriding the edit page. In other words, you have
> click on the editpage to see the effect of my fail code. So it doesn't
> trigger if you are on the list view page. Does anyone know what to do with
> the editable submission?
> It should use the same clean_ method, sho
Oh, and setting up a queryset in a DetailView means that it won't work
for instances that are not inside the queryset, if we did
url(r'/books/shakespeare/(P\d+)/$',
queryset=Book.objects.filter(author='shakespeare')), then
/books/shakespeare/1/ would work if the book with pk=1 was Romeo and
Juliet
> A queryset returns a /list/ of model instances. Thus you should queryset
> when you want more then one instance of the model displayed.
well, slightly wrong, let's clarify. While it's true a queryset
represents a list of model instances (it's not EXACTLY that, it's,
more like, a partially set up
Django isn't able to guess you want your polls urls under a /poll/ path.
To achieve this, you do url inclusion
you define something like polls/urls.py like you did and then do
url(r'^polls/', include('polls.urls'))
then your defined urls will work when prepended with a polls/ path.
You can chan
Man...
> (r'^sets/(?P\d+)/$', SetDetailView.as_view(
> model=Set,
> context_object_name="set_details",
> template_name='data/set_details.html',
> )),
>
> But the site is empty. Here's my extremely simple template:
>
> {% block title %}{{ set.text_name }}{% endblock %}
>
> {% block
> No, I'm not. I didn't think I need to...
the only things that are automatically included are your settings
file, your site urls file, and your apps' models file, everything else
depends on you (or them) to include them. For example, if you don't
call admin.autodiscover() sometime soon (your site
Are you importing your listeners.py from anywhere?
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") to help him gain world domination.
--
You received t
> Turns out that's the problem. I wanted to use a field from my Car model:
> car_id, so the link on the website would look like:
> www.blablabla.com/cars/3421, where 3421 is the car_id. Unfortunately, the
> car_id is not the same as . Can I achieve something like that with class
what's car_id and
> and I do
> for fruit in Fruits.objects.all(): fruit.rott()
>
> will anything happen at all? I know in C++ this would work... ;-)
>
> on database-level I know how to do it, I just don't know if the django
> abstraction handles this automalically.
I.. don't know. I'd think yes, at least I wonder o
> The big difference is, -as I see it- I will not get real polymorphism,
> as the base class would need to do the join on all it's child classes.
> Is that true?
with abstract models you won't get polymorphism at all, in the
database level (this is, you WON'T be able to do Fruit.objects).
You'
Just return an empty response, with a 200 OK code:
return HttpResponse("")
I'm not sure whether you can omit the ""
On Fri, Jul 6, 2012 at 5:44 PM, Larry Martell wrote:
> I have a situation where I'm sending an ajax request to a function
> that updates a row in database. I then want to return c
1 - 100 of 127 matches
Mail list logo