Questions tagged [admin]

admin may refer to both physical persons or software accounts that are dedicated and privileged to change the system they operate. Also used on WordPress to designate backend.

admin may refer to both physical persons or software accounts that are dedicated and privileged to change the system they operate. Also used on WordPress CMS to designate backend processes (see is_admin() conditional function).

4554 questions
17
votes
4 answers

How to rotate the tomcat localhost log?

I am using tomcat 6x in a Linux system. It prints a localhost log file like localhost.2011-06-07, localhost.2011-06-08 on a daily basis. I want to rotate the localhost when it reaches 1MB. I can rotate log files in log4j for my web apps. But this…
Tito
  • 8,894
  • 12
  • 52
  • 86
17
votes
1 answer

Django admin validation for inline form which rely on the total of a field between all forms

Forgive me if this has been answered before, I couldn't find an answer where the validation depended on the aggregate of inline forms. Little background: I'm doing a site for an insurance broker which has 'Policies' and a 'Total Commission' of that…
user569888
  • 595
  • 1
  • 5
  • 9
17
votes
2 answers

Django Override Admin change_form.html Template - display associated model in template

I have a situation where I've overrided the admin_change.html template for a given model. I've created a file such as: /myproject/templates/admin/myapp/mymodel/change_form.html Then, in the overrided change_form.html template, where I am editing…
Joe J
  • 9,985
  • 16
  • 68
  • 100
17
votes
5 answers

Always run cmd via ConEmu as administrator

I'm using ConEmu and I want to always have my cmds run as administrator. I've changed the settings that forces all my cmds to run through ConEmu, so typing 'cmd' in the Windows Run will open ConEmu (Settings -> Integration -> Default term -> Force…
AlexD
  • 4,062
  • 5
  • 38
  • 65
16
votes
2 answers

Require login for certain blueprints in Flask?

What's the common approach of adding access control to a blueprint in Flask? For example I have a blueprint called admin with url_prefix='/admin' How do I force all views under /admin must be authenticated superuser first?
est
  • 11,429
  • 14
  • 70
  • 118
16
votes
5 answers

Django Apache/mod_python Admin CSS not appearing with admin tables

I have Windows XP/Django/apache/mod_python working on localhost. All parts are working with the exception of the admin CSS not rendering. The admin works, but no html formatting. I've made additions in: settings.py INSTALLED_APPS …
Ana
16
votes
4 answers

Django admin inline: select_related

Using Django 1.8 on Python 3.4.1 with models: class Product(models.Model): name = models.CharField(max_length=255) # some more fields here def __str__(self): return self.name class PricedProduct(models.Model): product =…
juntatalor
  • 183
  • 1
  • 1
  • 7
16
votes
4 answers

Rails: Only allow admin user to create new users in Rails with Devise (No external modules)

Currently, my Users database has a column called "admin" with a boolean value and the default set to false. I have one admin user seeded into the database. How do write my application so that users who are the admin can create new users, but…
kingsfoil
  • 3,795
  • 7
  • 32
  • 56
16
votes
4 answers

Custom url for django admin

For an extra little bit of security I want to change the default django admin url to the custom one, e.g. change mysite.com/admin/ to mysite.com/mysecretadmin/ so that admin is completely unaccessible via default url. I tried some solutions from the…
Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87
16
votes
7 answers

Django admin not serving static files?

Django 1.6 I'm having trouble serving my static files for my Django Admin. urls.py: urlpatterns = patterns('', url(r'^$', 'collection.views.index', name='home'), url(r'^collection/', include('collection.urls')), url(r'^admin/', …
allanberry
  • 7,325
  • 6
  • 42
  • 71
16
votes
6 answers

Avoid SecurityException because of "No active admin owned by"

How to avoid this Exception E/AndroidRuntime(26113): Caused by: java.lang.SecurityException: No active admin owned by uid XXXX for policy #3 when calling this: public static void lockScreen(Context context) { Log.d(TAG, "lockScreen"); …
ViliusK
  • 11,345
  • 4
  • 67
  • 71
15
votes
6 answers

How to display notice in admin panel on Plugin Activation?

I am trying to display a notice in admin panel when I activate my test plugin. How can I display that? What's that method?
Thompson
  • 1,954
  • 10
  • 33
  • 58
15
votes
2 answers

How to add button to "submit_row" context in django

I would like to add an extra button to the submit row in django. Standard we get "delete", "save", "save and continue editing" and "save and add another". To this set I would like to add another button which would call a function on the model. As…
jorrebor
  • 2,166
  • 12
  • 48
  • 74
15
votes
4 answers

HTML input textbox in Django admin.py filter

I would like to filter data in Django (admin.py) with text writen in HTML input textbox. I need to filter companies by city in which they are and list of all cities is too long. I would like to replace list of all cities in filter by one text input.…
Jazzuell
  • 253
  • 1
  • 2
  • 8
15
votes
4 answers

Run process as admin with subprocess.run in python

Is there a way of passing some runas=True arg to a subprocess.run function in python? I want to run a process as admin (elevate it). Thanks for answers :)\ EDIT: Using Windows OS.
Jakub Bláha
  • 1,491
  • 5
  • 22
  • 43