Skip to content

Django: Change or translate the app name in the admin menu

Let's say I have a Django app "users". The admin menu shows this as category "Users". That's ok, but if the website users speak another language I want this name translated. Also I'm not necessarily using "Users" as name in the admin menu as section name, but can use something more descriptive. "Website Users", as example.

 

Continue reading "Django: Change or translate the app name in the admin menu"
  • Twitter
  • Bookmark Django: Change or translate the app name in the admin menu at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Django: Change or translate the app name in the admin menu
  • Bloglines Django: Change or translate the app name in the admin menu
  • Technorati Django: Change or translate the app name in the admin menu
  • Fark this: Django: Change or translate the app name in the admin menu
  • Bookmark Django: Change or translate the app name in the admin menu at YahooMyWeb
  • Bookmark Django: Change or translate the app name in the admin menu at Furl.net
  • Bookmark Django: Change or translate the app name in the admin menu at reddit.com
  • Bookmark Django: Change or translate the app name in the admin menu at blinklist.com
  • Bookmark Django: Change or translate the app name in the admin menu at Spurl.net
  • Bookmark Django: Change or translate the app name in the admin menu at Simpy.com
  • Bookmark Django: Change or translate the app name in the admin menu at blogmarks
  • Bookmark Django: Change or translate the app name in the admin menu with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Django: Remove default entries from admin menu

The Django administration site comes with a couple of default entries, depending on which apps and middleware is installed.

Usually there is at least "Users" and "Groups", and if the quite common "allauth" is installed, then there is also "Site", "SocialApp", "SocialAccount", and "SocialToken". They are not always necessary, especially when no Social Login is used. Or why have the "Site" administration when only Site=1 is used?

With a few tricks these can be removed from the admin menu.

 

Continue reading "Django: Remove default entries from admin menu"
  • Twitter
  • Bookmark Django: Remove default entries from admin menu at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Django: Remove default entries from admin menu
  • Bloglines Django: Remove default entries from admin menu
  • Technorati Django: Remove default entries from admin menu
  • Fark this: Django: Remove default entries from admin menu
  • Bookmark Django: Remove default entries from admin menu at YahooMyWeb
  • Bookmark Django: Remove default entries from admin menu at Furl.net
  • Bookmark Django: Remove default entries from admin menu at reddit.com
  • Bookmark Django: Remove default entries from admin menu at blinklist.com
  • Bookmark Django: Remove default entries from admin menu at Spurl.net
  • Bookmark Django: Remove default entries from admin menu at Simpy.com
  • Bookmark Django: Remove default entries from admin menu at blogmarks
  • Bookmark Django: Remove default entries from admin menu with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Huginn: Monitor changes in websites

The Huginn software is not only good for monitoring Twitter feeds, it can also be used to monitor websites for changes.

That's actually easy and needs only two agents:

 

 

Continue reading "Huginn: Monitor changes in websites"
  • Twitter
  • Bookmark Huginn: Monitor changes in websites at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Huginn: Monitor changes in websites
  • Bloglines Huginn: Monitor changes in websites
  • Technorati Huginn: Monitor changes in websites
  • Fark this: Huginn: Monitor changes in websites
  • Bookmark Huginn: Monitor changes in websites at YahooMyWeb
  • Bookmark Huginn: Monitor changes in websites at Furl.net
  • Bookmark Huginn: Monitor changes in websites at reddit.com
  • Bookmark Huginn: Monitor changes in websites at blinklist.com
  • Bookmark Huginn: Monitor changes in websites at Spurl.net
  • Bookmark Huginn: Monitor changes in websites at Simpy.com
  • Bookmark Huginn: Monitor changes in websites at blogmarks
  • Bookmark Huginn: Monitor changes in websites with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Django: disable inline option to add new referenced objects

The Django Web Framework makes it quite easy to add new referenced objects in the admin menu.

Let's say the model has two foreign keys in it:

class TeamMember(models.Model):
    team = models.ForeignKey(Team, on_delete=models.CASCADE, verbose_name=_("Team"))
    user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, verbose_name=_("User"))

And the admin form:

class TeamMemberForm(forms.ModelForm):
    class Meta:
        model = TeamMember

class CustomTeamMemberAdmin(admin.ModelAdmin):
    form = TeamMemberForm
    add_form = TeamMemberForm
    model = TeamMember
    fieldsets = [
        (None,      {'fields': ['team', 'user']}),
    ]

admin.site.register(TeamMember, CustomTeamMemberAdmin)

Then Django will show small a small green "Django add reference" sign next to the fields:

Continue reading "Django: disable inline option to add new referenced objects"
  • Twitter
  • Bookmark Django: disable inline option to add new referenced objects at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Django: disable inline option to add new referenced objects
  • Bloglines Django: disable inline option to add new referenced objects
  • Technorati Django: disable inline option to add new referenced objects
  • Fark this: Django: disable inline option to add new referenced objects
  • Bookmark Django: disable inline option to add new referenced objects at YahooMyWeb
  • Bookmark Django: disable inline option to add new referenced objects at Furl.net
  • Bookmark Django: disable inline option to add new referenced objects at reddit.com
  • Bookmark Django: disable inline option to add new referenced objects at blinklist.com
  • Bookmark Django: disable inline option to add new referenced objects at Spurl.net
  • Bookmark Django: disable inline option to add new referenced objects at Simpy.com
  • Bookmark Django: disable inline option to add new referenced objects at blogmarks
  • Bookmark Django: disable inline option to add new referenced objects with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Monitor website status with Huginn

After setting up Huginn, and implementing the actions on my todo list, I had a look at the available agents and started thinking what else they can be useful for.

One of the ideas I came up with is monitoring if a website is available, or has some trouble. I already have a monitoring system in place, but it's a nice exercise to learn more about the other agents.

 

Continue reading "Monitor website status with Huginn"
  • Twitter
  • Bookmark Monitor website status with Huginn at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Monitor website status with Huginn
  • Bloglines Monitor website status with Huginn
  • Technorati Monitor website status with Huginn
  • Fark this: Monitor website status with Huginn
  • Bookmark Monitor website status with Huginn at YahooMyWeb
  • Bookmark Monitor website status with Huginn at Furl.net
  • Bookmark Monitor website status with Huginn at reddit.com
  • Bookmark Monitor website status with Huginn at blinklist.com
  • Bookmark Monitor website status with Huginn at Spurl.net
  • Bookmark Monitor website status with Huginn at Simpy.com
  • Bookmark Monitor website status with Huginn at blogmarks
  • Bookmark Monitor website status with Huginn with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca