对<action/> 和 <category/> 的理解

这里写图片描述

这里写图片描述

action 为一种明确的命令

category 顾名思义,表明具有某种能力

{% extends "base.html" %} {% block title %}系统管理{% endblock %} {% block content %} <div class="admin-panel"> <h1>管理控制台</h1> <!-- 权限验证 --> {% if not current_user.is_admin %} <div class="alert alert-danger"> 错误:您没有访问此页面的权限 </div> {% else %} <section class="admin-section"> <h2>用户管理</h2> <table class="data-table"> <thead> <tr> <th>ID</th> <th>用户名</th> <th>最后登录</th> </tr> </thead> <tbody> {% for user in user_list %} <tr> <td>{{ user.id }}</td> <td>{{ user.username }}</td> <td>{{ user.last_login | datetimeformat }}</td> </tr> {% endfor %} </tbody> </table> </section> {% endif %} </div> {% endblock %}{% extends "base.html" %} {% block title %}用户登录{% endblock %} {% block content %} <form class="auth-form" method="POST" action="{{ url_for('login') }}"> <h2>用户登录</h2> <!-- CSRF保护 --> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> <div class="form-group"> <label for="username">用户名:</label> <input type="text" id="username" name="username" required pattern="[A-Za-z0-9]{3,20}" title="仅允许字母数字 (3-20字符)"> </div> <div class="form-group"> <label for="password">密码:</label> <input type="password" id="password" name="password" required minlength="8" title="至少8位字符"> </div> <button type="submit" class="btn-primary">登录</button> <!-- 安全增强措施 --> <div class="security-tips"> <p>🔒 采用HTTPS加密传输</p > <p>⚠ 登录失败3次将锁定账户</p > </div> </form> {% endblock %}<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{% block title %}安全增强网站{% endblock %}</title> <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> </head> <body> <header class="navbar"> <nav> 首页 {% if current_user.is_authenticated %} 登出 {% if current_user.is_admin %} 管理后台 {% endif %} {% else %} 登录 {% endif %} </nav> </header> <main class="container"> <!-- 安全警告显示区域 --> {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} <div class="alert alert-{{ category }}"> {{ message }} </div> {% endfor %} {% endif %} {% endwith %} {% block content %}{% endblock %} </main> <script src="{{ url_for('static', filename='main.js') }}"></script> </body> </html>这三个代码你写的相比真么样
03-16
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.isa.navi" android:sharedUserId="android.uid.system" android:versionCode="1" android:versionName="V0.9.0_20250621"> <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />--> <!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />--> <!-- <uses-permission android:name="android.permission.INTERNET" />--> <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />--> <!-- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />--> <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />--> <!-- <uses-permission android:name="android.permission.USB_PERMISSION"/>--> <!-- <uses-permission android:name="android.permission.WAKE_LOCK" />--> <!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />--> <!-- <uses-permission android:name="android.permission.ACCESS_MAP_ISA"/>--> <application android:name="com.isa.navi.ui.ISANaviApplication" android:allowBackup="false" android:label="ISA-NaviService" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:taskAffinity="" android:persistent="true" > <!-- android:debuggable="true" --> <service android:name="com.isa.navi.service.ISANaviService" android:directBootAware="true" android:exported="false"> <!-- android:permission="com.isa.permission.ACCESS"--> <!-- >--> <intent-filter> <action android:name="com.isa.intent.action.ISA_NAVI" /> <action android:name="com.isa.intent.action.ISA_NAVI_DEBUG" /> <action android:name="com.isa.intent.action.ISA_CARPLAY" /> </intent-filter> </service> <receiver android:name="com.isa.navi.BootCompleteReceive" android:directBootAware="true" android:exported="false" > <!-- 开机广播 --> <!-- <intent-filter>--> <!-- <action android:name="android.intent.action.BOOT_COMPLETED" />--> <!-- </intent-filter>--> <intent-filter android:priority="2147483647"> <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" /> </intent-filter> </receiver> <!-- <activity android:name=".ui.MainActivity">--> <!-- <intent-filter>--> <!-- <action android:name="android.intent.action.MAIN" />--> <!-- <category android:name="android.intent.category.LAUNCHER" />--> <!-- </intent-filter>--> <!-- </activity>--> <receiver android:name=".receiver.USBReceiver" android:exported="false"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.intent.action.MEDIA_MOUNTED"/> <action android:name="android.intent.action.MEDIA_UNMOUNTED" /> <action android:name="android.intent.action.MEDIA_REMOVED"/> <data android:scheme="file"></data> </intent-filter> </receiver> </application> </manifest> 这个xml是什么
最新发布
07-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值