Re: Customizing the Django Admin Interface

2012-09-17 Thread Derek
The text  I am referring to is the one that appears as a title on all the 
change list pages; I cannot, however, find it in the change_list template. 
 But if you have not needed to change that, then you would not be able to 
help.

(PS I was not asking to see the result of your changes, but where in the 
source code you had made them...)

On Monday, 17 September 2012 23:00:21 UTC+2, JJ Zolper wrote:
>
> Derek,
>
> You can see the custom changes I made here:
>
> http://www.madtrak.com/admin 
>
> That is the extent of what I have done in relation to the default. Nothing 
> more then some colors in the CSS and text color. Additionally I changed the 
> actual wording for the  to  Log in | MadTrak Django 
> Admin other then that text change and the colors I'm not sure what 
> you are asking?
>
> What is:
>
> I cannot seem to find the source text, for example, for "Select ... to 
> change"
> and would appreciate seeing/knowing how you did it.
>
> referring to?
>
> JJ
>
> On Monday, September 17, 2012 3:09:26 AM UTC-4, Derek wrote:
>>
>> Hi JJ
>>
>> I'd like to know how you changed the wording... I cannot seem to find the 
>> source text, for example, for "Select ... to change"
>> and would appreciate seeing/knowing how you did it.
>>
>> There are examples on various blogs, but Django has changed how it is 
>> works since they were written.
>>
>> Thanks
>> Derek
>>
>> On Sunday, 16 September 2012 08:25:18 UTC+2, JJ Zolper wrote:
>>>
>>> Hello,
>>>
>>> I was able to locate the Django files for the admin under contrib in the 
>>> source. I was curious if I could get some tips about customizing the 
>>> interface.
>>>
>>> One website I read said I shouldn't change any of the Django source but 
>>> if I want to set up a slightly different login page for example, to put the 
>>> admin files in my local directories that I'm working with.
>>>
>>> The real question is that I was able to edit some template files to 
>>> change some of the wording displayed but when I tried to edit the CSS files 
>>> to get a different design I did not see any changes when I restarted my 
>>> server. Is there some sort of collectstatic command that needs to be run? 
>>> Any input on how to propagate these CSS files through would be great.
>>>
>>> Thanks,
>>>
>>> JJ Zolper
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7_yIZ12jL8sJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-17 Thread hevok
Well, yes. The magic pony is doing everything for you, if you just treat it 
correctly!

Basically, put the modified admin templates and static files exactly there 
were you are serving your own templates and static assets normally in you 
project directory.
For instance, treat the admin as an app and place the customized templates 
into `templates/admin/`. Django will first look in your own directory and 
use the files there.

These two videos might be of interest regarding this topic:
1. http://pyvideo.org/video/576/customizing-the-django-admin
2. http://pyvideo.org/video/56/djangocon-2010--customizing-the-django-admin

There is also 
django-grappelliwhich 
illustrates how to customize the admin in an excellent way.

Regards,
Hevok


On Monday, September 17, 2012 10:57:30 PM UTC+2, JJ Zolper wrote:
>
> Hevok so what are the steps for doing this?
>
> Sure I know where the admin files are located but once I have copied them 
> does magic just happen and Django uses my new configurations?
>
> Thanks,
>
> JJ
>
> PS. apparently after I left my website alone for a little the CSS 
> propagated through and now I see this:
>
> http://www.madtrak.com/admin 
>
> Which has the red, different text color, etc.
>
> On Sunday, September 16, 2012 4:34:10 AM UTC-4, hevok wrote:
>>
>> Its the correct way to copy the templates and static files into your
>> project folder, if you want to customize them. Otherwise the changes
>> would disappear as soon as you deploy or setup-up your project on a
>> different computer/virtual environment.
>>
>> Try F5, CTRL-F5 or CTRL-R to reload CSS in the browser as they are often
>> kept in cache.
>>
>> Best regards,
>> Hevok
>>
>>
>> On Sunday, September 16, 2012 8:25:18 AM UTC+2, JJ Zolper wrote:
>>>
>>> Hello,
>>>
>>> I was able to locate the Django files for the admin under contrib in the 
>>> source. I was curious if I could get some tips about customizing the 
>>> interface.
>>>
>>> One website I read said I shouldn't change any of the Django source but 
>>> if I want to set up a slightly different login page for example, to put the 
>>> admin files in my local directories that I'm working with.
>>>
>>> The real question is that I was able to edit some template files to 
>>> change some of the wording displayed but when I tried to edit the CSS files 
>>> to get a different design I did not see any changes when I restarted my 
>>> server. Is there some sort of collectstatic command that needs to be run? 
>>> Any input on how to propagate these CSS files through would be great.
>>>
>>> Thanks,
>>>
>>> JJ Zolper
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/iUWmJ2Zo7PIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-17 Thread JJ Zolper
Derek,

