Everything looking like {% %} or {{ }} are template tag. Your js file
are not processed by the templating engine so they can be served
really fast directly by your web server and not by django which is a
lot slower.
One solution would be to but the url in your html file. Add a
*Context*
I am adding a static javascript file to my **ModelForm** on this way
forms.py
class SomeForm(forms.ModelForm):
class Media:
js = ('some-javascript.js',)
*Problem*
On this javascript I need send a GET request to a rest endpoint hosted on
same application
## Context
I am adding a static javascript file to my **ModelForm** on this way
forms.py
class SomeForm(forms.ModelForm):
class Media:
js = ('some-javascript.js',)
## Problem
On this javascript I need send a GET request to a rest endpoint hosted on
same
I'm writing a web app that uses the pinax-project-account and bootstrap.
When a user logs in the login view should grab the
ACCOUNT_LOGIN_REDIRECT_URL and redirect the user to it. There seems to be
an issue with dynamic urls though because when I do this with a static
/profile/ url, there
You are exactly right. Thanks, this was a learning curve I was having
trouble getting over. You have been an immense help and are a credit
to this online community.
On Feb 1, 3:42 am, Daniel Roseman wrote:
> On Feb 1, 4:30 am, Nick wrote:
>
> > I'm
On Feb 1, 4:30 am, Nick wrote:
> I'm definitely going to continue looking into this. But if you have
> any advice on how I can store the rest of the fields from the DB to
> call up on the individual reps pages I would greatly appreciate it.
> Right now I am only pulling in the
I'm definitely going to continue looking into this. But if you have
any advice on how I can store the rest of the fields from the DB to
call up on the individual reps pages I would greatly appreciate it.
Right now I am only pulling in the last name and first name and need
to return all of the
Just checked again and I'm getting the output I was looking for.
Thanks for the help. I guess the server was just taking a little time
to pick up changes to the URL confs.
On Jan 31, 5:58 pm, Nick wrote:
> Daniel,
>
> Thanks for the quick reply. I have made the adjustments
Daniel,
Thanks for the quick reply. I have made the adjustments to the URLS
and the views and am getting a 404 error
Not Found
The requested URL /Government/reps/Prater_David was not found on this
server. (using the entry for David Prater)
I'm not really sure why it isn't picking up the URL.
On Jan 31, 7:29 pm, Nick wrote:
> Thanks in advance for anyone answering this thread.
>
> I am building a DB of local government representatives. My goal is to
> spit out a general list of the reps and a detailed bio page for each
> rep.
>
> The URL structure I would like to
Thanks in advance for anyone answering this thread.
I am building a DB of local government representatives. My goal is to
spit out a general list of the reps and a detailed bio page for each
rep.
The URL structure I would like to have is 'government/reps/list' for a
list of all of the Reps and
On 5/12/2009 1:10 PM, Thierry wrote:
> I have a table with the following names:
>
> id name
> 1 Foo
> 2 Foo goo
> 3 Foo's goo
>
> I want to use the name to construct my url. I don't have a problem
> constructing Foo:
>
> localhost/foo
>
> But how am I supposed to
On Tue, May 12, 2009 at 3:10 PM, Thierry wrote:
>
> I have a table with the following names:
>
> id name
> 1 Foo
> 2 Foo goo
> 3 Foo's goo
>
> I want to use the name to construct my url. I don't have a problem
> constructing Foo:
>
> localhost/foo
>
I have a table with the following names:
id name
1 Foo
2 Foo goo
3 Foo's goo
I want to use the name to construct my url. I don't have a problem
constructing Foo:
localhost/foo
But how am I supposed to handle "Foo goo" and "Foo's goo"? Will I
need to create a 3rd
On Thu, Mar 26, 2009 at 12:33 PM, Alessandro wrote:
> On Thu, Mar 26, 2009 at 4:44 PM, Alessandro
> wrote:
>
>>
>> Is it possible to get a list of function names inside a module?
>
>
> I need to know the names of the functions in a
On Thu, Mar 26, 2009 at 4:44 PM, Alessandro wrote:
>
> Is it possible to get a list of function names inside a module?
I need to know the names of the functions in a module. is it possible ?
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net
Alessandro Ronchi wrote:
> I want to make a regxep in my urls.py that takes the name of the view from
> the url.
> Something like:
>
>
> (r'^views/(?P\w+)/', 'myproject.database.reports.' + name),
>
> is it possible? I've a lot of views with the same rule and I want to make
> them be available
On Thu, Mar 26, 2009 at 4:21 PM, Thomas Guettler wrote:
> # views.py (untested)
> def wrapper(request, name):
>module=__import__("myproject.database.reports.%s" % name, globals(),
> locals(), [name])
>method=getattr(module, name)
>return method(request)
>
this
Alessandro Ronchi schrieb:
> I want to make a regxep in my urls.py that takes the name of the view from
> the url.
> Something like:
>
>
> (r'^views/(?P\w+)/', 'myproject.database.reports.' + name),
>
> is it possible? I've a lot of views with the same rule and I want to make
> them be
I want to make a regxep in my urls.py that takes the name of the view from
the url.
Something like:
(r'^views/(?P\w+)/', 'myproject.database.reports.' + name),
is it possible? I've a lot of views with the same rule and I want to make
them be available without duplicate names 3 or 4 times.
On Oct 11, 7:07 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> You can redirect to something like /logged_in, this view has access to
> request.user so can redirect you to /users/username/
Thank you for the tips. It worked :-)
--~--~-~--~~~---~--~~
You received
;
> How can I do it? I tried using the default login view it seems I have
> to use the LOGIN_REDIRECT_URL variable in the settings.py, but I don't
> know how to specify a dynamic url.
>
> Should I write my own custom login view or is there a way to
> accomplish this even with the default
in the settings.py, but I don't
know how to specify a dynamic url.
Should I write my own custom login view or is there a way to
accomplish this even with the default one?
What am I missing here?
Thank you very much
--~--~-~--~~~---~--~~
You received this message
Also, convention seems to be to spell out the field names. Because of
a different namespaces, you shouldn't have to worry about too much
name clashing. And if you don't provide an ID for your model, one is
automatically created for you. For example:
class Category(models.Model):
name
Your problem is here:
def category_entry(request, category):
entries_in_cat = Entry.objects.filter(entry_cat=category)
return render_to_response('blog/index.html', locals())
Remember, the value of "category" is a string. One way or another you
need adjust the filter. Something
I'm trying to create a situation where you can bring up all the blog
entries in a category through the URL. I've got this in my urls.py:
from django.conf.urls.defaults import *
from akonline.views import current_datetime
urlpatterns = patterns('',
(r'^test/$', 'address.blog.views.blog'),
lukeqsee wrote:
> Thanks, it worked.
>
> On Jul 10, 1:48 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote:
>> Luke, this should work. Here's an example I use:
>>
>> *urls.py:*
>> url('^user/(?P\w+)/$', user.view)
Not sure what you meant by "alpha chars" but \w+ matches more than just
[A-Za-z]+
t_object_or_404(User, username = user_id)
>
> Hope that helps,
>
> -- Scott
>
>
>
> On Thu, Jul 10, 2008 at 1:42 PM, lukeqsee <[EMAIL PROTECTED]> wrote:
>
> > Sorry I didn't my last post clear
> > what I want is mysite.com/people/ {dynamic url ie. name)/
wrote:
>
> Sorry I didn't my last post clear
> what I want is mysite.com/people/ {dynamic url ie. name)/
>
> On Jul 10, 1:34 pm, lukeqsee <[EMAIL PROTECTED]> wrote:
> > Can you use alpha characters in the urls? like mysite.com/people/
> > [name]/
> >
Sorry I didn't my last post clear
what I want is mysite.com/people/ {dynamic url ie. name)/
On Jul 10, 1:34 pm, lukeqsee <[EMAIL PROTECTED]> wrote:
> Can you use alpha characters in the urls? like mysite.com/people/
> [name]/
>
> Is this possible? Haven't found anything in
Can you use alpha characters in the urls? like mysite.com/people/
[name]/
Is this possible? Haven't found anything in the documentation relating
to it.
Thanks,
Luke
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi everyone,
I have the following situation, and I would value advice.
I have two classes, FolderUpload and FileUpload as given below. I want
a dynamic upload_to url in FileUpload, such that the upload to field
depends on the value of the folder field, specifically path field. I
realist that
32 matches
Mail list logo