Re: static files are not working

2013-09-13 Thread Kelvin Wong
Are you saying that your settings are like this? STATIC_ROOT = '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static' STATIC_URL='/static/' # < Trailing slash required! check it If so that is asking for trouble when you do a collectstatic. You'll prob get permission error

static files are not working

2013-09-13 Thread Harjot Mann
I have placed my static folder called time in /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static and give this path in settings.py file in STATIC_ROOT and STATIC_URL='/static' and used in my template file as but no css working. Please help me, thanks in advance -- Harjot Kaur

Re: Testing Permissions in URL Includes

2013-09-13 Thread Lee Hinde
On Sep 13, 2013, at 12:47 PM, Arnold Krille wrote: > On Fri, 13 Sep 2013 11:30:44 -0700 Lee Hinde wrote: >> So, the question, is there a way to wrap url include calls in a >> permission check? > > Wrapping a whole url-include would only work when the

Re: Testing Permissions in URL Includes

2013-09-13 Thread Arnold Krille
On Fri, 13 Sep 2013 11:30:44 -0700 Lee Hinde wrote: > So, the question, is there a way to wrap url include calls in a > permission check? Wrapping a whole url-include would only work when the url-tree is rebuild for each request taking into account the requesting user. Todays

Testing Permissions in URL Includes

2013-09-13 Thread Lee Hinde
Using Django 1.5.x I have in my project urls.py entries like this: url(r'^staff/people/', include('people.urls')), url(r'^staff/admin/facility', include('facility.urls')), url(r'^staff/admin', include('district.urls')), url(r'^staff/section', include('classes.urls')),

Re: error

2013-09-13 Thread C. Kirby
Both of your return statements are in the context of if request.method == "POST" If you get a method that is not a "POST" (most likely it received a "GET") then the view doesn't return anything. If you require a post I would add: else: return HttpResponse(status = 405) 405 is request not

error

2013-09-13 Thread Harjot Mann
I am making an app to add time schedule and while making view. I ma getting this error The view time_schedule.views.category_choice didn't return an HttpResponse object. Here is the code: http://tny.cz/46777400 Please help me fast -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/

Re: error

2013-09-13 Thread Harjot Mann
On Fri, Sep 13, 2013 at 8:11 PM, Thomas Orozco wrote: > If the request is a GET (and not a POST), you never return and HTTPResponse > (or anything, for that matter, so you're returning None) > > not getting..please help me :( -- Harjot Kaur Mann Blog:

Re: Where to put code that adds additional data to the model object?

2013-09-13 Thread Thomas Orozco
You can define it in the Model. Models are still "regular" Python objects that you can add methods to. Be wary of performance though, if you don't cache the results or something. On Fri, Sep 13, 2013 at 4:33 PM, Ladislav P wrote: > Hi, > > I have started working with

Re: error

2013-09-13 Thread Thomas Orozco
If the request is a GET (and not a POST), you never return and HTTPResponse (or anything, for that matter, so you're returning None) On Fri, Sep 13, 2013 at 4:39 PM, Harjot Mann wrote: > I am making an app to add time schedule and while making view. I ma > getting this

Where to put code that adds additional data to the model object?

2013-09-13 Thread Ladislav P
Hi, I have started working with django just couple of days ago and I am already quite familiar with it, but I still do not understand clearly the models. I have some model class, but after retrieving it with .objects.all I want to add some other data to these objects got from XMLRPC services.

Re: I cannot enable logging in server console

2013-09-13 Thread Ladislav P
It was not. I was completely missing django.db.backends directive in LOGGING. On Thursday, September 12, 2013 1:18:38 PM UTC+1, Germán Larraín wrote: > > Perhaps it's a pycharm issue... -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django: How to combine 3-party apps!

2013-09-13 Thread alekto . antarctica
> > Thank you for answering. It is not Zinnia I am asking for, but the > DjangoBB forum > -- 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

Re: url path becomes longer and longer

2013-09-13 Thread Daniel Roseman
On Friday, 13 September 2013 12:16:51 UTC+1, Christian Schulz wrote: > Hi, > > i'm wondering why after every click the url become longer. > > > In the project urls.py I have something like: > url(r'^reporting/', include('reporting.urls')), > > In the app urls.py something like: > url(r'total',

Re: form issue.

2013-09-13 Thread Nigel Legg
OK, thanks Daniel, putting blank = True and null = True has let me get through that. I used a standard model so I can change the field labels on the form need to do some more reading I think. Cheers, Nigel 07914 740972 On 13 September 2013 12:05, Nigel Legg wrote:

url path becomes longer and longer

2013-09-13 Thread Christian Schulz
Hi, i'm wondering why after every click the url become longer. In the project urls.py I have something like: url(r'^reporting/', include('reporting.urls')), In the app urls.py something like: url(r'total', views.total,name='total'), In the app reporting views I use render: return

Re: form issue.

2013-09-13 Thread Nigel Legg
So is blank = True and null = True in the model? What I have done is working fine in another form, so why is it not working here? Cheers, Nigel 07914 740972 On 13 September 2013 11:59, Daniel Roseman wrote: > On Friday, 13 September 2013 08:45:51 UTC+1, Nigel Legg

Re: form issue.

2013-09-13 Thread Daniel Roseman
On Friday, 13 September 2013 08:45:51 UTC+1, Nigel Legg wrote: > I have a form with a lot of fields in it. Users will never require data > in all fields, so most have the required = False tag: > > > [This is a good example of how the for would be used] > > When I submit the form, I get the

Re: form issue.

2013-09-13 Thread Nigel Legg
Declared where as NULL fields? in the view, the model, the form? Where? In another form the required=False is working, I don't know why it is not here. Cheers, Nigel 07914 740972 On 13 September 2013 11:55, MikeKJ wrote: > Check that the fields in the database are

Re: form issue.

2013-09-13 Thread MikeKJ
Check that the fields in the database are declared as NULL fields -- 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...@googlegroups.com.

FormView and django-formset Issue

2013-09-13 Thread vijay shanker
Hi i used formsets in generic FormView like this: class RequestRecommendationView(FormView): template_name = "account/stepfour.html" form_class = formset_factory(StepFourForm) def form_valid(self,form): print form.is_valid() cleaned_data = form.cleaned_data #

CsrfViewMiddleware removes other cookies

2013-09-13 Thread Sebastian Haase
Hi, I'm working with cutyCapt, and have the problem that referenced images don't get the sessionid cookie. So I fixed CutyCapt, but I also need to remove the CsrfViewMiddleware otherwise my (manually) set sessionid cookie is removed and only the 'csrftoken' is left. If I comment out

form issue.

2013-09-13 Thread Nigel Legg
I have a form with a lot of fields in it. Users will never require data in all fields, so most have the required = False tag: model: class EditStruct(models.Model): varName = models.CharField(max_length=50) varOrder = models.IntegerField() varLabel = models.CharField(max_length=200)

Handling temporary file storage with WizardView

2013-09-13 Thread Darren Spruell
I'm working on a WizardView (django.contrib.formtools) and have a step that handles a file upload, so I'm setting the file_storage attribute as required. I'd like the file storage to be a securely created temporary directory under /tmp so I'm trying to set it to an instance of tempfile.mkdtemp as