Re: NoReverseMatch Error

2012-08-24 Thread Syam Palakurthy
Hi, Can you please elaborate on how to use this block in the template code? I've tried adding this into my details template code in various places and cannot get it to successfully work. Also, any suggestions/examples you could point me to would be much appreciated. {{ poll.question }} {%

Re: Column widths in TabularInline

2012-08-24 Thread Vikas Rawal
> > In admin.py you can for example ... > > fieldsets = ( > (None, { > 'classes': ['myowncssclassname',], > 'fields': ( > 'field_abc', > 'field_xyz', > > ... and specify myowncssclassname in myextrastyle.css then

Re: Column widths in TabularInline

2012-08-24 Thread Mike Dewhirst
On 25/08/2012 3:06am, Vikas Rawal wrote: How do i customise width of different columns in a TabularInline object in my admin interface. In admin.py you can for example ... fieldsets = ( (None, { 'classes': ['myowncssclassname',], 'fields': (

Re: New to Django, having difficulty creating first app. PLEASE HELP!

2012-08-24 Thread MattDale
Glad you are trying out Django. That error is telling you what's wrong The directory that you are in does not include the file "manage.py". Depending on your operating system, when you get this error, get the contents of the directory(windows, type dir and press enter) if the outputted list

New to Django, having difficulty creating first app. PLEASE HELP!

2012-08-24 Thread lukedc
Hello everyone, I am doing the django tutorial. https://docs.djangoproject.com/en/1.4/intro/tutorial01/ I am on the part where it says, "The development server". It says: Let's verify this worked. Change into the outer mysite directory, if you haven't already, and run the command python

Re: Not sure how to describe issue/behavior with Form -- so here's code & YouTube video

2012-08-24 Thread Barry Morrison
Serge, Thank you. #92 is for the crispy form. The crispy-form is the actual form, but the form is using a WYSIWYG editor http://redactorjs.com/ and when I go to browse for an image it calls url 'photo-uploads' which calls the function 'upload_photos' in the view. That view is necessary for

Re: Not sure how to describe issue/behavior with Form -- so here's code & YouTube video

2012-08-24 Thread Sergiy Khohlov
Hello Barry ! I would like to say that your are not novice. now and your code is really clear. Could you please move string #92 up ? super should be called before other field initialization. look like your prev activity is stored after init process and those data is saved at the save

Re: CACHE_MIDDLEWARE_ANONYMOUS_ONLY does not work if user is not printed by view or template

2012-08-24 Thread Bill Freeman
While u = request.user may not be enough, request.user.username should be (I don't think you even have to put it in a variable, python will evaluate it even if the result is discarded). On Thu, Aug 23, 2012 at 9:20 AM, Alexis Bellido wrote: > Ok, I just confirmed my

Re: Not sure how to describe issue/behavior with Form -- so here's code & YouTube video

2012-08-24 Thread Barry Morrison
For ease of use, let's take the cancel out of the equation perhaps. Url to create a new News Event: ### Create News Article url(r'^account/news/add/$', login_required(CreateView.as_view( model=NewsArticle, form_class=NewsForm, success_url=("/account/news"),

Re: Django by Example: error with to do app; global name 'escape' is not defined

2012-08-24 Thread koiwai
plus code def response_add(self, request, obj, post_url_continue='../%s/'): """ Determines the HttpResponse for the add_view stage. """ opts = obj._meta pk_value = obj._get_pk_val() msg = "Item(s) were added successfully." # Here, we

Column widths in TabularInline

2012-08-24 Thread Vikas Rawal
How do i customise width of different columns in a TabularInline object in my admin interface. V. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
Thanks. Worked perfectly. Vikas On Friday, August 24, 2012 6:32:03 PM UTC+5:30, Melvyn Sopacua wrote: > > On 24-8-2012 14:05, Vikas Rawal wrote: > >> > >> < > https://docs.djangoproject.com/en/1.4/intro/tutorial02/#customize-the-admin-form> > > > >> > >> See the fieldsets part. > > > >

Re: django makemessages doesn't recognize trans in templates

2012-08-24 Thread Jojo
thank you guys! very helpful! Il giorno lunedì 20 agosto 2012 12:43:20 UTC-5, Nick Apostolakis ha scritto: > > > > On Mon, Aug 20, 2012 at 8:18 PM, Jojo > wrote: > >> what is the meaning of the fuzzy mark? >> >> > fuzzy is some kind of auto translated field. > it may be

Django by Example: error with to do app; global name 'escape' is not defined

2012-08-24 Thread koiwai
Hi, I'm currently working through Django by Examples and I am getting an error when attempting to have the user automatically go back to the listing of 'todo items' after entering new 'to do items' through creating a new date. The

Re: Why is my groundwork in django show up in 404 page?

2012-08-24 Thread Masud Khokhar
Hi Melvyn, Many thanks for clarifying. @txshon, I would recommend the same as Melvyn, please file a ticket with their developers. Best wishes, Masud On 24 August 2012 15:46, Melvyn Sopacua wrote: > On 24-8-2012 15:42, Masud Khokhar wrote: > > > I have never worked with

Re: runserver error: "No module named app3"

2012-08-24 Thread Bill Beal
I am using pip, and once I tried virtualenv without understanding it and it worked. There's a kind of knowledge that I call "who's on first" knowledge: you know what comes next but you don't know why. On Thu, Aug 23, 2012 at 6:29 PM, Alexis Bellido wrote: > I'd suggest

Re: After form validation, need to post and call a perl program to display to a log file

2012-08-24 Thread Nick Santos
Obligatory followup (though the docs I believe cover this pretty well) - be *very* careful calling subprocess with anything related to a form submission. Read the documents that Melvyn linked to carefully because you can be opening a massive security hole. If this is just temporary to check

Re: Why is my groundwork in django show up in 404 page?

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 15:42, Masud Khokhar wrote: > I have never worked with groundwork before, but it seems like you need the > newly created app URLs in your urls.py file. That's what groundwork is supposed to do for you:

RES: Django-tables2

2012-08-24 Thread MattDale
If you make that column a regular Column does it render properly? If not then confirm that you define the column exactly as it is spelled in your models.py(case and all). Once it renders properly as a regular Column, then try changing to a LinkColumn. -- You received this message because you

Re: Why is my groundwork in django show up in 404 page?

2012-08-24 Thread Masud Khokhar
Hi there, I have never worked with groundwork before, but it seems like you need the newly created app URLs in your urls.py file. Something like this at the end of your urls.py file may work. urlpatterns += patterns('bookapp.views', url(r'^book/list/$', 'VIEW_NAME', name='list'), ) On 24

Re: Why is my groundwork in django show up in 404 page?

2012-08-24 Thread Sergiy Khohlov
you does not have enabled this in urls.py 2012/8/24 txshon : > I follow the installation steps online about groundwork > > I use the command to setup groundwork for my project > > python manage.py groundwork bookapp Book > > However, I go to the page > >

Re: After form validation, need to post and call a perl program to display to a log file

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 8:41, Pervez Mulla wrote: > Once validation happened (its working good), I wanna call perl script to > disply it content to lof file ... > > > How can I do this ..?? FYI, it don't matter that it's perl, you can do this for

Re: Layout of widgets in admin form

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 14:05, Vikas Rawal wrote: >> >> >> >> See the fieldsets part. > > > The examples shown for fieldsets seem to divide the fields into > different groups. But in all the examples, fields still appear,

RES: Django-tables2

2012-08-24 Thread Roberto Ferreira Junior
Hi Matt, When I use linkcolum instead of a template tag, my collum cell does not display nothing! Muito Obrigado, -- Roberto Ferreira Junior robefe...@gmail.com 11 98009942 De: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Em nome de MattDale

Re: Django-tables2

2012-08-24 Thread MattDale
Here's an example of one of my tables. class NeedsTable(tables.Table): needQuantity = tables.Column() prod_id = tables.Column() description = tables.LinkColumn('needsdetail', args=[A('pk')]) department = tables.Column() order = tables.Column() priority =

Re: Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
> > > > See the fieldsets part. The examples shown for fieldsets seem to divide the fields into different groups. But in all the examples, fields still appear, within each group, one after another, vertically.

Re: Django-tables2

2012-08-24 Thread MattDale
It is just a very easy way to create html tables with one simple template tag that have features like sorting by column, easy, quick css etc. without using javascript at all. There are times when this is easier than creating a table and customizing it. I use it for general tables that don't

Re: Context Help

2012-08-24 Thread Gregory Strydom
Thanks for taking the time to help out i really appreciate it :) Im still a little confused so i think the best thing to do would be to start from scratch, going through the tutorial again, and again and taking things really slowly (slower thanks snails pace lol), and work through it step by

Re: Context Help

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 10:09, Gregory Strydom wrote: > I can understand that perfectly. What i cant understand is where do place > the P = Context() P['Name'] = "Fred". > Does it go in the models file, Views file, html file, seperate file?? With Class Based Views this is a lot simpeler:

Re: Layout of widgets in admin form

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 12:15, Vikas Rawal wrote: > I am new to django. I am trying to develop an application where I need to > work with the admin interface. The usual admin interface (for example in > the poll app of django tutorial) lays out the widgets vertically. How do I > change that?

Re: Using Tag Filters in a generic view

2012-08-24 Thread Melvyn Sopacua
On 23-8-2012 18:56, miked wrote: > The odd thing is that the parameter "record" when passed to the > template tag file seems to resolve to the primary key of the object. Nope, the expected thing is that record resolves to a model instance. > I am expecting the parameter "record" to be a

Re: Context Help

2012-08-24 Thread Tom Evans
On Fri, Aug 24, 2012 at 9:09 AM, Gregory Strydom wrote: > I'm at the end of my rope lol. > > For the life of me i cant discern where you put Context definitions. > Ive had a look at django tutorial and the documentation and unless im > seriously overlooking

Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
I am new to django. I am trying to develop an application where I need to work with the admin interface. The usual admin interface (for example in the poll app of django tutorial) lays out the widgets vertically. How do I change that? If I want to put two or three widgets side by side,

Re: database file doesn't increase in size

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 8:46, heni yemun wrote: > When i create a user account, fill the fields with some value and save() it > in the database file *myfile.db* for example, the file doesn't show any > change in size. So how do i know if i'm actually saving it and can later > access the values? Because

Re: Models relationship

2012-08-24 Thread Melvyn Sopacua
On 23-8-2012 20:15, Kurtis Mullins wrote: > class Factory(models.Model): > # Assuming suppliers and customers are just two sides of the same > relationship > suppliers = models.ManyToManyField("self", related_name="customers") > > Then simply query accordingly: > > factory_a =

Re: Not sure how to describe issue/behavior with Form -- so here's code & YouTube video

2012-08-24 Thread Tom Evans
On Fri, Aug 24, 2012 at 9:37 AM, Barry Morrison wrote: > Code: http://dpaste.org/az8Nb/ > Video http://www.youtube.com/watch?v=XFSb044UkPs=youtu.be > > so first action, I click + which adds new, hitting cancel, takes me back to > the view displaying all the news events >

Re: httpresponse from stand alone script

2012-08-24 Thread Tom Evans
On Fri, Aug 24, 2012 at 9:47 AM, Blaxton wrote: > Hi > > I am calling a stand alone script from within views.py and > was able to generate a html file with render_to_string in a stand alone > script > by include followng line: > from django.template.loader import

Re: CACHE_MIDDLEWARE_ANONYMOUS_ONLY does not work if user is not printed by view or template

2012-08-24 Thread Melvyn Sopacua
On 23-8-2012 15:20, Alexis Bellido wrote: > And I got an error message telling me I couldn't concatenate an str to a > SimpleLazyObject. At this point the lazy loading logic hasn't got a real > User object yet. > > To bypass the lazy loading, hence return a non-cache view for authenticated >

httpresponse from stand alone script

2012-08-24 Thread Blaxton
Hi I am calling a stand alone script from within views.py and  was able to generate a html file with render_to_string in a stand alone script by include followng line: from django.template.loader import render_to_string now , need to use "httpresponse" to generate a response. is it possible ?

Not sure how to describe issue/behavior with Form -- so here's code & YouTube video

2012-08-24 Thread Barry Morrison
Code: http://dpaste.org/az8Nb/ Video http://www.youtube.com/watch?v=XFSb044UkPs=youtu.be so first action, I click + which adds new, hitting cancel, takes me back to the view displaying all the news events next action, I hit + again, adds new news event...this time I browse for an image, again,

Re: Using Tag Filters in a generic view

2012-08-24 Thread Carlos Palol
Hi, please share your view class. Cheers On Thursday, 23 August 2012 18:56:37 UTC+2, miked wrote: > > I have create a generic view and in that view I have specified > context_object_name of errata_id_list in this case. This generic view is > tied to a query set of a model and in the view I

database file doesn't increase in size

2012-08-24 Thread heni yemun
Hi, When i create a user account, fill the fields with some value and save() it in the database file *myfile.db* for example, the file doesn't show any change in size. So how do i know if i'm actually saving it and can later access the values? Or is there another problem i should deal with

After form validation, need to post and call a perl program to display to a log file

2012-08-24 Thread Pervez Mulla
Hi, I have written code for form validation for different filed . Once validation happened (its working good), I wanna call perl script to disply it content to lof file ... How can I do this ..?? Please help me Pervez -- You received this message because you are subscribed to the Google