Created
May 1, 2009 05:20
-
-
Save anonymous/104884 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mi admin.py | |
-------------------------- | |
from django.contrib import admin | |
from sitioprueba.books.models import Publisher, Author, Book, Tienda | |
import settings | |
media = settings.MEDIA_URL | |
class ArticleAdmin(admin.ModelAdmin): | |
# TinyMCE | |
js = ('../media/js/tiny_mce/tiny_mce.js','../media/js/editores/textareas.js',) | |
#class Media: | |
#js = (media+'js/tiny_mce/tiny_mce.js', media+'js/editores/textareas.js') | |
#Your JS file paths may vary | |
#class Media: | |
# js = (media+'js/jquery-1.3.2.js', media+'js/wymeditor/wymeditor/jquery.wymeditor.js', media+'js/wymeditor/wymeditor/jquery.wymeditor.pack.js', media+'js/editor.js') | |
admin.site.register(Publisher) | |
admin.site.register(Author) | |
admin.site.register(Book) | |
admin.site.register(Tienda) | |
-------------------------- | |
mi url.py | |
............................... | |
from django.conf.urls.defaults import * | |
from sitioprueba.views import hello, current_datetime, suma_horas | |
from sitioprueba.books import views | |
# Uncomment the next two lines to enable the admin: | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns = patterns('', | |
(r'^hello/$', hello), | |
(r'^time/$', current_datetime), | |
(r'^time/suma/(\d{1,2})/$', suma_horas), | |
(r'^search-form/$', views.search_form), | |
(r'^search/$', views.search), | |
#(r'^wymeditor/$', 'django.views.static.serve', {'document_root': 'js/wymeditor/wymeditor/'}), | |
(r'^media/(.*)$', 'django.views.static.serve', {'document_root' : 'js/', 'show_indexes': True}), | |
(r'^admin/(.*)', admin.site.root), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment