有何胜利可言?挺住意味着一切。

博客提到德国诗人里尔克的一句诗常被引用,作者查到了该诗句的英文译本,还分享了一个介绍里尔克的网站http://www.myrilke.com.asp.asp ,供感兴趣者查看。

这是德国诗人里尔克的一句诗,经常被人引用,今天查了一下,找到了这句诗的英文译本。

这个http://www.myrilke.com/default.asp是唯一找到的介绍里尔克的比较好的地方,有兴趣的朋友可以去看看。

 
Requiem

For Wolf Graf von Kalckreuth

R.M.Rilke

Can I have never seen you? For my heart
feels you like some too-burdensome beginning
one still defers. Oh, could I but begin
to tell of you, dead that you are, you gladly,
you passionately dead. And was it so
alleviating as you supposed, or was
no-more-alive still far from being-dead?
You thought you could possess things better there
where none care for possessions. You supposed
that over there you'd be inside the landscape
that here closed up before you like a picture,
would enter the beloved from within
and penetrate through all things, strong and wheeling.
Oh, that you may not have too long had cause
to tax your boyish error with deception!
Loosened within that rush of melancholy,
ecstatically and only half-aware,
may you, in motion round the distant stars,
have found the happiness that you transposed
from here into that being-dead you dreamt of.
How near you were to it, dear friend, even here.
How much it was at home here, what you purposed,
the earnest joy of your so strenuous longing.
When, tired of being happy and unhappy,
you mined into yourself and painfully
climbed with an insight, almost breaking down
under the weight of dark discovery:
you carried what you never recognized,
you carried joy, you carried through your blood
your little saviour's burden to the shore.

Why did you not wait till the difficult
gets quite unbearable: until it turns,
and is so difficult because so real?
That was perhaps your next allotted moment;
it may perhaps have been already trimming
its garland at the door you slammed for ever.

Oh that percussion, how it penetrates,
when somewhere, through impatience's sharp draught,
something wide open shuts and locks itself!
Who can deny on oath that in the earth
a crack goes springing through the healthy seeds?
Who has investigated if tame beasts
are not convulsed with sudden lust for killing
when that jerk shoots like lightning through their brains?
Who can deduce the influence leaping out
from actions to some near-by terminal?
Who can conduct where everything's conductive?

The fact that you destroyed. That this must be
related of you till the end of time.
Even if a hero's coming, who shall tear
meaning we take to be the face of things
off like a mask and in a restless rage
reveal us faces whose mute eyes have long
been gazing at us through dissembling holes:
this is sheer face and will not be transfigured:
that you destroyed. For blocks were lying there,
and in the air already was the rhythm
of some now scarce repressible construction.
You walked around and did not see their order,
one hid the other from you; each of them
seemed to be rooted, when in passing by
you tried at it, with no real confidence
that you could lift it. And in desperation
you lifted every one of them, but only
to sling them back into the gaping quarry
wherein, being so distended by your heart,
they would no longer fit. Had but a woman
laid her light hand on the still mild beginning
of this dark rage; had someone occupied,
occupied in the inmost of his being,
but quietly met you on your dumb departure
to do this deed; had even something led you
to take your journey past some wakeful workshop
where men were hammering and day achieving
simple reality; had there been room
enough in your full gaze to let the image
even of a toiling beetle find admittance:
then, in a sudden flash of intuition,
you would have read that script whose characters
you'd slowly graved into yourself since childhood,
trying from time to time whether a sentence
might not be formed: alas, it seemed unmeaning.
I know; I know: you lay in front and thumbed
away the grooves, like someone feeling out
the insciption on a grave-stone. Anything
that seemed to give a light you held as lamp
before those letters; but the flame went out
before you'd understood - your breath, perhaps,
perhaps the trembling of your hand; perhaps
just of its own accord, as flames will do.
You never read it. And we do not dare
to read through all the sorrow and the distance.

We only watch the poems that still climb,
still cross, the inclination of your feeling,
carrying the words that you had chosen. No,
you did not choose all; often a beginning
was given you in full, and you'd repeat it
like some commission. And you thought it sad.
Ah, would you had never heard it from yourself!
Your angel sounds on, uttering the same
text with a different accent, and rejoicing
breaks out in me to hear his recitation,
rejoicing over you: for this was yours:
that from you every proffered love fell back,
that you had recognized renunciation
as price of seeing and in death your progress.
This was what you possessed, you artist, these
three open moulds. Look, here is the casting
from the first: space for your feeling; and look, there,
from the second I'll strike out for you the gaze
that craves for nothing, the great artist's gaze;
and in the third, which you yourself broke up
too soon, and which as yet the first outrushing
of quivering feed from the white-heated heart
had scarce had time to reach, a death was moulded,
deepened by genuine labour, that own death
which has such need of us because we live it,
and which we're nowhere nearer to than here.

All this was your possession and your friendship;
as you yourself often divined; but then
the hollowness of those moulds frightened you,
you groped within and drew up emptiness
and mourned your lot. - O ancient curse of poets!
Being sorry for themselves instead of saying,
for ever passing judgement on their feeling
instead of shaping it; for ever thinking
that what is sad or joyful in themselves
is what they know and what in poems may fitly
be mourned or celebrated. Invalids,
using a language full of woefulness
to tell us where it hurts, instead of sternly
transmuting into words those selves of theirs,
as imperturbable cathedral carvers
transposed themselves into the constant stone.

That would have been salvation. Had you once
perceived how fate may pass into a verse
and not come back, how, once in, it turns image,
nothing but image, but an ancestor,
who sometimes, when you watch him in his frame,
seems to be like you and again not like you: -
you would have persevered.

                           But this is petty,
thinking of what was not. And some appearance
of undeserved reproach in these comparings.
Whatever happens has had such a start
of our supposing that we never catch it,
never experience what it really looked like.

Don't be ashamed, when the dead brush against you,
those other dead, who held out to the end.
(What, after all, does end mean?) Exchange glances
peacefully with them, as is customary,
and have no fear of being conspicuous
through carrying the burden of our grief.
The big words from those ages when as yet
happening was visible are not for us.
Who talks of victory? To endure is all. 


from "Selected Poems", Penguin Classics - tr. J.B.Leishman
1 August, 1964
ISBN: 0140420797

<think>我们正在讨论Flask-Login中的UserMixin类。用户的问题非常具体:UserMixin是否有默认的id? 根据之前的对话,我们已经明确: - UserMixin本身不存储任数据,它只提供一些方法的默认实现。 - 其中,UserMixin的`get_id`方法默认会尝试返回`self.id`(即用户实例的id属性)的字符串形式。 因此,我们需要澄清:UserMixin类本身没有定义id属性,它只是假设你的用户类会有id属性。所以,它没有“默认的id值”,但是有一个默认的获取id的方式(即通过访问id属性)。 为了回答用户的问题,我们可以这样组织: 1. 明确回答:UserMixin类本身没有定义id属性,因此没有默认的id值。 2. 解释:UserMixin的`get_id`方法默认会查找用户实例的id属性,所以你需要确保你的用户类有一个id属性(通常是数据库中的主键)。 3. 举例:如引用[2]中所示,用户类在初始化时设置了id属性(`self.id = id`),这样UserMixin的`get_id`方法才能正常工作。 同时,我们可以参考之前的引用: 引用[2]:用户模型示例中,我们创建了一个User类继承UserMixin,并在初始化时设置了id属性。这就是一个典型的做法。 因此,回答如下: </think>在 Flask-Login 的 `UserMixin` 类中,**不存在预设的默认 `id` 属性值**。以下是关键说明: ### 1. `UserMixin` 的设计机制 - **无默认 ID 值** `UserMixin` 本身不存储任用户数据(包括 `id`),仅提供接口方法的默认实现[^2]。 - **`get_id()` 的默认行为** 其核心方法 `get_id()` 默认尝试访问用户对象的 `id` 属性: ```python def get_id(self): try: return str(self.id) # 依赖用户模型自身的id属性 except AttributeError: raise NotImplementedError("No `id` attribute") ``` 这仅是**约定而非默认值**——若用户模型未定义 `id` 属性,调用时将直接抛出异常。 ### 2. 开发者必须显式定义 `id` 如引用[2]的示例所示,需在用户模型中手动创建 `id` 字段: ```python class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) # ⭐ 必须显式定义 # 其他字段... ``` - **`id` 的生成完全由开发者控制** 可选用自增整数、UUID 或字符串等方案,例如: ```python import uuid id = db.Column(db.String(36), primary_key=True, default=lambda: str(uuid.uuid4())) ``` ### 3. 工作原理图示 ```mermaid graph LR A[用户登录] --> B[login_user user] B --> C[调用 user.get_id] C --> D{用户模型是否有 id 属性?} D -- 是 --> E[返回 str id 存入 Session] D -- 否 --> F[抛出 NotImplementedError] ``` ### 4. 常见误区 - **错误理解**:认为 `UserMixin` 会自动创建 `id` **事实**:未定义 `id` 时,`current_user` 等功能将直接报错[^2]。 - **错误理解**:`UserMixin` 提供默认 ID 值 **事实**:连 `id` 属性都不存在,更无默认值可言。 > 📌 **总结**:`UserMixin` 仅约定通过 `get_id()` 获取用户标识符,但 **`id` 属性需开发者完整实现**,包括字段定义、存储和生成逻辑[^2][^4]。
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值