You can see the custom changes I made here:

http://www.madtrak.com/admin 

That is the extent of what I have done in relation to the default. Nothing 
more then some colors in the CSS and text color. Additionally I changed the 
actual wording for the  to  Log in | MadTrak Django 
Admin other then that text change and the colors I'm not sure what 
you are asking?

What is:

I cannot seem to find the source text, for example, for "Select ... to 
change"
and would appreciate seeing/knowing how you did it.

referring to?

JJ

On Monday, September 17, 2012 3:09:26 AM UTC-4, Derek wrote:
>
> Hi JJ
>
> I'd like to know how you changed the wording... I cannot seem to find the 
> source text, for example, for "Select ... to change"
> and would appreciate seeing/knowing how you did it.
>
> There are examples on various blogs, but Django has changed how it is 
> works since they were written.
>
> Thanks
> Derek
>
> On Sunday, 16 September 2012 08:25:18 UTC+2, JJ Zolper wrote:
>>
>> Hello,
>>
>> I was able to locate the Django files for the admin under contrib in the 
>> source. I was curious if I could get some tips about customizing the 
>> interface.
>>
>> One website I read said I shouldn't change any of the Django source but 
>> if I want to set up a slightly different login page for example, to put the 
>> admin files in my local directories that I'm working with.
>>
>> The real question is that I was able to edit some template files to 
>> change some of the wording displayed but when I tried to edit the CSS files 
>> to get a different design I did not see any changes when I restarted my 
>> server. Is there some sort of collectstatic command that needs to be run? 
>> Any input on how to propagate these CSS files through would be great.
>>
>> Thanks,
>>
>> JJ Zolper
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ezvcwLBOUMgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-17 Thread JJ Zolper
Pretty sure you're in the wrong thread bud.

On Sunday, September 16, 2012 2:52:34 AM UTC-4, Gutso wrote:
>
> Hi Everyone, 
>
> I have one query:
>
> Should we change the database(mySQL) table's engine through migration 
> scripts or not? If not then why?
>
> Following were my proposal:
>
> def forwards(self, orm):
>  
> # Change engine from MYISAM to INNODB
> db.execute('alter table abc ENGINE=INNODB;')
>
> def backwards(self, orm):
>
># Revert Engine to MYISAM
> db.execute('alter table abc ENGINE=MYISAM;')
>
> - gurpreet
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/YbLLdanMN8cJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-17 Thread JJ Zolper
Hevok so what are the steps for doing this?

Sure I know where the admin files are located but once I have copied them 
does magic just happen and Django uses my new configurations?

Thanks,

JJ

PS. apparently after I left my website alone for a little the CSS 
propagated through and now I see this:

http://www.madtrak.com/admin 

Which has the red, different text color, etc.

On Sunday, September 16, 2012 4:34:10 AM UTC-4, hevok wrote:
>
> Its the correct way to copy the templates and static files into your
> project folder, if you want to customize them. Otherwise the changes
> would disappear as soon as you deploy or setup-up your project on a
> different computer/virtual environment.
>
> Try F5, CTRL-F5 or CTRL-R to reload CSS in the browser as they are often
> kept in cache.
>
> Best regards,
> Hevok
>
>
> On Sunday, September 16, 2012 8:25:18 AM UTC+2, JJ Zolper wrote:
>>
>> Hello,
>>
>> I was able to locate the Django files for the admin under contrib in the 
>> source. I was curious if I could get some tips about customizing the 
>> interface.
>>
>> One website I read said I shouldn't change any of the Django source but 
>> if I want to set up a slightly different login page for example, to put the 
>> admin files in my local directories that I'm working with.
>>
>> The real question is that I was able to edit some template files to 
>> change some of the wording displayed but when I tried to edit the CSS files 
>> to get a different design I did not see any changes when I restarted my 
>> server. Is there some sort of collectstatic command that needs to be run? 
>> Any input on how to propagate these CSS files through would be great.
>>
>> Thanks,
>>
>> JJ Zolper
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/8Cop1sBPfqYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-17 Thread Derek
Hi JJ

