Hi all
I am trying to build a login page using Django auth app, it is all working
nice but there is one problem: If I browse to accounts/login (the login
url) when I am already logged in, in normal situation the login view
shouldn't be rendered and the correct action will be to redirect to the
with_submitted_values):
> calculate cookie_session_id(remarkable data_headers, database
> information,...)
> set cookie_session_id
> *add according entry in the foreignkey field, adding it as well
> in the sessionid table*
> return the_use
rn view(request,*args,**kwargs)
return new_view
On Wednesday, November 21, 2012 2:51:49 PM UTC+2, Daniel Roseman wrote:
>
> On Wednesday, 21 November 2012 12:04:45 UTC, Loai Ghoraba wrote:
>
>> Well, thanks very much for your effort-y reply. I have read it and it is
>>
Hi all
When I have a script like this:
window.onload=function f(){} it is working fine. but
when I create an external js file and put it within the static directory,
and call the function like this
window.onload=f
It is not working at all. (by the way the url is mapped correctly to the js
Hi
I have a little question: First, I am hosting my PDF files within /
static directory, (as my understanding is that they are static files),
so is this the correct way to host PDF files and downloadable files
generally ?
Second: Only authenticated users may view the links for those PDF
files, bu
Thanks for the reply, but I am still new to the web technology world, so I
would like to fully use Django now before , moving to another ways to host
my files.
Actually I am totally new to serving stuff, so if there is some best
practice or that my way is totally wrong, please tell me.
So in sh
Hi
I am serving some files, and I want whenever I have a url
:/download/path/to/some/file to map this to a view function with
path/to/some/file sent as a parameter of the function, so how could I
accomplish that ?
I want a url of the following schema :
url(r'downloads/(?P\[Anything includi
I just go it, it is
url(r'^download/(?P.*)$', 'faculty.views.Main.download_file'),
Thanks :)
On Wed, Nov 28, 2012 at 10:10 PM, Loai Ghoraba wrote:
> Hi
>
> I am serving some files, and I want whenever I have a url
> :/download/path/to/some/file to map this t
thanks for the important advise :)
On Wed, Nov 28, 2012 at 10:28 PM, Tim Chase
wrote:
> On 11/28/12 14:19, Loai Ghoraba wrote:
> > I just go it, it is
> >
> > url(r'^download/(?P.*)$', 'faculty.views.Main.download_file'),
>
> Just be careful to no
eal web servers ?
And another question: Does this applies also to light static files like css
and javascript ?
Thanks a lot
On Thu, Nov 29, 2012 at 1:15 PM, Tom Evans wrote:
> On Wed, Nov 28, 2012 at 6:27 PM, Loai Ghoraba wrote:
> > Thanks for the reply, but I am still new to the web
I read it and it seems nice, I will further read about the topic
Thanks a lot for the help :)
On Thu, Nov 29, 2012 at 1:44 PM, Tom Evans wrote:
> On Thu, Nov 29, 2012 at 11:30 AM, Loai Ghoraba wrote:
> > I am still new to sreving stuff (in fact I know barely anything about it
>
Hi
I have installed apache and mod_wsgi and my basic site *skeleton is
running* on local host, but with NO static files loaded such as css, when I
try to access a static file (e.g:http://localhost/static/css/base.css) it
says that I don't have permission to access the file, same goes to media
Make sure all the directories, from static leading all the way up to the
> root, are chmod a+x
>
>
> On Friday, November 30, 2012 4:00:55 PM UTC-8, Loai Ghoraba wrote:
>>
>> Hi
>>
>> I have installed apache and mod_wsgi and my basic site *skeleton is
>> runni
thanks, but still I can't find what's wrong with the permission thing. The
html pages are loaded without static content, no css or js or whatever,
neither the media is accessible.
On Sat, Dec 1, 2012 at 7:15 AM, Mike Dewhirst wrote:
> On 1/12/2012 3:57pm, Loai Ghoraba wrote:
>
a strange thing is that when I remove the directive so it
becomes:
Order deny,allow
Allow from all
instead of
Order deny,allow
Allow from all
then trying to access any static or media file raises (not found) instead
of permission denied !
On Sat, Dec 1, 2012 at 7:42 AM, Loai Ghoraba
okay it works now, I was just missing a trailing slash at
Alias /static/ /home/loai/workspace/Faculty/Faculty/static/
On Sat, Dec 1, 2012 at 8:17 AM, Loai Ghoraba wrote:
> a strange thing is that when I remove the directive so it
> becomes:
>
>
> Order deny,allow
&
> On Friday, November 30, 2012 8:53:42 PM UTC-8, Mike Dewhirst wrote:
>>>
>>> On 1/12/2012 3:48pm, Loai Ghoraba wrote:
>>> > I have ran chmod o+rx on the root directory, isn't this enough (isn't
>>> > chmod applied to all folders down recursivel
Hi
I am using apache2 server with xsend file to protect against static files,
the python view is:
@staff_member_required
def media_xsendfile(request, path, document_root):
print "is staff",request.user.is_staff
response = HttpResponse()
response['Content-Disposition'] = 'attachment'
and another issue: using apache, even when the user is logged in and
is_staff, he is redirected to the login page, and he needs to login to
download the file, and this continues on.
On Sat, Dec 1, 2012 at 7:30 PM, Loai Ghoraba wrote:
> Hi
>
> I am using apache2 server with xsend file t
Thanks a million for the tip :)
On Sun, Dec 2, 2012 at 5:08 AM, Chris Cogdon wrote:
>
>
> On Saturday, December 1, 2012 3:47:39 AM UTC-8, Loai Ghoraba wrote:
>>
>> no I mean the root of my project guys :) thanks a lot :D which lives in
>> path/to/my/project :)
&
Hi
I have this in my urls.py
url(r'^accounts/login/$', login,name="accounts-login")
and in a template base.html
login
And when I try to open the site, this error is raised: Template syntax
error: Could not parse the remainder: '-login' from 'accounts-login'
But when I change the name of
not working, giving: Reverse for '' with arguments '()' and keyword
arguments '{}' not found.
also I want to know about this dash (sorry for using the term score in the
previous post ) thing
On Mon, Dec 3, 2012 at 2:34 PM, Nikhil Verma wrote:
> {% url auth_login %}
--
You received this message
okay I found it:
it should be login
with quotes. Thanks.
On Mon, Dec 3, 2012 at 2:50 PM, Loai Ghoraba wrote:
> not working, giving: Reverse for '' with arguments '()' and keyword
> arguments '{}' not found.
>
> also I want to know about this d
Hi all
I am trying to write a simple ajax that tries to know whether the username
already exist before registering.
Whenever I try to access the request.GET in my view function, a HTTP 500
error is raised, if the view function doesn't access it and only use hard
coded values-for test- it works.
the problem is solved now, seems rebooting sometimes works :) !
On Tue, Dec 11, 2012 at 2:04 AM, Loai Ghoraba wrote:
> Hi all
>
> I am trying to write a simple ajax that tries to know whether the username
> already exist before registering.
> Whenever I try to access the request
Hi
I am very comfortable with Django, and I was wondering about whether there
is some way to convert a Django web app into a Desktop app (may be not
100%), so that I can distribute it to users. May be wrapping it in a light
web server "if there is something like this".
Thanks
--
You recei
issue, though. There are a ton of choices
> there (eg: gunicorn, twisted, tornado, web.py) but I have no opinion on
> which one is going to both "freeze" well, serve static files well, and work
> well with Django
>
>
>
> On Tuesday, December 18, 2012 8:06:19 AM UTC-8,
@all thanks a lot, I will try your suggestions, may be mixing them :)
On Tue, Dec 18, 2012 at 11:39 PM, Chris Cogdon wrote:
> Personally, I'd prefer something that didn't require packaging up
> additional programs (xampp and python, in this example).
>
> It should be _perfectly possible_ to find
nternet Explorer browser
> and
> Mongoose web server:
> https://code.google.com/p/phpdesktop/wiki/EmbeddingOtherScriptingLanguages
>
> I am the author of both projects.
>
> Cheers,
> Czarek.
>
>
> On Tuesday, December 18, 2012 8:06:19 AM UTC-8, Loai Ghoraba wrote:
>
29 matches
Mail list logo