I'd like to know how you changed the wording... I cannot seem to find the 
source text, for example, for "Select ... to change"
and would appreciate seeing/knowing how you did it.

There are examples on various blogs, but Django has changed how it is works 
since they were written.

Thanks
Derek

On Sunday, 16 September 2012 08:25:18 UTC+2, JJ Zolper wrote:
>
> Hello,
>
> I was able to locate the Django files for the admin under contrib in the 
> source. I was curious if I could get some tips about customizing the 
> interface.
>
> One website I read said I shouldn't change any of the Django source but if 
> I want to set up a slightly different login page for example, to put the 
> admin files in my local directories that I'm working with.
>
> The real question is that I was able to edit some template files to change 
> some of the wording displayed but when I tried to edit the CSS files to get 
> a different design I did not see any changes when I restarted my server. Is 
> there some sort of collectstatic command that needs to be run? Any input on 
> how to propagate these CSS files through would be great.
>
> Thanks,
>
> JJ Zolper
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/YUTxP5G6k40J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-16 Thread hevok
Its the correct way to copy the templates and static files into your
project folder, if you want to customize them. Otherwise the changes
would disappear as soon as you deploy or setup-up your project on a
different computer/virtual environment.

Try F5, CTRL-F5 or CTRL-R to reload CSS in the browser as they are often
kept in cache.

Best regards,
Hevok


On Sunday, September 16, 2012 8:25:18 AM UTC+2, JJ Zolper wrote:
>
> Hello,
>
> I was able to locate the Django files for the admin under contrib in the 
> source. I was curious if I could get some tips about customizing the 
> interface.
>
> One website I read said I shouldn't change any of the Django source but if 
> I want to set up a slightly different login page for example, to put the 
> admin files in my local directories that I'm working with.
>
> The real question is that I was able to edit some template files to change 
> some of the wording displayed but when I tried to edit the CSS files to get 
> a different design I did not see any changes when I restarted my server. Is 
> there some sort of collectstatic command that needs to be run? Any input on 
> how to propagate these CSS files through would be great.
>
> Thanks,
>
> JJ Zolper
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/bZzeoCXJycoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django Admin Interface

2012-09-16 Thread Gurpreet Bhatia
Hi Everyone,

I have one query:

Should we change the database(mySQL) table's engine through migration
scripts or not? If not then why?

Following were my proposal:

def forwards(self, orm):

# Change engine from MYISAM to INNODB
db.execute('alter table abc ENGINE=INNODB;')

def backwards(self, orm):

   # Revert Engine to MYISAM
db.execute('alter table abc ENGINE=MYISAM;')

- gurpreet

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Customizing the Django admin interface

2007-11-09 Thread Joe

There's a few things to put together -

urls.py needs something like (add a line before the normal admin
line):

(r'^admin/your_report/csv/$',
'yourproject.admin_views.report.csv_report'),
(r'^admin/', include('django.contrib.admin.urls')),

Then in your admin_views/report.py (or whatever you want to call it)

import csv

@staff_member_required
def csv_report(request):
# stuff here
# Create the HttpResponse object with the appropriate CSV header.
response = HttpResponse(mimetype='text/csv')
response['Content-Disposition'] = 'attachment;
filename=yournamehere.csv'
writer = csv.writer(response)
writer.writerow(['rowheader',
'rowheader','rowheader','rowheader',])
for obj in obj_list:
writer.writerow([stuff,stuff,stuff,stuff])
return response


There are more details within the DjangoBook but that should get you
looking in the right direction.

J

On Nov 9, 10:12 am, GodOfGeeks <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I would like to add a new button to the searching page called "Convert
> to CSV".
>
> When I press the button, I want to covert the currently displayed
> results to a CSV (Comma separated values)format.
>
> if you could give me some guide lines about how to do this I would be
> really grateful. What I did so far is to copy the
>
> search_form to a new templates folder in my project so now any changes
> i do in the search_form.html is reflected in
>
> in application.
>
> Thanks in advance
>
> Cheers


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---